Slide 15.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Test process essentials Riitta Viitamäki,
Slide 2.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
Chapter 14 Maintaining Information Systems Modern Systems Analysis and Design Seventh Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 Postdelivery Maintenance Xiaojun Qi. 2 Why Postdelivery Maintenance Is Necessary Corrective maintenance: To correct residual faults –Analysis, design,
Software Configuration Management
Slide 1.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 16.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 9.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Planning and Estimating
Slide 1.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
Object-Oriented Analysis and Design Lecture 11 Maintenance (from Schach, “O-O and Classical Software Engineering”)
Slide 16.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
Software Quality Assurance
Chapter 16 Maintaining Information Systems
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 18 Maintaining.
Chapter 9 – Software Evolution and Maintenance
CSC 395 – Software Engineering Lecture 34: Post-delivery Maintenance -or- What’s Worse than Being a Code Monkey?
System Analysis and Design
Maintaining Information Systems Modern Systems Analysis and Design.
Comp 249 Programming Methodology Chapter 8 - Polymorphism Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia University, Montreal,
Slide 1.1 CHAPTER 1 INTRODUCTION TO SOFTWARE ENGINEERING.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Lecture 12 Maintenance CSCI – 3350 Software Engineering II Fall 2014 Bill Pine.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
This chapter is extracted from Sommerville’s slides. Text book chapter
Slide 16.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition,
Slide 10.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition,
Chapter 11 Maintaining the System System evolution Legacy systems Software rejuvenation.
© 2006 ITT Educational Services Inc. System Analysis for Software Engineers: Unit 3 Slide 1 Chapter 16 Maintaining Information Systems.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
THE DESIGN WORKFLOW  Object-oriented design  The design workflow  The test workflow: Design  CASE tools for design  Challenges of the design workflow.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development 3.
Historical Aspects Origin of software engineering –NATO study group coined the term in 1967 Software crisis –Low quality, schedule delay, and cost overrun.
Slide 20.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 18 Maintaining.
Slide 13.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Dr. DEVENDRA TAYAL– THE SCOPE OF SOFTWARE ENGINEERING.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
CS451 Software Implementation and Integration Yugi Lee STB #555 (816) Note: This lecture was designed.
1 Object-Oriented and Classical Software Engineering Object-Oriented and Classical Software Engineering.
CS451 Software Maintenance Yugi Lee STB #555 (816) Note: This lecture was designed based on Stephen Schach’s.
Configuration Management
Slide 12F.135 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Workflows Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach.
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill Stephen R. Schach 1.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 16 Maintaining Information Systems. Objectives:  Explain and contrast four types of system maintenance.  Describe factors affecting maintenance.
Chapter 8: Maintenance and Software Evolution Ronald J. Leach Copyright Ronald J. Leach, 1997, 2009, 2014,
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Chapter 14 Maintaining Information Systems
Software Configuration Management
Chapter 18 Maintaining Information Systems
8.4 Management of Postdelivery Maintenance
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach 1.
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach.
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Lecture 09:Software Testing
Maintaining Information Systems (SAD- 18)
Chapter 16 Maintaining Information Systems
Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
Chapter 18 Maintaining Information Systems
Presentation transcript:

Slide 15.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach

Slide 15.2 © The McGraw-Hill Companies, 2005 CHAPTER 15 POSTDELIVERY MAINTENANCE

Slide 15.3 © The McGraw-Hill Companies, 2005 Overview l Why postdelivery maintenance is necessary l What is required of postdelivery maintenance programmers? l Postdelivery maintenance mini case study l Management of postdelivery maintenance l Maintenance of object-oriented software l Postdelivery maintenance skills versus development skills l Reverse engineering l Testing during postdelivery maintenance

Slide 15.4 © The McGraw-Hill Companies, 2005 Overview (contd) l CASE tools for postdelivery maintenance l Metrics for postdelivery maintenance l Postdelivery maintenance: The Osbert Oglesby case study l Challenges of postdelivery maintenance

Slide 15.5 © The McGraw-Hill Companies, 2005 Postdelivery Maintenance l Postdelivery maintenance  Any change to any component of the product (including documentation) after it has passed the acceptance test l This is a short chapter  But the whole book is essentially on postdelivery maintenance l In this chapter we explain how to ensure that maintainability is not compromised during postdelivery maintenance

Slide 15.6 © The McGraw-Hill Companies, Why Postdelivery Maintenance Is Necessary l Corrective maintenance  To correct residual faults »Analysis, design, implementation, documentation, or any other type of faults

Slide 15.7 © The McGraw-Hill Companies, 2005 Why Postdelivery Maint. Is Necessary (contd) l Perfective maintenance  Client requests changes to improve product effectiveness »Add additional functionality »Make product run faster »Improve maintainability

Slide 15.8 © The McGraw-Hill Companies, 2005 Why Postdelivery Maint. Is Necessary (contd) l Adaptive maintenance  Responses to changes in the environment in which the product operates »The product is ported to a new compiler, operating system, and/or hardware »A change to the tax code »9-digit ZIP codes

Slide 15.9 © The McGraw-Hill Companies, What Is Required of Postdelivery Maintenance Programmers? l At least 67 percent of the total cost of a product accrues during postdelivery maintenance l Maintenance is a major income source l Nevertheless, even today many organizations assign maintenance to  Unsupervised beginners, and  Less competent programmers

Slide © The McGraw-Hill Companies, 2005 What is Required of Postd. Maint. Prog. (contd)? l Postdelivery maintenance is one of the most difficult aspects of software production because  Postdelivery maintenance incorporates aspects of all other workflows

Slide © The McGraw-Hill Companies, 2005 What is Required of Postd. Maint. Prog. (contd)? l Suppose a defect report is handed to a maintenance programmer  Recall that a “defect” is a generic term for a fault, failure, or error l What is the cause?  Nothing may be wrong  The user manual may be wrong, not the code  Usually, however, there is a fault in the code

Slide © The McGraw-Hill Companies, 2005 Corrective Maintenance l What tools does the maintenance programmer have to find the fault?  The defect report filed by user  The source code  And often nothing else

Slide © The McGraw-Hill Companies, 2005 Corrective Maintenance (contd)? l A maintenance programmer must therefore have superb debugging skills  The fault could lie anywhere within the product  The original cause of the fault might lie in the by now non-existent specifications or design documents

Slide © The McGraw-Hill Companies, 2005 Corrective Maintenance l Suppose that the maintenance programmer has located the fault l Problem:  How to fix it without introducing a regression fault

Slide © The McGraw-Hill Companies, 2005 Corrective Maintenance (contd) l How to minimize regression faults  Consult the detailed documentation for the product as a whole  Consult the detailed documentation for each individual module l What usually happens  There is no documentation at all, or  The documentation is incomplete, or  The documentation is faulty

Slide © The McGraw-Hill Companies, 2005 Corrective Maintenance (contd) l The programmer must deduce from the source code itself all the information needed to avoid introducing a regression fault l The programmer now changes the source code

Slide © The McGraw-Hill Companies, 2005 The Programmer Now Must l Test that the modification works correctly  Using specially constructed test cases l Check for regression faults  Using stored test data l Add the specially constructed test cases to the stored test data for future regression testing l Document all changes

Slide © The McGraw-Hill Companies, 2005 Corrective Maintenance (contd) l Major skills are required for corrective maintenance  Superb diagnostic skills  Superb testing skills  Superb documentation skills

Slide © The McGraw-Hill Companies, 2005 Adaptive and Perfective Maintenance l The maintenance programmer must go through the  Requirements  Specifications  Design  Implementation and integration workflows, using the existing product as a starting point

Slide © The McGraw-Hill Companies, 2005 Adaptive and Perfective Maintenance (contd) l When programs are developed  Specifications are produced by analysis experts  Designs are produced by design experts  Code is produced by programming experts l But a maintenance programmer must be expert in all three areas, and also in  Testing, and  Documentation

Slide © The McGraw-Hill Companies, 2005 Conclusion l No form of maintenance  Is a task for an unsupervised beginner, or  Should be done by a less skilled computer professional

Slide © The McGraw-Hill Companies, 2005 The Rewards of Maintenance l Maintenance is a thankless task in every way  Maintainers deal with dissatisfied users  If the user were happy, the product would not need maintenance  The user’s problems are often caused by the individuals who developed the product, not the maintainer  The code itself may be badly written  Postdelivery maintenance is despised by many software developers  Unless good maintenance service is provided, the client will take future development business elsewhere  Post delivery maintenance is the most challenging aspect of software production — and most thankless

Slide © The McGraw-Hill Companies, 2005 The Rewards of Maintenance (contd) l How can this situation be changed? l Managers must assign maintenance to their best programmers, and l Pay them accordingly

Slide © The McGraw-Hill Companies, Postdelivery Maintenance Mini Case Study l The Temperate Fruit Committee orders software to be developed for exactly 7 temperate fruits  Apples, apricots, cherries, nectarines, peaches, pears, and plums l It is extended to include kiwi fruit, with difficulty l The product now needs to handle 26 additional fruits l “Just to the same thing 26 times”

Slide © The McGraw-Hill Companies, 2005 Postdelivery Maintenance Case Study (contd) l Lessons to be learnt from this  The problem was caused by the developer, not the maintainer  A maintainer is often responsible for fixing other people’s mistakes  The client frequently does not understand that postdelivery maintenance can be difficult, or all but impossible  This is exacerbated when previous apparently similar perfective and adaptive maintenance tasks have been carried out  All software development activities must be performed with an eye on future postdelivery maintenance

Slide © The McGraw-Hill Companies, Management of Postdelivery Maintenance l Various issues regarding management of postdelivery maintenance are now considered

Slide © The McGraw-Hill Companies, Defect Reports l We need a mechanism for changing a product l If the product appears to function incorrectly, the user files a defect report  It must include enough information to enable the maintenance programmer to recreate the problem l Ideally, every defect should be fixed immediately  In practice, an immediate preliminary investigation is the best we can do

Slide © The McGraw-Hill Companies, 2005 Management of Postdelivery Mainten. (contd) l The maintenance programmer should first consult the defect report file l It contains  All reported defects not yet fixed, and  Suggestions for working around them

Slide © The McGraw-Hill Companies, 2005 If the Defect Has Been Previously Reported l Give the information in the defect report file to the user

Slide © The McGraw-Hill Companies, 2005 If it Is a New Defect l The maintenance programmer should try to find  The cause,  A way to fix it, and  A way to work around the problem l The new defect is now filed in the defect report file, together with supporting documentation  Listings  Designs  Manuals

Slide © The McGraw-Hill Companies, 2005 If it Is a New Defect (contd) l The file should also contain the client’s requests for perfective and adaptive maintenance  The contents of the file must be prioritized by the client  The next modification is the one with the highest priority l Copies of defect reports must be circulated to all  Including: An estimate of when the defect can be fixed l If the same failure occurs at another site, the user can determine  If it is possible to work around the defect, and  How long until it can be fixed

Slide © The McGraw-Hill Companies, 2005 Management of Postdelivery Mainten. (contd) l In an ideal world  We fix every defect immediately  Then we distribute the new version of the product to all the sites l In the real world  We distribute defect reports to all sites  We do not have the staff for instant maintenance  It is cheaper to make a number of changes at the same time, particularly if there are multiple sites

Slide © The McGraw-Hill Companies, Authorizing Changes to the Product l Corrective maintenance  Assign a maintenance programmer to determine the fault and its cause, then repair it  Test the fix, test the product as a whole (regression testing)  Update the documentation to reflect the changes made  Update the prologue comments to reflect »What was changed, »Why it was changed, »By whom, and »When

Slide © The McGraw-Hill Companies, 2005 Authorizing Changes to the Product (contd) l Adaptive and perfective maintenance  As with corrective maintenance, except there is no defect report  There is a change in requirements instead

Slide © The McGraw-Hill Companies, 2005 Authorizing Changes to the Product (contd) l What if the programmer has not tested the fix adequately?  Before the product is distributed, it must be tested by the SQA group l Postdelivery maintenance is extremely hard l Testing is difficult and time consuming  Performed by the SQA group

Slide © The McGraw-Hill Companies, 2005 Authorizing Changes to the Product (contd) l The technique of baselines and private copies must be followed l The programmer makes changes to private copies of code artifacts, tests them l The programmer freezes the previous version, and gives the modified version to SQA to test l SQA performs tests on the current baseline version of all code artifacts

Slide © The McGraw-Hill Companies, Ensuring Maintainability l Maintenance is not a one-time effort l We must plan for maintenance over the entire life cycle  Design workflow — use information-hiding techniques  Implementation workflow — select variable names meaningful to future maintenance programmers  Documentation must be complete and correct, and reflect the current version of every artifact

Slide © The McGraw-Hill Companies, 2005 Ensuring Maintainability (contd) l During postdelivery maintenance, maintainability must not be compromised  Always be conscious of the inevitable further maintenance l Principles leading to maintainability are equally applicable to postdelivery maintenance itself

Slide © The McGraw-Hill Companies, The Problem of Repeated Maintenance l The moving target problem is frustrating to the development team l Frequent changes have an adverse effect on the maintainability of the product

Slide © The McGraw-Hill Companies, 2005 The Moving Target Problem l The problem is exacerbated during postdelivery maintenance l The more changes there are  The more the product deviates from its original design  The more difficult further changes become  Documentation becomes even less reliable than usual  Regression testing files are not up to date  A total rewrite may be needed for further maintenance

Slide © The McGraw-Hill Companies, 2005 The Moving Target Problem (contd) l Apparent solution  Freeze the specifications once they have been signed off until delivery of the product  After each request for perfective maintenance, freeze the specifications for (say) 3 months or 1 year l In practice  The client can order changes the next day  If willing to pay the price, the client can order changes on a daily basis l “He who pays the piper calls the tune”

Slide © The McGraw-Hill Companies, 2005 Warning l It is no use implementing changes slowly l The relevant personnel are replaced l Nothing can be done if the person calling for repeated change has sufficient clout

Slide © The McGraw-Hill Companies, Maintenance of Object-Oriented Software l The object-oriented paradigm apparently promotes maintenance in four ways  The product consists of independent units  Encapsulation (conceptual independence)  Information hiding (physical independence)  Message-passing is the sole communication l The reality is somewhat different

Slide © The McGraw-Hill Companies, 2005 Maintenance of Object-Oriented Software (contd) l Three obstacles  The complete inheritance hierarchy can be large  The consequences of polymorphism and dynamic binding  The consequences of inheritance

Slide © The McGraw-Hill Companies, 2005 Size of the Inheritance Hierarchy Figure 15.1

Slide © The McGraw-Hill Companies, 2005 Size of Inheritance Hierarchy (contd) To find out what displayNode does in BalancedBinaryTree, we must scan the complete tree  The inheritance tree may be spread over the entire product  A far cry from “independent units” l Solution  A CASE tool can flatten the inheritance tree

Slide © The McGraw-Hill Companies, 2005 Polymorphism and Dynamic Binding The product fails on the invocation myFile.open Which version of open contains the fault?  A CASE tool cannot help (static tool)  We must trace Figure 15.2

Slide © The McGraw-Hill Companies, 2005 Polymorphism and Dynamic Binding (contd) l Polymorphism and dynamic binding can have  A positive effect on development, but  A negative effect on maintenance

Slide © The McGraw-Hill Companies, 2005 Consequences of Inheritance l Create a new subclass via inheritance l The new subclass  Does not affect any superclass, and  Does not affect any other subclass l Modify this new subclass  Again, no affect l Modify a superclass  All descendent subclasses are affected  “Fragile base class problem”

Slide © The McGraw-Hill Companies, 2005 Consequences of Inheritance (contd) l Inheritance can have  A positive effect on development, but  A negative effect on maintenance

Slide © The McGraw-Hill Companies, Postdelivery Maintenance versus Development Skills l The skills needed for maintenance include  The ability to determine the cause of failure of a large product »Also needed during integration and product testing  The ability to function effectively without adequate documentation »Documentation is rarely complete until delivery  Skills in analysis, design, implementation, and testing »All four activities are carried out during development

Slide © The McGraw-Hill Companies, 2005 Postdel. Mainten. vs. Development Skills (contd) l The skills needed for postdelivery maintenance are the same as those for the other workflows l Key Point  Maintenance programmers must not merely be skilled in a broad variety of areas, they must be highly skilled in all those areas  Specialization is impossible for the maintenance programmer l Postdelivery maintenance is the same as development, only more so

Slide © The McGraw-Hill Companies, Reverse Engineering l When the only documentation for postdelivery maintenance is the code itself  Start with the code  Recreate the design  Recreate the specifications (extremely hard)  CASE tools can help (flowcharters, other visual aids)

Slide © The McGraw-Hill Companies, 2005 Reverse Engineering (contd) l Reengineering  Reverse engineering, followed by forward engineering  Lower to higher to lower levels of abstraction l Restructuring  Improving the product without changing its functionality  Examples: »Prettyprinting »Structuring code »Improving maintainability »Restructuring (XP, agile processes)

Slide © The McGraw-Hill Companies, 2005 Reverse Engineering (contd) l What if we have only the executable code?  Treat the product as a black box  Deduce the specifications from the behavior of the current product

Slide © The McGraw-Hill Companies, Testing during Postdelivery Maintenance l Maintainers tend to view a product as a set of loosely related components  They were not involved in the development of the product l Regression testing is essential  Store test cases and their outcomes, modify as needed

Slide © The McGraw-Hill Companies, CASE Tools for Postdelivery Maintenance l Configuration-control tools are needed  Commercial tool »CCC  Open-source tool »CVS l Reengineering tools  Commercial tools »Rational Rose, Together  Open-source tool »Doxygen

Slide © The McGraw-Hill Companies, 2005 CASE Tools for Postdelivery Maintenance (contd) l Defect-tracking tools  Commercial tool »Rational ClearQuest  Open-source tool »Bugzilla

Slide © The McGraw-Hill Companies, Metrics for Postdelivery Maintenance l The activities of postdelivery maintenance are essentially those of development  Metrics for development workflows l Defect report metrics  Defect classifications  Defect status

Slide © The McGraw-Hill Companies, Postdelivery Maintenance: The Osbert Oglesby Case Study l Faults have been seeded in the source code  Correcting them has been left as an exercise (Problems through 15.16)

Slide © The McGraw-Hill Companies, Challenges of Postdelivery Maintenance l The chapter describes numerous challenges l The hardest challenge to solve  Maintenance is harder than development, but  Developers tend to look down maintainers, and  Are frequently paid more