Software Reuse
Indu Sharma
HOD(CSE)
CPTC,Rajsamand
Introduction
 Today, complex, high quality computer-
based-systems must be built in a very
short time periods. This results in a
organized approach to reuse.
 Component-Based-Software-Engineering
(CBSE) is a process that emphasizes the
design and construction of computer-
based systems using reusable
components.
Types of Software Reuse
 Software component reuse, does not just mean the
reuse of code. It also includes the reuse of
specifications and designs.
 Types of Software reuse:
 Code components: functions, modules,
subsystems etc.
 Abstract Products: specifications, designs etc
 The potential gains from reusing specifications may
be greater than reusing code component. Code
contains low-level detail which may specialize it to
such extent that it cannot be reused. Designs or
specifications are more abstract and hence more
widely applicable.
Different levels of Reuse
 The reuse of software can be
considered at a no. of different levels:
i. Application system reuse: The whole of
an application system may be reused.
For this the software must be portable i.e.
it should execute on different platforms.
ii. Sub-system reuse: Major sub-systems of
an application may be reuse.
Different levels of Reuse
iii. Module or object reuse: Components of a
system representing a collection of
functions may be reuse. For eg., a C++
object implementing a binary tree may be
reused in different applications.
iv. Function reuse: Software components
which implement a single function, such
as mathematical functions, may be
reused.
Advantages of Reuse
 A systematic reuse in the development
process leads to the following advantages:
i. System reliability is increased: These
components have been tested in operational
systems and have therefore been exposed to
realistic operating conditions.
ii. Overall process risk is reduced: Less
uncertainty in the costs of reusing that
component than in the costs of development. It
reduces uncertainties in project cost estimation.
Advantages of Reuse
iii. Effective use can be made of specialists:
Instead of application specialists doing
the same work on different projects,
these specialists can develop reusable
components which encapsulate their
knowledge.
iv. Standard Compliance: Organizational
standards can be embodied in reusable
components. Eg. user interfaces.
Advantages of Reuse
v. Software development time can be
reduced: Reusing components speeds
up system production because both
development and validation time should
be reduced.
Design
System
Architecture
Specify
Components
Search for
reusable
components
Incorporate
discovered
components
How reuse can be incorporated into
the system development process?
Fig: Reuse in a standard development
process
The system designer completes a high-level design and
specifications of the components of that design. These
specifications are used to find components to reuse. These
may be incorporated at the architectural level or at more
detailed design levels.
Outline
System
Architecture
Search for
reusable
components
Modify requirements
according to
discovered
components
Architectural
design
How reuse can be incorporated into
the system development process?
Fig: Reuse driven development process
Search for
reusable
components
Specify system
components
based on reusable
components
How reuse can be incorporated into
the system development process?
 In second case reusability drives the design
process.
 Rather than design then search for reusable
components, engineers first search for
reusable components. They base their design
on these components
 Disadvantages of second approach:
 Requirements compromise
 The design may be less efficient than a special
purpose design.
Conditions for software
development with reuse
 There are three conditions for software
development with reuse:
i. It must be possible to find appropriate reusable
components. Organizations need a base of
properly catalogued and documented reusable
components.
ii. The reuser of the components must have
confidence that the components will behave as
specified and will be reliable. All components in
an organization’s catalogue should be certified
that they have reached some quality standards.
Conditions for software
development with reuse
iii. The components must have associated
documentation to help the reuser
understand them and adapt them to a
new application. The documentation
should include information about where
components have been reused and any
reuse problems which have been found.
Difficulties in development
with reuse
 The reuse costs may sometimes be greater
than the cost of re-implementing the
component.
 Some s/w engineers sometimes prefer to
rewrite components as they believe that they
can improve on the reusable components.
 Maintaining a component library and ensuring
that s/w developers can use this library can
be expensive. Our current techniques for
classifying, cataloguing, and retrieving s/w
components are immature.
Difficulties in development
with reuse
 Finding, understanding, and adapting reusable
components: Software components have to be
discovered in a library, understand, and
sometimes adapted to work in a new
environment. Engineers must be reasonably
confident of finding a component in library before
they will make include a component search as
part of their normal development process.
 CASE tools do not support development with
reuse. It may be difficult or impossible to
integrate these tools with a component library
system.
Reusability Enhancement
Initial component Reusable
component
Name
Generaliz-
ation
Operation
Generaliz-
ation
Exception
Generaliz-
ation
Component
Certification
Fig: The process of reusability enhancement
Reusability Enhancement
 Adapting a component to make it
reusable may involve making
difference types of changes:
i. Name Generalization: The names used
in the component may be modified so
that they are neutral rather than direct
reflection of some specific application
entity.
Reusability Enhancement
ii. Operation Generalization: Involve adding
operations to a component or removing
operations which are very specific to
some application domain.
iii. Exception Generalization: This may
involve checking each component to see
which exceptions it might generate and
including these operations in the
component interface.
Reusability Enhancement
 After the generalization the quality of
the generalized components should be
checked. It requires program
inspections or testing. The component
may be certified as having reached the
required quality standards.

Software resuse

  • 1.
  • 2.
    Introduction  Today, complex,high quality computer- based-systems must be built in a very short time periods. This results in a organized approach to reuse.  Component-Based-Software-Engineering (CBSE) is a process that emphasizes the design and construction of computer- based systems using reusable components.
  • 3.
    Types of SoftwareReuse  Software component reuse, does not just mean the reuse of code. It also includes the reuse of specifications and designs.  Types of Software reuse:  Code components: functions, modules, subsystems etc.  Abstract Products: specifications, designs etc  The potential gains from reusing specifications may be greater than reusing code component. Code contains low-level detail which may specialize it to such extent that it cannot be reused. Designs or specifications are more abstract and hence more widely applicable.
  • 4.
    Different levels ofReuse  The reuse of software can be considered at a no. of different levels: i. Application system reuse: The whole of an application system may be reused. For this the software must be portable i.e. it should execute on different platforms. ii. Sub-system reuse: Major sub-systems of an application may be reuse.
  • 5.
    Different levels ofReuse iii. Module or object reuse: Components of a system representing a collection of functions may be reuse. For eg., a C++ object implementing a binary tree may be reused in different applications. iv. Function reuse: Software components which implement a single function, such as mathematical functions, may be reused.
  • 6.
    Advantages of Reuse A systematic reuse in the development process leads to the following advantages: i. System reliability is increased: These components have been tested in operational systems and have therefore been exposed to realistic operating conditions. ii. Overall process risk is reduced: Less uncertainty in the costs of reusing that component than in the costs of development. It reduces uncertainties in project cost estimation.
  • 7.
    Advantages of Reuse iii.Effective use can be made of specialists: Instead of application specialists doing the same work on different projects, these specialists can develop reusable components which encapsulate their knowledge. iv. Standard Compliance: Organizational standards can be embodied in reusable components. Eg. user interfaces.
  • 8.
    Advantages of Reuse v.Software development time can be reduced: Reusing components speeds up system production because both development and validation time should be reduced.
  • 9.
    Design System Architecture Specify Components Search for reusable components Incorporate discovered components How reusecan be incorporated into the system development process? Fig: Reuse in a standard development process The system designer completes a high-level design and specifications of the components of that design. These specifications are used to find components to reuse. These may be incorporated at the architectural level or at more detailed design levels.
  • 10.
    Outline System Architecture Search for reusable components Modify requirements accordingto discovered components Architectural design How reuse can be incorporated into the system development process? Fig: Reuse driven development process Search for reusable components Specify system components based on reusable components
  • 11.
    How reuse canbe incorporated into the system development process?  In second case reusability drives the design process.  Rather than design then search for reusable components, engineers first search for reusable components. They base their design on these components  Disadvantages of second approach:  Requirements compromise  The design may be less efficient than a special purpose design.
  • 12.
    Conditions for software developmentwith reuse  There are three conditions for software development with reuse: i. It must be possible to find appropriate reusable components. Organizations need a base of properly catalogued and documented reusable components. ii. The reuser of the components must have confidence that the components will behave as specified and will be reliable. All components in an organization’s catalogue should be certified that they have reached some quality standards.
  • 13.
    Conditions for software developmentwith reuse iii. The components must have associated documentation to help the reuser understand them and adapt them to a new application. The documentation should include information about where components have been reused and any reuse problems which have been found.
  • 14.
    Difficulties in development withreuse  The reuse costs may sometimes be greater than the cost of re-implementing the component.  Some s/w engineers sometimes prefer to rewrite components as they believe that they can improve on the reusable components.  Maintaining a component library and ensuring that s/w developers can use this library can be expensive. Our current techniques for classifying, cataloguing, and retrieving s/w components are immature.
  • 15.
    Difficulties in development withreuse  Finding, understanding, and adapting reusable components: Software components have to be discovered in a library, understand, and sometimes adapted to work in a new environment. Engineers must be reasonably confident of finding a component in library before they will make include a component search as part of their normal development process.  CASE tools do not support development with reuse. It may be difficult or impossible to integrate these tools with a component library system.
  • 16.
    Reusability Enhancement Initial componentReusable component Name Generaliz- ation Operation Generaliz- ation Exception Generaliz- ation Component Certification Fig: The process of reusability enhancement
  • 17.
    Reusability Enhancement  Adaptinga component to make it reusable may involve making difference types of changes: i. Name Generalization: The names used in the component may be modified so that they are neutral rather than direct reflection of some specific application entity.
  • 18.
    Reusability Enhancement ii. OperationGeneralization: Involve adding operations to a component or removing operations which are very specific to some application domain. iii. Exception Generalization: This may involve checking each component to see which exceptions it might generate and including these operations in the component interface.
  • 19.
    Reusability Enhancement  Afterthe generalization the quality of the generalized components should be checked. It requires program inspections or testing. The component may be certified as having reached the required quality standards.