37
Banaras Hindu University

Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

Embed Size (px)

DESCRIPTION

by Dr. Manjari Gupta Department of Computer Science Banaras Hindu University

Citation preview

Page 1: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

Banaras Hindu University

Page 2: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

A Course on

Software Reuse by Design Patterns and Frameworks

Page 3: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

by

Dr. Manjari GuptaDepartment of Computer Science

Banaras Hindu University

Page 4: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

Lecture 1

Basic Issues in Software Reuse

Page 5: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

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

Scope and necessity of software reuse

Page 6: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

Most reuse approaches based on object-oriented technology.

different kinds of reuse code, analysis, design, and architectures.

Software Reuse

Page 7: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

Formal Software Reuse introduced by Mcllroy at the NATO Software Engineering

Conference in 1968

Page 11: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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

Chicken and egg problem

Page 15: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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

Page 17: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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 reuseCont…

Page 27: Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

By-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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

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. A Course on Software Reuse by Design Patterns and Frameworks

Thank you