software development through software reuse, case tools,

40
Software Development Through Software Reuse, CASE tools, Lecture 8

Upload: dava

Post on 25-Feb-2016

45 views

Category:

Documents


0 download

DESCRIPTION

Software Development Through Software Reuse, CASE tools, . Lecture 8 . Software Reuse . In most engineering disciplines, systems are designed by composing existing components that have been used in other systems. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Software Development  Through  Software Reuse, CASE tools,

Software Development Through

Software Reuse, CASE tools,

Lecture 8

Page 2: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 2

Software Reuse • In most engineering disciplines, systems are

designed by composing existing components that have been used in other systems.– Software engineering has been more focused on original

development but it is now recognised that to achieve better software, more quickly and at lower cost, we need a design process that is based on systematic software reuse.

– There has been a major switch to reuse-based development over the past 10 years.

• “Reuse” means to “use” something again, preferably “as-is”.– In the SE context, software reuse is [Pressman97]:

• ...any procedure that produces (or helps produce) a system by reusing something from a previous development effort.

Page 3: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 3

Software Reuse • Software reuse claims to improve:

• Quality: • Error fixes accumulate from reuse to reuse

• Reliability: • Well-tested components increase the reliability.

• Productivity: • Less code has to be developed.

• Maintenance cost: • Fewer defects, less maintainability.

• Time to market: • Reduction of the time

• Experience makes it clear that reuse is not always entirely safe. • The explosion of the Ariane Five rocket is a vivid

reminder to the developers of safety-critical software of what can happen if software is reused without proper care. • The software used on the Ariane Five was

originally intended for the Ariane Four and worked properly on that platform.

• However, the launch characteristics of the Ariane Four and Five rockets were different.

• Improper reuse of the Ariane Four software caused the Ariane Five to explode.

Page 4: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 4

Reuse Terminologies• Library

– Set of individual functions or classes that can be reused mostly independently (functional reuse).

• "a discrete, stand-alone, context independent part of a solution“• C++ Standard Template Library (STL)

• Framework– A unit of design reuse; coupling several library classes.

• "an abstract design for a particular kind of application"

• Component– Independent unit of reuse.– Technical definition by given set of import and export mechanism.– Interface is usually restricted to an in/out mechanism.

• Automated parts (J2EE, interface query COM)

• API: Usually a framework plus library parts (for instance JDK).

Page 5: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 5

Reused based Software Engineering• An Approach to maximize the reuse of existing software

– Application system reuse• The whole of an application system may be reused either by

incorporating it without change into other systems (COTS reuse) or by developing application families.

– Component reuse• Components of an application from sub-systems to single objects may

be reused. – A pattern matching system developed as pert of text processing system,

can be reused in database management system – Object and function reuse

• Software components that implement a single well-defined object or function may be reused.

– Mathematical function , Object class using standard libraries

• Software systems and Components are potentially reusable entities – Expensive to modify for new situation

Page 6: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 6

Software Reusability Framework

Page 7: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 7

Reuse – General issues • Software Reuse definition

– Software reuse is the process whereby an organization defines a set of systematic operating procedures to specify, produce, classify, retrieve, and adapt software artifacts for the purpose of using them in its development activities.

• Black box and white box reuse– Black-box reuse aims to integrate assets into a target

system without modification of the original assets. – White-box reuse, assets may be modified before integration

into target system. • White box reuse is easier to realize, but yields a smaller benefit than

black box reuse because more effort is required for understanding the asset and for redoing validation (e.g. testing) for the modified asset.

Page 8: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 8

CBSE Vs Reuse • From business perspective, CBSE and Reuse have the same goals:

increasing productivity and quality.– Reuse aim at the dissemination of knowledge within an organization.– CBSE approaches focus on improving productivity by reduction of

development time and by improving flexibility of systems

Page 9: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 9

Reuse – General issues • Economic issues

– Reuse based approaches emphasize cost reduction as a means of increasing productivity.

• From an accounting perspective there are different ways of achieving this.

– Paying back of the development and maintenance cost of assets over multiple projects.

– Avoidance of cost in later projects through the use of results of earlier projects.

– Consumer benefits: Reduced cost of • Design, Document, Implement, • Design tests, unit test, document tests, implement & execute tests • Maintenance, tools, equipment

– Potential additional benefits are • Improved sales due to increased quality or shorter time-to-market, • Delivering product early.

Page 10: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 10

Reuse- Technical Issues • Reuse Methodology

– The reuse activity is divided into six major steps performed at each phase in preparation for the next phase.

– These steps are:• Developing a reuse plan or strategy after studying the problem

and available solutions to the problem,• Identifying a solution structure for the problem following the

reuse plan or strategy,• Reconfiguring the solution structure to improve the possibility of

using predefined components available at the next phase,• Acquiring and modifying predefined components,• Integrating the components into the products for this phase, and• Evaluating the products.

Page 11: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 11

Reusable assets • An asset can be any artifact that is used in the

development and maintenance of a software system

Page 12: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 12

Reuse Assets • Requirements

– Typically requirements process involve analysts and domain experts.

• They codify important domain knowledge. – Organizations that make multiple systems in the same domain can benefit

from reusing requirements.

– In the transition from requirements to architecture, analysis models and feature models may be reused.

• Architectures – Architectures are the result of discussions of experienced

architects. – Architectures codify valuable knowledge about systems in a

specific domain, and may be the most commonly reused assets. • The presence of design rationale is important for knowing whether some

design decisions need to be reconsidered when an architecture is used in a different context.

Page 13: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 13

Reuse Assets • Design

– A design is a moderately detailed specification of a subsystem or part of a subsystem.

• Design assets can be generic or specific to a domain or application. – The most widespread generic design-level assets are

probably design patterns. • A design pattern is a solution to a commonly recurring problem. • More and more support for the (re)use of patterns is being

integrated in software development tools.

• A typical example of a domain specific design level asset is a UML model. – Such a UML model may be reused as the basis for

implementations on different platforms or for subsequent designs.

Page 14: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 14

Reuse Assets • Implementation

– Program code is the most common type of implementation artifact.

• Different types of data may be valuable assets. – for example:

• Executable, source, macro’s, scripts for building/compiling, configuration files, template’s, libraries

– Reuse of program code is attractive because it immediately provides tangible results.

– Data: for example • In route-navigation system, the key data is the set of roads and their

GPS positions. • A hospital information system maintains a list of possible medical

diagnoses. • A computer game may contain graphic designs (fonts, characters,

scenery) that can be used in other games.

Page 15: Software Development  Through  Software Reuse, CASE tools,

15

Reuse Assets • Quality Assurance / Validation

– Assets that may be reused across projects for quality assurance are:

• Review and inspection forms (e.g. checklists) • Testing: Reuse test scenario’s e.g. after a modification/extension

of the system. • Test scenario’s capture knowledge about typical faults. • Documentation templates

• Operating System or Database System? reuse? Assets??– OS or DB system is typically not considered reuse.

• As a rule of thumb, if a component is not considered as part of the design of a system, it is not considered as being reuse.

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Page 16: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 16

Benefits of Reuse Benefit ExplanationIncreased dependability Reused software, which has been tried and

tested in working systems, should be more dependable than new software. Its design and implementation faults should have been found and fixed.

Reduced process risk The cost of existing software is already known, whereas the costs of development are always a matter of judgment. This is an important factor for project management because it reduces the margin of error in project cost estimation.

Effective use of specialists

Instead of doing the same work over and over again, application specialists can develop reusable software that encapsulates their knowledge.

Page 17: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 17

Benefits of Reuse Benefit ExplanationStandards compliance Some standards, such as user interface

standards, can be implemented as a set of reusable components.

For example, if menus in a user interface are implemented using reusable components, all applications present the same menu formats to users.

The use of standard user interfaces improves dependability because users make fewer mistakes when presented with a familiar interface.

Accelerated development

Bringing a system to market as early as possible is often more important than overall development costs. Reusing software can speed up system production because both development and validation time may be reduced.

Page 18: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 18

Approaches that support Software Reuse

Approach DescriptionArchitectural patterns Standard software architectures that support

common types of application systems are used as the basis of applications.

Design patterns Generic abstractions that occur across applications are represented as design patterns showing abstract and concrete objects and interactions.

Component-based development

Systems are developed by integrating components (collections of objects) that conform to component-model standards.

Application frameworks

Collections of abstract and concrete classes are adapted and extended to create application systems.

Legacy system wrapping

Legacy systems are ‘wrapped’ by defining a set of interfaces and providing access to these legacy systems through these interfaces.

Page 19: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 19

Approaches that support Software Reuse Approach DescriptionService-oriented systems

Systems are developed by linking shared services, which may be externally provided.

Software product lines

An application type is generalized around a common architecture so that it can be adapted for different customers.

COTS product reuse Systems are developed by configuring and integrating existing application systems.

ERP systems Large-scale systems that encapsulate generic business functionality and rules are configured for an organization.

Configurable vertical applications

Generic systems are designed so that they can be configured to the needs of specific system customers.

Page 20: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 20

Approaches that support Software Reuse

Approach DescriptionProgram libraries Class and function libraries that implement

commonly used abstractions are available for reuse.

Model-driven engineering

Software is represented as domain models and implementation independent models and code is generated from these models.

Program generators A generator system embeds knowledge of a type of application and is used to generate systems in that domain from a user-supplied system model.

Aspect-oriented software development

Shared components are woven into an application at different places when the program is compiled.

Page 21: Software Development  Through  Software Reuse, CASE tools,

21

CASE• Computer-Aided Software Engineering:

– The use of software tools to assist in the development and maintenance of software.

• Tools used to assist in this way are known as CASE Tools.– program editors, debuggers, code analyzers, Web development tools,

Database management tools– CASE tool is a computer-based product aimed at supporting one or

more software engineering activities within a software development process

• Process modeling and management tools, Project planning tools, Risk analysis tools, Project management tools, Requirement tracing tools

• Prerequisites to tool use– Need a collection of useful tools that help in every step of building a

product– Need an organized layout that enables tools to be found quickly and

used efficiently– Need a skilled craftsperson who understands how to use the tools

effectively

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Page 22: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 22

CASE Tools • CASE tools are those software which are used in any and

all phases of developing an information system, including:– Analysis, design and programming.

• For example, data dictionaries and diagramming tools aid in the analysis and design phases,

• Application generators speed up the programming phase.– CASE tools provide automated methods for designing and

documenting traditional structured programming techniques. • The ultimate goal of CASE is to provide a language for describing the

overall system that is sufficient to generate all the necessary programs needed.

• Properly used, CASE tools help improve productivity during the development process and the quality of the resulting system

Page 23: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 23

Components of CASE Tools • The components of CASE Tools are categorized

into:– UpperCASE Tool:

• Supports the software development activities upstream from implementation.

– Focus on the analysis phase (but sometimes also the design phase) like (diagramming tools, report and form generators, and analysis tools)

» Requirements, specification, planning and design

– LowerCASE Tool:• Directly supports the implementation (programming) and

integration tasks. – Support database schema generation, program generation,

implementation, testing, and configuration management.» Implementation and maintenance

Page 24: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 24

Components of CASE Tools – I CASE:

• Tools that integrate both upper and lower CASE:– For example making it possible to design a form and build the

database to support it at the same time.

• An automated system development environment that provides numerous tools to create diagrams, forms and reports.

– It also offers analysis, reporting, and code generation facilities and seamlessly shares and integrates data across and between tools.

Page 25: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 25

Functions of a CASE Tool• Analysis:

– CASE analysis tools automatically check for incomplete, inconsistent, or in correct specifications in diagrams, forms and reports.

• Design:– Technical blueprint of the system is created by:

• Designing the technical architecture• Designing the systems model

– Graphically creating a model from graphical user interface, screen design, and databases, to placement of objects on screen

• Code generation:– Enable the automatic generation of program and data base definition

code directly from the documents, diagrams, forms, and reports.• Documentation:

– CASE Tool has documentation generators to produce technical and user documentation in standard forms

Page 26: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 26

Classifications of software tools• Sommerville suggests three dimensions such as:

– Functionality, Process Support, and Breadth of Support with which software tools can be classified

• Emphases on Functionality and Process Support in the SDLC– Software tools can support one or more phases in the form of

Workbenches or Environments• Tools and methods can be classed into general categories

-– Data Modelling – Model and Program Transformation– Refactoring– Source Code Generation– Unified Modelling Language– Documentation

Page 27: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 27

CASE Tools Classification • Process modeling and management tools

– represent key elements of processes and provide links to other tools that provide support to defined process activities

• Project planning tools– used for cost and effort estimation, and project scheduling

• Risk analysis tools– help project managers build risk tables by providing

detailed guidance in the identification and analysis of risks• Requirements tracing tools

– provide systematic database-like approach to tracking requirement status beginning with specification

Page 28: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 28

CASE Tools Classification • Metrics and management tools

– management oriented tools capture project specific metrics that provide an overall indication of productivity or quality, technically oriented metrics determine metrics that provide greater insight into the quality of design or code

• Documentation tools– provide opportunities for improved productivity by reducing the amount of time

needed to produce work products• System software tools

– network system software, object management services, distributed component support, and communications software

• Quality assurance tools– metrics tools that audit source code to determine compliance with language

standards or tools that extract metrics to project the quality of software being built

• Database management tools– RDMS and OODMS serve as the foundation for the establishment of the CASE

repository

Page 29: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 29

CASE Tools Classification • Prototyping tools

– enable rapid definition of screen layouts, data design, and report generation

• Programming tools– compilers, editors, debuggers, OO programming

environments, fourth generation languages, graphical programming environments, applications generators, and database query generators

• Web development tools– assist with the generation of web page text, graphics,

forms, scripts, applets, etc.

Page 30: Software Development  Through  Software Reuse, CASE tools,

30

CASE architecture• CASE is an environment that

supports the software engineering process:– consists of distinct tools:

• Editing tools, programming tools, v&v tools, configuration management tools, metrics and measurement tools e.t.c

– central repository:• the most critical component

in a CASE environment• CASE Repository is nothing

more than an off-the-shelf DBMS into which specification information is directly placed

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

 A standard CASE architecture

Page 31: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 31

CASE architecture• Editing tools

– Include traditional tools (such as word-processing and programming editors)

• Helps in creating documentation and diagramming tools that provide graphical capabilities such as:

– Drawing a data flow diagram , entity-relationship diagram , or class-structure diagram .

• Programming tools– Coding and debugging tools are the standard tools used to

compile (or interpret), run, and debug a program.– Code generators are tools that write code from a high-level

specification of an application. For example:• In an OO application a code generator might write the code for the

class given the object-class diagrams. • In a visual programming, a code generator might write the code for

the underlying interface given a user interface.

Page 32: Software Development  Through  Software Reuse, CASE tools,

32

CASE architecture• Verification and validation tools

– Verifiers ensure that the syntax is correct. • Ensures that the requirements are correct and the product functions

are the functions desired or requested by the customer. – Within this classification is a variety of tools:

• Static analyzers generate cross-references, check for syntax, and enforce standards on a program without executing the code.

• Dynamic analyzers (tracers and profilers), monitor program execution. • Comparators check for differences or similarities between files;

– They are used for checking test output and expected program results.• Correctness proof assistants prove mathematically the correctness of

the code and evaluate the consistency between the code and the specification.

• Test management tools include test case generators that generate a variety of input test data based on the test criteria and the program’s input data structures.

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Page 33: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 33

CASE architecture• The repository: All the tools are integrated via the

repository. – A holding area for storing and integrating diagrams, descriptions,

specifications, test data, and other items relevant to the development process.

– Allows users and developers to share information, supports team-based developmental activities, provides a mechanism for integrating a diverse set of CASE tools.

• Repository models must be open and extensible (must accommodate other vendors’ tools). – Focus on standardization

• For example, Rational’s CASE tool allows the import and export of their models to Microsoft’s repository product.

• Vendors are also starting to provide access to the data in their repositories via the World Wide Web.

Page 34: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 34

Integration CASE • Integration in a CASE environment takes place

along four dimensions. – Data integration:

• Ensures that the data are managed in a consistent manner across the entire environment.

– Control integration:• Allows for combining the various tools and functions according to

the needs of the project and the environment it supports. – Presentation integration:

• Allows the users to see a consistent interface across the entire tool spectrum.

– Process integration:• Ensures that tools interact effectively in support of a specific

process.

Page 35: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 35

CASE Workbenches• Workbenches provide integration for only a portion of the

system development life cycle. – Upper CASE tools support the earlier phases (problem definition,

analysis, and design), but provide little or no support for the back end (code generation, implementation, etc.).

– Lower CASE tools support the design, implementation, testing, and maintenance phases of the system development life cycle (in general the back end).

• Typical lower CASE tools include application generators for dialogue design, screen painting, code generation, etc.

• They provide little or no support for the earlier phases of the development life cycle.

• Both upper and lower CASE tools work in conjunction with implementation or programming workbenches (editors, compilers, debuggers, test tools, etc.).

Page 36: Software Development  Through  Software Reuse, CASE tools,

36

CASE Workbenches• A coherent set of tools that is designed to support related

software process activities such as analysis, design or testing– Analysis and design workbenches support system modelling

during both requirements engineering and system design– These workbenches may support a specific design method or

may provide support for a creating several different types of system models

• Advantages:– Tools can work together to provide more comprehensive

support– Common services can be implemented and called by all the

tools– Integration possible through shared files, shared repository, or

shared data structures

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Page 37: Software Development  Through  Software Reuse, CASE tools,

37

An analysis and design workbench• Analysis & design workbench components:

– Diagram editors– Model analysis and checking tools– Repository and associated query language– Data dictionary– Report definition and generation tools– Forms definition tools– Import/export translators– Code generation tools

Centralinformationrepository

Codegenerator

Querylanguagefacilities

Structureddiagramming

tools

Datadictionary

Reportgenerationfacilities

Design, analysisand checking

tools

Formscreation

tools

Import/exportfacilities

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Page 38: Software Development  Through  Software Reuse, CASE tools,

38

Workbenches • Programming

Workbenches – Language compiler– Structured editor– Linker– Loader– Static & Dynamic

analyser– Interactive debugger

• Testing workbenches– Test manager– Test data generator– Oracle - generates

predicted results– File comparator– Report generator– Dynamic analyser– Simulator

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Page 39: Software Development  Through  Software Reuse, CASE tools,

39

Testing Workbenches• Testing is an expensive process phase.

– Testing workbenches provide a range of tools to reduce the time required and total testing costs

– Most testing workbenches are open systems because testing needs are organization-specific

– Difficult to integrate testing with closed design and analysis workbenches

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST

Dynamicanalyser

Programbeing tested

Testresults

Testpredictions

Filecomparator

Executionreport Simulator

Sourcecode

Testmanager Test data Oracle

Test datagenerator Specification

Reportgenerator

Test resultsreport

Page 40: Software Development  Through  Software Reuse, CASE tools,

Adv Software Engineering, by Asst Prof Athar Mohsin, MSCS 19, MCS-NUST 40

Further reading • Increasing Software Quality through Design Reuse

by Fernando Barros• A Comparison of Software Reuse in Software

Development Communities by Meena Jha the University of New South Wales,

• A Reuse-Based Software Development Methodology by K. C. Kang