Software Reengineering SEIILecture 27 Dr Muzafar Khan Assistant

  • Slides: 21
Download presentation
Software Reengineering SEII-Lecture 27 Dr. Muzafar Khan Assistant Professor Department of Computer Science CIIT,

Software Reengineering SEII-Lecture 27 Dr. Muzafar Khan Assistant Professor Department of Computer Science CIIT, Islamabad.

Recap • Unified theory of software evolution • Reengineering – Business process reengineering and

Recap • Unified theory of software evolution • Reengineering – Business process reengineering and software reengineering • BPR model – Business definition, process identification, Process evaluation, process specification and design, prototyping, refinement and instantiation • Software reengineering process model – Inventory analysis, document restructuring, reverse engineering, code restructuring, data restructuring, forward engineering • Reverse engineering 2

Restructuring • Modification of source code and/or data • In general, no modification of

Restructuring • Modification of source code and/or data • In general, no modification of all program architecture • Focus on design details of individual modules and local data structure • If it involves program architecture, it becomes forward engineering • Restructuring occurs when the basic architecture is solid 3

Code Restructuring • Better design to perform the same function • Different techniques –

Code Restructuring • Better design to perform the same function • Different techniques – Warnier’s logical simplification techniques • Boolean algebra • Conversion of “spaghetti-bowl” code into structured program – Reengineering tools • Resource exchange diagram maps program module and resources • Program architecture is restructured to minimize coupling 4

Data Restructuring • Analysis of source code prior to data restructuring • Data definitions,

Data Restructuring • Analysis of source code prior to data restructuring • Data definitions, file descriptions, I/O, and interface descriptions are evaluated • Objective is to extract data related information • It is also called data analysis • Data redesign – Data record standardization – Data name rationalization – Physical modifications to existing data structures 5

Forward Engineering [1/4] • Consider an example – – – “spaghetti bowl” code Modules

Forward Engineering [1/4] • Consider an example – – – “spaghetti bowl” code Modules are 2000 statements long Few meaningful comment lines 290, 000 statements No other documentation • Modification options – – Continue the ad hoc design Try to understand inner workings of the program Redesign, recode, and test the relevant portions Complete redesign, recode, and test • No single “correct” choice 6

Forward Engineering [2/4] • Do not wait for maintenance request • Select a program

Forward Engineering [2/4] • Do not wait for maintenance request • Select a program that – Will remain in use for preselected number of years – Is currently being used successfully – Is likely to undergo major modifications – Option 2, 3, and 4 should be applied • Why we redevelop – The cost to maintain one line of source code may be 20 to 40 times the cost of initial development of that line 7

Forward Engineering [3/4] – Redesign of the software architecture (program and/or data structure), using

Forward Engineering [3/4] – Redesign of the software architecture (program and/or data structure), using modern design concepts, can greatly facilitate future maintenance – Because a prototype of the software already exists, development productivity should be much higher than average – The user now has experience with the software. Therefore, new requirements and the direction of change can be ascertained with greater ease – Automated tools for reengineering will facilitate some parts of the job – A complete software configuration (documents, programs, and data) will exist upon completion of preventive maintenance 8

Forward Engineering [4/4] • Consider a large organization – 500 -2000 production programs –

Forward Engineering [4/4] • Consider a large organization – 500 -2000 production programs – Ranked based on the importance – Reviewed for the possible candidates • Forward engineering process applies SE principles, concepts, and methods • It does not simply re-create a modern equivalent program of an older version • If focuses on the use of new user and technology requirements 9

Forward Engineering for Client. Server Architectures [1/2] • Many mainframe applications are reengineered to

Forward Engineering for Client. Server Architectures [1/2] • Many mainframe applications are reengineered to accommodate client-server architectures Application functionality migrates to each client computer New GUI interfaces are implemented at the client sites Database functions are allocated to the server Specialized functionality (e. g. compute-intensive analysis) may remain at the server site – New communications, security, archiving, and control requirements must be established at both the client and server sites – – • It requires business reengineering, software reengineering, and enterprise network infrastructure 10

Forward Engineering for Client. Server Architectures [2/2] • It starts with thorough analysis of

Forward Engineering for Client. Server Architectures [2/2] • It starts with thorough analysis of the business environment • Three layers of abstraction can be identified • Database layer • Business rules layer • Client applications layer 11

Forward Engineering for Object. Oriented Architectures • Choice of many organizations • Some applications

Forward Engineering for Object. Oriented Architectures • Choice of many organizations • Some applications remain “as is” but some reengineered • Appropriate data, functional, and behavioral models are created by reverse engineering • If extended functionality/behavior is required, use cases are also created • Class hierarchies, object-relationship models, objectbehavior models, and subsystems are defined • Component library can be used if exists for that domain • Otherwise algorithms and data structures may be reused 12

Economics of Reengineering [1/3] • Reengineering needs resources • Resources are limited that may

Economics of Reengineering [1/3] • Reengineering needs resources • Resources are limited that may be used for other business purposes • Cost-benefit analysis • Nine parameters are proposed • P 1 = current annual maintenance cost for an application • P 2 = current annual operations cost for an application • P 3 = current annual business value of an application • P 4 = predicted annual maintenance cost after reengineering • P 5 = predicted annual operations cost after reengineering 13

Economics of Reengineering [2/3] • P 6 = predicted annual business value after reengineering

Economics of Reengineering [2/3] • P 6 = predicted annual business value after reengineering • P 7 = estimated reengineering costs • P 8 = estimated reengineering calendar time • P 9 = reengineering risk factor • L = expected life of the system • Cost associated with continuing maintenance Cmaint = [P 3 – (P 1 + P 2)] * L 14

Economics of Reengineering [3/3] • Cost associated with reengineering Creeng = P 6 +

Economics of Reengineering [3/3] • Cost associated with reengineering Creeng = P 6 + (P 4 + P 5) * (L – P 8) – (P 7 * P 9) • Overall benefit of reengineering Cost benefit = Creeng – Cmaint • It should be for high-priority applications • Highest cost-benefit applications can be targeted • Others can be postponed until resources are available 15

Software Reuse [1/3] • Reuse-based software engineering is a strategy • Originally, it was

Software Reuse [1/3] • Reuse-based software engineering is a strategy • Originally, it was started as development strategy • Factors – Lower software production and maintenance costs – Faster delivery of systems – Improved software quality • Software is a valuable asset for an organization • Reuse to increase return on investment • Availability of reuse software is also dramatically increased – Open source movement – Organizations provide reusable components – Standards help to develop reusable general services 16

Software Reuse [2/3] • Application system reuse – The whole application may be reused

Software Reuse [2/3] • Application system reuse – The whole application may be reused – Application families with a common architecture • Component reuse – Subsystems to single objects – Example: pattern matching system (text-process system) may be used in a database management system • Object and function reuse – Component for a single function / an object class – Standard libraries • Concept reuse 17

Software Reuse [3/3] • Software development processes should be adapted for reuse strategy •

Software Reuse [3/3] • Software development processes should be adapted for reuse strategy • Requirements refinement stage • Design and implementation stages may include explicit activities • Software reuse is more effective when planned as an organization-wide reuse program – Creation of reusable assets – Adaptation of development processes • Japanese industry is quite mature in reuse 18

Benefits of Software Reuse [1/2] • Increased dependability – Tested software – More reliable

Benefits of Software Reuse [1/2] • Increased dependability – Tested software – More reliable • Reduced process risk – Cost of existing software is already known – Margin of error is reduced in cost estimation • Effective use of specialists – No reinvent the wheel – Domain specialist can encapsulate their knowledge 19

Benefits of Software Reuse [2/2] • Standard compliance – User interface standards – Fewer

Benefits of Software Reuse [2/2] • Standard compliance – User interface standards – Fewer mistakes • Accelerated development – Time to market – Speed up system production 20

Summary • Restructuring – Code restructuring, data restructuring • Forward engineering – Client-server architectures,

Summary • Restructuring – Code restructuring, data restructuring • Forward engineering – Client-server architectures, object-oriented architectures • Economics of reengineering – Cost benefit analysis • Software reuse – Benefits of reuse 21