Reusability, Portability, and Interoperability Reuse Concepts

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Reusability, Portability, and

Reuse Concepts
Interoperability
• “If reinventing the wheel were a criminal • Portable
offense, many software professionals would be – Easily modifying a product as a whole to run under
languishing in jail”[Schach 2001] another compiler, OS, or hardware architecture
• Reuse
– Using components of one product to facilitate the
development of another product

Ch8 Copyright © 2004 by Eugean 1 Ch8 Copyright © 2004 by Eugean 2


Hacopians Hacopians

Reuse Concepts Types of Reuse


• Reusable components • Accidental reuse (Opportunistic reuse)
– Code fragments – Developers realize that components of a previously
– Modules developed product can be reused in the new product
– Design • Deliberate reuse (Systematic reuse)
– Part of a manual – Using software components specifically constructed
– Set of test cases or test data for future reuse
– Duration
– Cost estimates
Ch8 Copyright © 2004 by Eugean 3 Ch8 Copyright © 2004 by Eugean 4
Hacopians Hacopians

1
Types of Reuse Types of Reuse
• Advantage of Deliberate reuse versus • Disadvantage of Deliberate reuse versus
Accidental reuse Accidental reuse
– Components are designed and constructed specially – Developing reusable product can be
for use in future developments • Expensive
– Easy to reuse • Time consuming to
– Safe to reuse – Design
– Robust – Implement
– Well documented – Test
– Thoroughly tested – Document
– Makes maintenance easier
• No guarantee the component will be reused
Ch8 Copyright © 2004 by Eugean 5 Ch8 Copyright © 2004 by Eugean 6
Hacopians Hacopians

Impediments to Reuse Impediments to Reuse


• Software professionals would like to rewrite a • Developers would be willing to reuse a module
module rather than reuse an existing module it they are assured it will not introduce faults
– I can make a better product into their product
– Not Invented Here (NIH) syndrome – Every software professional has seen bad code
– How to solve this problem? – How to solve this problem?
• management can offer incentives for reuse • Exhaustively test the reusable modules before making
them available for reuse

Ch8 Copyright © 2004 by Eugean 7 Ch8 Copyright © 2004 by Eugean 8


Hacopians Hacopians

2
Impediments to Reuse Impediments to Reuse
• Organizing and storing reusable modules are • Reuse is expensive
difficult – Three costs are involved in reuse
– Developers must find modules faster than they can • Cost of defining and implementing reuse process
develop such modules • Cost of making it reusable
– How to solve this problem? • Cost of reusing it
• Use CASE tools

Ch8 Copyright © 2004 by Eugean 9 Ch8 Copyright © 2004 by Eugean 10


Hacopians Hacopians

Impediments to Reuse Impediments to Reuse


• Legal issues of reuse • Using Commercial Off The Shelf (COTS)
– Legal issues arise with contracted software products
• The software belongs to the client – Source code is not distributed to the client
• Reusing modules from one client for another constitutes – Products using COTS components have limited
copyright. extensibility and modifiability
– These legal issues donot arise for in-house
development

Ch8 Copyright © 2004 by Eugean 11 Ch8 Copyright © 2004 by Eugean 12


Hacopians Hacopians

3
Object and Reuse Object and Reuse
• Composit/structured design (C/SD) states: • Modules with information cohesion are better
– Modules with functional cohesion are candidates candidates for reuse
for reuse – A module that represents a real world entity
• Modules with functional cohesion perform one task – A module that contains data and the action that
• Disadvantage: operates on the data
– The data must be reused with the module
» If the data is not identical in the new project the data or the – Object (instance of a class) is such a module
functionality of the module must change – If Object -Oriented paradigm is utilized correctly,
the resulting object has information cohesion
• Results in reuse
Ch8 Copyright © 2004 by Eugean 13 Ch8 Copyright © 2004 by Eugean 14
Hacopians Hacopians

Design Reuse Application Framework


• An engineer realizes that a module or class can • Incorporates the control logic of a design
be reused from a previous project • Reusing the application framework results in
• This type of reuse happens in an organization faster product development
that produces similar applications – Less design work
– Banking • More of the design is reused
– Spacecraft – Portions reused are harder to design
• Libraries are available for scientific
applications such as LAPACK++
Ch8 Copyright © 2004 by Eugean 15 Ch8 Copyright © 2004 by Eugean 16
Hacopians Hacopians

4
Design Patterns Software Architecture
• A solution to a general design problem in the • The architecture of a software product may be:
form of a set of interacting classes that have to – Object -Oriented
be customized to create a specific design – Pipes and filters (Unix components)
[Schach 2001] – Client-server

Ch8 Copyright © 2004 by Eugean 17 Ch8 Copyright © 2004 by Eugean 18


Hacopians Hacopians

Reuse and Maintenance Portability


• Traditionally reuse prompts shorter • A product that is significantly less expensive to
development time adapt to a new computer system than to write
• For every $1 spent on development $2 is spent from scratch
on maintenance – The strategy is:
• To ensure product as a whole can be adapted easily to run
• Another important reason for reuse is to reduce on a variety of different hardware-OS
the time and cost of maintenance • Some of the cost can be recouped
• A product written in JAVA is a such product

Ch8 Copyright © 2004 by Eugean 19 Ch8 Copyright © 2004 by Eugean 20


Hacopians Hacopians

5
Portability Interoperability
• Incompatibilities • Mutual cooperation of object code from
– Hardware different vendors, written in different languages
– Operating system and running on different platforms
– Numerical software – Component Object Module (COM)
– Compiler – Common Object Request Broker Architecture
(CORBA)

Ch8 Copyright © 2004 by Eugean 21 Ch8 Copyright © 2004 by Eugean 22


Hacopians Hacopians

You might also like