Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... ·...

37
Banaras Hindu University

Transcript of Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... ·...

Page 1: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

Banaras Hindu University

Page 2: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

A Course on

Software Reuse by Design Patterns and Frameworks

Page 3: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

by

Dr. Manjari Gupta Department of Computer Science

Banaras Hindu University

Page 4: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

Lecture 1

Basic Issues in Software Reuse

Page 5: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ software reuse offers possibilities for ∗ reducing development cost and ∗ improving software quality

Scope and necessity of software reuse

Page 6: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Most reuse approaches ∗ based on object-oriented technology.

∗ different kinds of reuse

∗ code, analysis, design, and architectures.

Software Reuse

Page 7: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Standard block of code copied and pasted into every application ∗ Difficult, if frequent changes are needed

∗ Object-oriented programming ∗ Good reuse within an application

∗ Framework technology: reuse across applications

Origin of Software Reuse

Page 8: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Incidental reuse ∗ Developers are tempted to reuse their earlier work ∗ Reuse may actually cost more than developing new

software ∗ It is necessary to plan for reuse

∗ additional cost during development ∗ dramatic savings over a number of projects

Software reuse

Page 9: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Other engineering disciplines, like mechanical and electrical, make the designs based on reusable and replaceable components.

∗ in software engineering field we need to reuse

software assets

Systematic Software Reuse

Page 10: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Formal Software Reuse ∗ introduced by Mcllroy ∗ at the NATO Software Engineering Conference ∗ in 1968

Page 11: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ reusing the inputs, the processes and the outputs of

previous software development efforts [Mili95]. ∗ is the reapplication of artifacts and knowledge from

the development of one system to another system [Li92].

∗ Reuse is, basically, a work culture

∗ the basic principle of reuse [Smolarova97] ∗ not to repeat solving of what has been already solved.

Software reuse

Page 12: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ initial phases of software reuse will generate negative savings

∗ As the repository grows larger, the savings through reuse will start to offset the costs associated with the initial setup, and

∗ a breakeven point will be reached. ∗ Beyond this, the savings should continue to

outpace costs

Savings in development (reuse-based) effort [Nazareth02]

Page 13: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Reusability is a measure of the ease with which a reusable

item can be used.

∗ It is the degree to which a reusable artifact can be used in more than one applications.

REUSABILITY

Page 14: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Software reuse encapsulates two aspects ∗ Software development for reuse and ∗ Software development with reuse

∗ Chicken and egg problem

Page 15: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Increase in productivity,

∗ Increase in quality, ∗ Reduced software development cost,

∗ Reduced maintenance costs,

∗ Reduced time to market for a project,

∗ Provides return on investment etc.

REUSE PROMISES

Page 16: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

DOD Lines of Code in Service and Cost/LOCS [Bohem99]

Page 17: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Added revenuer due to income from selling reusable information

∗ Added revenue from fees or royalties resulting from redistribution of information

REUSE PRODUCER BENEFITS [Fichman01]

Page 18: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Reduced cost to design ∗ Reduced cost to document (internal) ∗ Reduced cost to implement ∗ Reduced cost to unit test ∗ Reduced cost to design tests ∗ Reduced cost to document tests ∗ Reduced cost to execute testing

REUSE CONSUMER BENEFITS [Fichman01]

Page 19: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Reduced cost to product publications ∗ Added revenue due to delivering product sooner to

market place ∗ Reduced maintenance costs ∗ Added revenue due to improved customer satisfaction

with product quality ∗ Reduced cost of tools ∗ Reduced cost of equipment ∗ Reduced cost to manage development and test

REUSE CONSUMER BENEFITS [Fichman01] Cont…

Page 20: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Cost of performing cost-benefit analysis ∗ Cost of performing domain analysis ∗ Cost of designing reusable parts ∗ Cost of modeling/design tools for reusable parts ∗ Cost of implementing reusable parts

REUSE PRODUCER COSTS [Fichman01]

Page 21: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Cost of testing reusable parts ∗ Cost of documenting reusable parts ∗ Cost of obtaining reuse library tools ∗ Cost of added equipment for reuse library ∗ Cost of resources to maintain reuse library

REUSE PRODUCER COSTS [Fichman01] Cont…

Page 22: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Cost of management for development, test and library support groups

∗ Cost of producing publications ∗ Cost of maintaining reusable parts ∗ Cost of marketing reusable parts ∗ Cost of training in software reuse

REUSE PRODUCER COSTS [Fichman01] Cont…

Page 23: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Cost of performing cost-benefit analysis ∗ Cost of performing domain analysis ∗ Cost of locating and assessing reusable parts ∗ Cost of integrating reusable parts ∗ Cost of modifying reusable parts

REUSE CONSUMER COSTS [Fichman01] Cont…

Page 24: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Cost of maintaining modified reusable parts ∗ Cost of testing modified reusable parts ∗ Fees for obtaining reusable parts ∗ Fees or royalties for reusing parts ∗ Cost of training on software reuse

REUSE CONSUMER COSTS [Fichman01] Cont…

Page 25: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

Non-technical ∗ Financial investment for establishing a reuse

program [Smolarova97],

∗ Lack of knowledge of the issues and technologies for reuse [Lynex97],

∗ Lack of support from managers because of tight budget, failure fear, set-up costs etc [Lynex97],

∗ Lack of way to incorporate and promote reuse [Layzell].

FACTORS IMPEDING REUSE

Page 26: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

l disincentives amongst development staff [Smolarova97, Lynex97, Manjari04]

o resistance to change,

o effecting job security as fewer developers may be required,

o because of most famous “Not-Invented-Here” syndrome,

o competition among staffs,

o feel comfortable in developing from scratch than developing by reusing other’s reusable assets etc.

Non-technical factors impeding reuse Cont…

Page 27: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Lack of methodologies incorporating reuse as a standard

development practice,

∗ Lack of appropriate tools supporting software reuse,

∗ Lack of standards for representing reusable software artifact,

∗ Lack of reusable artifact libraries with acceptable retrieval

support,

Technical factors hindering reuse [Smolarova97]

Page 28: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Hard-to-measure nature of reuse [Lynex97],

∗ Continual evolving requirements force users

(developers) to modify software (built from reusable systems) to satisfy these changed requirements [Bohem99],

∗ Variability extent among similar applications in a domain [Manjari04],

∗ Lack of appropriate solution for composition and

instantiation problems in large scale reuse [Manjari04] etc.

Technical factors hindering reuse Cont…

Page 29: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Adopt a product line approach ∗ Perform a business case analysis ∗ Focus on achieving black-box reuse ∗ Establish an empowered product line manager and

stakeholder buy-in ∗ Establish reuse-oriented processes and

organizations

Success Factors for Software Reuse [Bohem99]

Page 30: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ Adopt an incremental approach ∗ Use metrics-based reuse operations management ∗ Establish a pro-active product-line evolution

strategy ∗ Maintain a reuse library

Success Factors for Software Reuse [Bohem99] Cont…

Page 31: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

REUSE TYPES

∗ By-substance [Diaz93] ∗ By-mode [Morisio00] ∗ By extent of modification [Diaz93] ∗ By-products [Diaz93] ∗ By-scope [Diaz93] ∗ By scale [Batory93, Li92] ∗ technique used [Manjari04]

Page 32: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ By-substance

∗ Ideas or concepts reuse: The knowledge why and how to do things in a certain way is reuse.

∗ Artifacts or components reuse ∗ Procedures or skills reuse

∗ By-scope

∗ Vertical: This reuse takes place within the same application area or domain.

∗ Horizontal: It means that reusable parts produced in one application area are reused in a different one.

REUSE TYPES Cont…

Page 33: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

vBy-mode ∗ Copy-paste reuse: It is not a form of real (formal)

reuse. It is only the copy of old code and edit that. ∗ Ad-hoc reuse: In this approach if one gets something

useful, reuses it otherwise no attempt for reuse is done. ∗ Opportunistic reuse: This approach requires effort for

reuse. Library of reusable artifacts are created using existing assets and users take opportunity of this library.

∗ Systematic reuse: This approach deals with planning and developing reusable artifacts that can be of future need.

REUSE TYPES Cont…

Page 34: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ By extent of modification ∗ white-box

the internal structure of reusable artifact is given to the consumers ∗ black-box reuse

reusable artifact is not provided to consumers

∗ By-products

∗ source code, design, specifications, objects, text, and architectures

REUSE TYPES Cont…

Page 35: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗By scale ∗ Small Scale Reuse

∗ reuse algorithms or functions, classes, subroutines, package and so on.

∗ Medium Scale Reuse ∗ abstract data types (ADTs) ∗ unit of reuse is a suite of tightly inter-related functions

∗ Large Scale Reuse ∗ reuse subsystems ∗ unit of reuse is a suite of tightly inter-related classes or

ADTs ∗ reuse of design information e.g. software architectures,

design specifications,

REUSE TYPES Cont…

Page 36: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse

∗ technique used ∗ Analysis patterns: promotes reuse of domain knowledge

by introducing patterns already in analysis phase of the software life cycle.

∗ Design patterns: promotes reuse of design experiences. ∗ Frameworks: promotes reuse of design and semi-code. It

promises highest degree of reuse among all others. ∗ Commercial-Off-The-Shelf components

REUSE TYPES Cont…

Page 37: Banaras Hindu University - INFLIBNET Centreeacharya.inflibnet.ac.in/data-server/eacharya... · Banaras Hindu University . Lecture 1 Basic Issues in Software Reuse * software reuse