Software Reuse - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Software Reuse

Description:

Take components of one product in order to facilitate the development of a ... DCOM distributed COM. Dr. Ouyang, CS 441, Fall 2001. OMG's Solution ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 24
Provided by: youwen
Category:

less

Transcript and Presenter's Notes

Title: Software Reuse


1
Software Reuse
  • Take components of one product in order to
    facilitate the development of a different product
    with different functionality.
  • Accidental reuse the developers of a new
    product realize that a component of a previously
    developed product can be reused in the new
    product.
  • Deliberate reuse software components are
    constructed specifically with the potential
    future reuse in mind.

2
Advantage of Deliberate Reuse
  • The process of reuse is easier since the
    components are well documented.
  • The process of reuse is safer since the
    components are thoroughly tested.
  • The maintenance is easier since there exists a
    uniformity of style in those reusable components.
  • However, implementation of such components could
    be much more expensive.

3
Motivation
  • Make new software product faster, cheaper, and
    better.
  • Thousands of payroll programs and inventory
    programs.
  • Why re-invent the wheels?

4
Impediments to Reuse
  • Ego or NIH syndrome a routine cannot be any
    good unless I write it myself.
  • Quality concerns cant be sure if the routine
    may introduce faults into the product.
  • Retrieval problem e.g. 20,000 reusable
    components 125 of which are sort routines.
  • Expensive in making the reusable components.
  • Legal issues arisen with contract software.

5
Raytheon Missile System Division
  • Basic actions across many products sort data,
    edit or manipulate data, combine data, explode
    data, update data, and report on data.
  • Functional module reuse code fragment designed
    and coded for a specific purpose.
  • Program logic structure reuse a framework that
    many section of it can be filled in by using
    functional modules.
  • 40 60 of business application designs and
    modules could be standardized ad reused.

6
Toshiba Software Factory
  • Modules
  • Documentation of all kinds such as designs,
    specifications, contracts, and manuals.
  • Reusable components are examined by a committee
    and properly organized in a database for future
    retrieval.
  • Careful statistics are kept on the reuse rate of
    all components.

7
NASA Software
  • Four categories of modules (45 in the first two
    categories)
  • Reused without any changes
  • Reused with slight revision (lt 25)
  • Reused with major revision (gt25)
  • Developed from scratch
  • The reused modules are in general small, well
    documented, with simple interfaces and little I/O
    processing.

8
GTE Data Services
  • Management commitment to the reuse of source code
    modules
  • Cash incentives for each module accepted for
    possible reuse.
  • Royalties when the module was actually reused.
  • Increased management budget when project achieve
    high level of reuse.
  • It was not necessary to build a huge inventory of
    reusable components.
  • Emphasis was on large modules (10,000 LOC).

9
Hewlett-Packard
  • A product of 20,000 noncomment lines of C was
    developed and later reused.
  • Reduced fault rate
  • Increased productivity
  • Decreased delivery time
  • 11 additional cost of development
  • Integration costs of the new product were 19 of
    the cost of developing non-reusable product.

10
European Space Agency
  • A disaster of software reuse a program used for
    the Ariane 4 rocket was reused for the Ariane 5
    rocket.
  • Cause lack of exception handler for a
    out-of-range exception.
  • Why mathematical analysis had provided the such
    exception was impossible for the Ariane 4 rocket.
  • Software developed in one context must be
    retested when reused in another context.

11
Four Types of Design Reuse
  • Library or toolkit
  • Framework
  • Design pattern
  • Software architecture

12
Design Problems in OO
  • Finding Appropriate Objects
  • Determining Object Granularity
  • Specifying Object Interfaces
  • Specifying Object Implementations
  • Putting Reuse Mechanisms to Work
  • Relating Run-Time and Compile-Time Structures
  • Designing for Change

13
Design Patterns
  • Inspired by an architect Christopher Alexander
  • Describe a problem which occurs over and over
    again in our environment, and then describe the
    core of the solution to that problem, in such a
    way that you can use this solution a million
    times over, without ever doing it the same way
    twice.
  • Descriptions of communicating objects and classes
    that are customized to solve a general design
    problem in a particular context.

14
Essential Elements
  • Pattern Name Describe a design problem, its
    solutions, and consequences in a word or two.
  • Problem Describes when to apply the pattern.
  • Solution Describes the elements that make up
    the design, their relationships,
    responsibilities, and collaborations.
  • Consequences The results and trade-offs of
    applying the pattern.

15
Abstract Factory Patterns
16
An Example of Abstract Factory
17
Object Adapter Pattern
18
An Example of Adapter Pattern
19
Portability
  • A product is portable if it is significantly
    easier to modify the product as a whole in order
    to run it on another compiler/hardware/OS
    configuration than to recode it from scratch.
  • Hardware incompatibilities secondary storage
    drivers, different character codes
  • OS incompatibilities syntactic difference in
    job control languages (JCL), virtual memory
  • Numerical software incompatibilities
  • Compiler incompatibilities

20
How to Achieve Portability
  • Forbid programmers to use constructs that might
    cause problems when ported to another computer.
  • Isolate any necessary implementation-dependent
    pieces.
  • Use multiple level of abstraction.
  • Decision factors in language selection as well as
    OS selection.
  • Proper documentation identifying parts of the
    product that may be affected when porting.
  • Portable data format

21
Interoperability
  • Mutual cooperation of object code from different
    vendors, written in different languages and
    running on different platforms.
  • Object Linking and Embedding (OLE) designed by
    MS to support compound components.
  • Component Object Model (COM) use a common
    mechanism for all situations in which one
    component provides services to another component.
  • Common Object Request Broker Architecture (CORBA)
    use an object request broker (ORB) that allows
    a client to invoke a method of an object,
    irrespective of where the distributed system the
    object is located.

22
Microsofts Solutions
  • Object Linking and Embedding (OLE) designed by
    MS to support compound components.
  • Component Object Model (COM) use a common
    mechanism for all situations in which one
    component provides services to another component.
  • Every pieces of software is implemented as a COM
    component.
  • Each component has one or more interfaces, each
    of which supports one or more functions.
  • DCOM distributed COM.

23
OMGs Solution
  • The object management Group (OMG) is a consortium
    of vendors of object-oriented technology
    currently numbering over 500.
  • Common Object Request Broker Architecture (CORBA)
    an object request broker (ORB) that allows a
    client to invoke a method of an object,
    irrespective of where the distributed system the
    object is located.
Write a Comment
User Comments (0)
About PowerShow.com