Slide 8.1 © The McGraw-Hill Companies, 2007 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach.

Slides:



Advertisements
Similar presentations
Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Advertisements

© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
Slide 7A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
REUSABILITY, PORTABILITY,
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Software: Systems and Application Software
Object-Oriented Analysis and Design Lecture 12 Reusability, Portability, and Interoperability (from Schach, “O-O and Classical Software Engineering”)
Software Evolution Managing the processes of software system change
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
1 Reusability and Portability Xiaojun Qi. 2 Reuse Concepts Reuse is the use of components of one product to facilitate the development of a different.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Slide 1.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
Soft. Eng. II, Spring 02Dr Driss Kettani, from I. Sommerville1 CSC-3325: Chapter 6 Title : The Software Reuse Reading: I. Sommerville, Chap. 20.
Reusability and Portability Chapter 8 CSCI Reusability and Portability  The length of the development process is critical.  No matter how high.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Slide 14.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Course Instructor: Aisha Azeem
Chapter 1 Introduction to Databases
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
1 ENG236: Introduction (1) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Introduction to Databases and Database Languages
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
2 1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Introduction to Computer Programming itc-314
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Slide 18.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition,
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Slide 8.1 Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented Software Engineering WCB/McGraw-Hill, 2008 Stephen R.
Slide 8.1 CHAPTER 8 REUSABILITY AND PORTABILITY. Slide 8.2 Overview l Reuse concepts l Impediments to reuse l Reuse case studies l Objects and reuse l.
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
CHAPTER FOUR COMPUTER SOFTWARE.
Architecture for a Database System
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
CSC 395 – Software Engineering Lecture 12: Reusability –or– Programming was Bjarne Again.
Visual C++ Programming: Concepts and Projects
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Cohesion and Coupling CS 4311
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Information Systems Engineering. Lecture Outline Information Systems Architecture Information System Architecture components Information Engineering Phases.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
Slide 20.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
1 Chapter 1 Introduction to Databases Transparencies.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
Slide 13.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
Java Fundamentals Usman Ependi UBD
Slide 8.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill,
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet and the World Wide Web Outline 1.1Introduction 1.2What.
February 8, 2006copyright Thomas Pole , all rights reserved 1 Lecture 3: Reusable Software Packaging: Source Code and Text Chapter 2: Dealing.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 1.
A computer contains two major sets of tools, software and hardware. Software is generally divided into Systems software and Applications software. Systems.
CHAPTER 1.1 INTRODUCTION TO COMPUTERS AND C++ Dr. Shady Yehia Elmashad.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Slide 7B.31 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach 1.
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Chapter 2: The Linux System Part 1
Outline Chapter 2 (cont) OS Design OS structure
Presentation transcript:

Slide 8.1 © The McGraw-Hill Companies, 2007 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach

Slide 8.2 © The McGraw-Hill Companies, 2007 CHAPTER 8 REUSABILITY AND PORTABILITY

Slide 8.3 © The McGraw-Hill Companies, 2007 Overview  Reuse concepts  Impediments to reuse  Reuse case studies  Objects and reuse  Reuse during design and implementation  Reuse and postdelivery maintenance  Portability  Why portability?  Techniques for achieving portability

Slide 8.4 © The McGraw-Hill Companies, Reuse Concepts  Reuse is the use of components of one product to facilitate the development of a different product with different functionality

Slide 8.5 © The McGraw-Hill Companies, 2007 The Two Types of Reuse  Opportunistic (accidental) reuse  First, the product is built  Then, parts are put into the part database for reuse  Systematic (deliberate) reuse  First, reusable parts are constructed  Then, products are built using these parts

Slide 8.6 © The McGraw-Hill Companies, 2007 Why Reuse?  To get products to the market faster  There is no need to design, implement, test, and document a reused component  On average, only 15% of new code serves an original purpose  In principle, 85% could be standardized and reused  In practice, reuse rates of no more than 40% are achieved  Why do so few organizations employ reuse?

Slide 8.7 © The McGraw-Hill Companies, Impediments to Reuse  Not invented here (NIH) syndrome  Concerns about faults in potentially reusable routines  Storage–retrieval issues

Slide 8.8 © The McGraw-Hill Companies, 2007 Impediments to Reuse (contd)  Cost of reuse  The cost of making an item reusable  The cost of reusing the item  The cost of defining and implementing a reuse process  Legal issues (contract software only)  Lack of source code for COTS components  The first four impediments can be overcome

Slide 8.9 © The McGraw-Hill Companies, Reuse Case Studies  The first case study took place between 1976 and 1982  Reuse mechanism used for COBOL design  Identical to what we use today for object-oriented application frameworks

Slide 8.10 © The McGraw-Hill Companies, Raytheon Missile Systems Division  Data-processing software  Systematic reuse of  Designs 6 code templates  COBOL code 3200 reusable modules Figure 8.1

Slide 8.11 © The McGraw-Hill Companies, 2007 Raytheon Missile Systems Division (contd)  Reuse rate of 60% was obtained  Frameworks (“COBOL program logic structures”) were reused  Paragraphs were filled in by functional modules  Design and coding were quicker

Slide 8.12 © The McGraw-Hill Companies, 2007 Raytheon Missile Systems Division (contd)  By 1983, there was a 50% increase in productivity  Logic structures had been reused over 5500 times  About 60% of code consisted of functional modules  Raytheon hoped that maintenance costs would be reduced 60 to 80%  Unfortunately, the division was closed before the data could be obtained

Slide 8.13 © The McGraw-Hill Companies, European Space Agency  Ariane 5 rocket blew up 37 seconds after lift-off  Cost: $500 million  Reason: An attempt was made to convert a 64-bit integer into a 16-bit unsigned integer  The Ada exception handler was omitted  The on-board computers crashed, and so did the rocket

Slide 8.14 © The McGraw-Hill Companies, 2007 The Conversion was Unnecessary  Computations on the inertial reference system can stop 9 seconds before lift-off  But if there is a subsequent hold in the countdown, it takes several hours to reset the inertial reference system  Computations therefore continue 50 seconds into the flight

Slide 8.15 © The McGraw-Hill Companies, 2007 The Cause of the Problem  Ten years before, it was mathematically proven that overflow was impossible — on the Ariane 4  Because of performance constraints, conversions that could not lead to overflow were left unprotected  The software was used, unchanged and untested, on the Ariane 5  However, the assumptions for the Ariane 4 did not hold for the Ariane 5

Slide 8.16 © The McGraw-Hill Companies, 2007 European Space Agency (contd)  Lesson:  Software developed in one context needs to be retested when integrated into another context

Slide 8.17 © The McGraw-Hill Companies, Objects and Reuse  Claim of CS/D  An ideal module has functional cohesion  Problem  The data on which the module operates  We cannot reuse a module unless the data are identical

Slide 8.18 © The McGraw-Hill Companies, 2007 Objects and Reuse (contd)  Claim of CS/D:  The next best type of module has informational cohesion  This is an object (an instance of a class)  An object comprises both data and action  This promotes reuse

Slide 8.19 © The McGraw-Hill Companies, Reuse During Design and Implementation  Various types of design reuse can be achieved  Some can be carried forward into implementation

Slide 8.20 © The McGraw-Hill Companies, Design Reuse  Opportunistic reuse of designs is common when an organization develops software in only one application domain

Slide 8.21 © The McGraw-Hill Companies, 2007 Library or Toolkit  A set of reusable routines  Examples:  Scientific software  GUI class library or toolkit  The user is responsible for the control logic (white in figure) Figure 8.2(a)

Slide 8.22 © The McGraw-Hill Companies, Application Framework  A framework incorporates the control logic of the design  The user inserts application-specific routines in the “hot spots” (white in figure) Figure 8.2(b)

Slide 8.23 © The McGraw-Hill Companies, Application Framework  Faster than reusing a toolkit  More of the design is reused  The logic is usually harder to design than the operations  Example:  IBM’s Websphere Formerly: e-Components, San Francisco Utilizes Enterprise JavaBeans (classes that provide services for clients distributed throughout a network)

Slide 8.24 © The McGraw-Hill Companies, Design Patterns  A pattern is a solution to a general design problem  In the form of a set of interacting classes  The classes need to be customized (white in figure) Figure 8.2(c)

Slide 8.25 © The McGraw-Hill Companies, 2007 Widget Generator  We want a program that will generate widgets that can run under different operating systems Figure 8.3

Slide 8.26 © The McGraw-Hill Companies, 2007 Abstract Factory Pattern  Abstract classes and abstract (virtual) methods  The interfaces between the client and the generator are abstract  The application program is uncoupled from the specific operating system Figure 8.4

Slide 8.27 © The McGraw-Hill Companies, Software Architecture  Encompasses a wide variety of design issues, including:  Organization in terms of components  How those components interact

Slide 8.28 © The McGraw-Hill Companies, 2007 Software Architecture (contd)  An architecture consisting of  A toolkit  A framework, and  Three design patterns Figure 8.2(d)

Slide 8.29 © The McGraw-Hill Companies, 2007 Reuse of Software Architecture  Architecture reuse can lead to large-scale reuse  One mechanism:  Software product lines  Case study:  Firmware for Hewlett-Packard printers ( ) Person–hours to develop firmware decreased by a factor of 4 Time to develop firmware decreased by a factor of 3 Reuse increased to over 70% of components

Slide 8.30 © The McGraw-Hill Companies, Reuse and Maintenance  Reuse impacts maintenance more than development  Assumptions  30% of entire product reused unchanged  10% reused changed

Slide 8.31 © The McGraw-Hill Companies, 2007 Figure 8.5 Results  Savings during maintenance are nearly 18%  Savings during development are about 9.3%

Slide 8.32 © The McGraw-Hill Companies, Portability  Product P  Compiled by compiler C 1, then runs on machine M 1 under operating system O 1  Need product P', functionally equivalent to P  Compiled by compiler C 2, then runs on machine M 2 under operating system O 2  P is portable if it is cheaper to convert P into P' than to write P' from scratch

Slide 8.33 © The McGraw-Hill Companies, Hardware Incompatibilities  Storage media incompatibilities  Example: Zip vs. DAT  Character code incompatibilities  Example: EBCDIC vs. ASCII  Word size

Slide 8.34 © The McGraw-Hill Companies, 2007 Hardware Incompatibilities (contd)  IBM System/ series  The most successful line of computers ever  Full upward compatibility

Slide 8.35 © The McGraw-Hill Companies, Operating System Incompatibilities  Job control languages (JCL) can be vastly different  Syntactic differences  Virtual memory vs. overlays

Slide 8.36 © The McGraw-Hill Companies, Numerical Software Incompatibilities  Differences in word size can affect accuracy  No problems with  Java  Ada

Slide 8.37 © The McGraw-Hill Companies, Compiler Incompatibilities  FORTRAN standard is not enforced  COBOL standard permits subsets, supersets  ANSI C standard (1989)  Most compilers use the pcc front end  The lint processor aids portability  ANSI C++ standard (1998)

Slide 8.38 © The McGraw-Hill Companies, 2007 Language Incompatibilities (contd)  Ada standard — the only successful language standard  First enforced legally (via trademarking)  Then by economic forces  Java is still evolving  Sun copyrighted the name to ensure standardization

Slide 8.39 © The McGraw-Hill Companies, Why Portability?  Is there any point in porting software?  Incompatibilities  One-off software  Selling company-specific software may give a competitor a huge advantage

Slide 8.40 © The McGraw-Hill Companies, 2007 Why Portability? (contd)  On the contrary, portability is essential  Good software lasts 15 years or more  Hardware is changed every 4 years  Upwardly compatible hardware works  But it may not be cost effective  Portability can lead to increased profits  Multiple copy software  Documentation (especially manuals) must also be portable

Slide 8.41 © The McGraw-Hill Companies, Techniques for Achieving Portability  Obvious technique  Use standard constructs of a popular high-level language  But how is a portable operating system to be written?

Slide 8.42 © The McGraw-Hill Companies, Portable System Software  Isolate implementation-dependent pieces  Example: UNIX kernel, device-drivers  Utilize levels of abstraction  Example: Graphical display routines

Slide 8.43 © The McGraw-Hill Companies, Portable Application Software  Use a popular programming language  Use a popular operating system  Adhere strictly to language standards  Avoid numerical incompatibilities  Document meticulously

Slide 8.44 © The McGraw-Hill Companies, Portable Data  File formats are often operating system-dependent  Porting structured data  Construct a sequential (unstructured) file and port it  Reconstruct the structured file on the target machine  This may be nontrivial for complex database models

Slide 8.45 © The McGraw-Hill Companies, 2007 Strengths of and Impediments to Reuse and Portability Figure 8.6