Dr. Tom Hicks Computer Science Department Trinity University 1 1 - - PowerPoint PPT Presentation

dr tom hicks
SMART_READER_LITE
LIVE PREVIEW

Dr. Tom Hicks Computer Science Department Trinity University 1 1 - - PowerPoint PPT Presentation

Dr. Tom Hicks Computer Science Department Trinity University 1 1 About Design With Reuse 2 Software Reuse Why Do We Care About Reuse? Historically: In Most Engineering Disciplines , Systems are Designed by Composing Existing


slide-1
SLIDE 1

1

  • Dr. Tom Hicks

Computer Science Department Trinity University

1

slide-2
SLIDE 2

About Design With Reuse

2

slide-3
SLIDE 3

Software Reuse

  • Why Do We Care About Reuse?
  • Historically:
  • In Most Engineering Disciplines, Systems are

Designed by Composing Existing Components that have been used in other systems

  • This has always been true in Software Engineering
  • But it is more true since templated OOP

components!

3

slide-4
SLIDE 4

Software Reuse

  • Early Software Engineering was more focused on
  • riginal development
  • Today’s Software Engineering recognizes that

to achieve better software, more quickly and at lower cost

  • We need to adopt a design process that is

based on systematic reuse

  • Software Engineering Might Reuse

Full/Whole Systems Modules/Components Functions/Procedures

4

slide-5
SLIDE 5

Reuse-Based Software Engineering Offers 3 Reuse Options - 1

1.

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

5

slide-6
SLIDE 6

Reuse-Based Software Engineering Offers 3 Reuse Options - 2

2.

Component Reuse  Components of an application from sub-systems to single objects may be reused

3.

Function Reuse  Software components that implement a single well-defined function may be reused

6

slide-7
SLIDE 7

Benefits Of Reuse

7

slide-8
SLIDE 8

5 Major Benefits Of Reuse - 1

1.

Increased Reliability

  • Components exercised in working systems

8

slide-9
SLIDE 9

5 Major Benefits Of Reuse - 2

2.

Reduced Process Risk

  • Less uncertainty in development costs

9

slide-10
SLIDE 10

5 Major Benefits Of Reuse - 3

3.

Effective Use of Components

  • Reuse components instead of people

10

slide-11
SLIDE 11

5 Major Benefits Of Reuse - 4

4.

Standards Compliance

  • Embed standards in reusable components
  • i.e. Reuse Requirements/Specifications

11

slide-12
SLIDE 12

5 Major Benefits Of Reuse - 5

5.

Accelerated Development

  • Avoid original development and hence speed-up

production

12

slide-13
SLIDE 13

Reuse Requirements

13

slide-14
SLIDE 14

3 Requirements For Design With Reuse - 1

  • A. It must be possible to find Appropriate Reusable

Components

14

slide-15
SLIDE 15

3 Requirements For Design With Reuse - 2

  • B. The Reuser of the Component Must be

Confident that the Components Will Be Reliable and Will behave as Specified

15

slide-16
SLIDE 16

3 Requirements For Design With Reuse - 3

  • C. The Components Bust Be Documented so that

they can be understood and, where appropriate, modified

16

slide-17
SLIDE 17

Search Is On!

To Find Appropriate , Documented, Reliable Components!

17

slide-18
SLIDE 18

Common Reuse Problems

18

slide-19
SLIDE 19

5 Common Reuse Problems - 1

  • 1. Increased Maintenance Costs

19

slide-20
SLIDE 20

5 Common Reuse Problems - 2

  • 2. Lack of Tool Support

20

slide-21
SLIDE 21

5 Common Reuse Problems - 3

  • 3. Not-Invented-Here Syndrome

21

slide-22
SLIDE 22

5 Common Reuse Problems - 4

  • 4. Maintaining a Component Library

22

slide-23
SLIDE 23

5 Common Reuse Problems - 5

  • 5. Finding and Adapting Reusable Components

23

slide-24
SLIDE 24

Program Generators & Reuse

24

slide-25
SLIDE 25

Generator-Based Reuse - 1

Program Generators involve the reuse of

standard patterns and algorithms

These patterns/algorithms are embedded in the

generator and parameterized by user commands. A program is then automatically generated!

25

slide-26
SLIDE 26

Generator-Based Reuse - 2

Generator-Based reuse is possible when domain

abstractions and their mapping to executable code can be identified

A domain specific language is used to compose

and control these abstractions

26

slide-27
SLIDE 27

3 Types Of Program Generator

 3 Types of Program Generators

  • Application Generators for business data

processing

  • Parser and Lexical Analyzer Generators for

language processing

  • Code Generators in CASE tools

 Generator-Based Reuse is very cost-effective but

its applicability is limited to a relatively small number

  • f application domains

 It is easier for end-users to develop programs

using generators compared to other component- based approaches to reuse

27

slide-28
SLIDE 28

Reuse Through Program Generation

Program generator Generated program Application description Application domain knowledge Database

28

slide-29
SLIDE 29

About Components

29

slide-30
SLIDE 30

About Components - 1

Components provide a service without regard to

where the component is executing or its programming language

A Component is an Independent Executable

Entity that can be made up of one or more executable objects

30

slide-31
SLIDE 31

About Components - 2

The component interface is published and all

interactions are through the published interface

Components can range in size from simple

functions to entire application systems

31

slide-32
SLIDE 32

Component Based Development

32

slide-33
SLIDE 33

CBSE

Component-Based Software Engineering

(CBSE) is an approach to software development that relies on reuse

CBSE has emerged from the failure of object-

  • riented development to support effective reuse.

Single object classes are often too detailed and specific [templated data structure applications tend to be

the exception!]

33

slide-34
SLIDE 34

CBSE Components More Abstract

In CBSE, Components are More Abstract than

  • bject classes and can be considered to be stand-

alone service providers

34

slide-35
SLIDE 35

CBSE Processes

Component-Based Software Engineering

Component-based development can be Integrated

into a Standard Software Process by incorporating a Reuse activity in the design process.

In Reuse-Driven Development, the System

Requirements are Modified to Reflect the Components that are Available

35

slide-36
SLIDE 36

CBSE Prototyping

CBSE usually involves a Prototyping or an

incremental development process with components being ‘glued together’ using a scripting language

36

slide-37
SLIDE 37

CBSE Problems

37

slide-38
SLIDE 38

3 Most Common CBSE Problems - 1

 Component Incompatibilities may mean that Cost

and Schedule Savings are Less Than Expected

38

slide-39
SLIDE 39

3 Most Common CBSE Problems - 2

 Finding & Understanding Components

39

slide-40
SLIDE 40

3 Most Common CBSE Problems - 3

 Managing Evolution as requirements change in

situations where it may be impossible to change the system components

40

slide-41
SLIDE 41

Application Frameworks

41

slide-42
SLIDE 42

About Application Frameworks

Application Frameworks are a sub-system design

made up of a collection of abstract and concrete classes and the interfaces between them

Application Framework sub-systems are

implemented by adding components to fill in parts of the design and by instantiating the abstract classes in the framework

Frameworks are moderately

large entities that can be reused

42

slide-43
SLIDE 43

3 Framework Classes

System Infrastructure Frameworks

 Support the development of system infrastructures such as communications, user interfaces and compilers

Middleware Integration Frameworks

 Standards and classes that support component communication and information exchange such as MS SQL Server, MySQL, Oracle, FoxPro, etc.

Enterprise Application Frameworks

 Support the development of specific types of application such as telecommunications or financial systems

43

slide-44
SLIDE 44

Extending Frameworks

 Frameworks are Generic and are extended to

create a more specific application or sub-system

 Extending the framework involves

  • 1. Adding concrete classes that inherit
  • perations from abstract classes in the

framework

  • 2. Adding methods that are called in response

to events that are recognised by the framework

 Problem with frameworks is their complexity

and the time it takes to use them effectively

44

slide-45
SLIDE 45

COTS

45

slide-46
SLIDE 46

COTS Product Reuse

COTS - Commercial Off-The-Shelf systems COTS Systems are usually Complete Application

Systems that offer an API (Application Programming Interface)

46

slide-47
SLIDE 47

Integrating COTS

Building Large Systems by Integrating COTS

Systems is now a viable development strategy for some types of system such as database or E-commerce systems

47

slide-48
SLIDE 48

Problems With COTS Systems

48

slide-49
SLIDE 49

 Lack of Control Over Functionality and Performance

  • COTS systems may be less effective than they appear

49

4 Problems With COTS System Integration - 1

slide-50
SLIDE 50

4 Problems With COTS System Integration - 1

 Problems With COTS System Interface Interaction

  • Different COTS systems may make different

assumptions that means interface may be difficult

50

slide-51
SLIDE 51

4 Problems With COTS System Integration - 3

 No Control Over System Evolution

  • COTS vendors, not system users, control evolution

51

slide-52
SLIDE 52

4 Problems With COTS System Integration - 1

 No Control Over Support from COTS vendors

  • COTS vendors may not offer support over the lifetime
  • f the product

52

slide-53
SLIDE 53

Component Development For Reuse

53

slide-54
SLIDE 54

Component Development For Reuse #1

 Components for reuse may be specially

constructed by generalizing existing components

 4 Ways To Help Generalize Components &

Make Components Reusable

  • 1. Reflect Stable Domain Abstractions
  • 2. Hide State Representation
  • 3. Be as independent as possible
  • 4. Publish exceptions through the

component interface

54

slide-55
SLIDE 55

Component Development For Reuse #2

There is a trade-off between reusability and

usability.

The more general the interface, the greater the reusability but it is then more complex and hence less usable

55

slide-56
SLIDE 56

Reusable Components Development Costs

The Development Cost of Reusable

Components is higher than the cost of specific

  • equivalents. This extra reusability enhancement

cost should be an organization rather than a project cost.

56

slide-57
SLIDE 57

Space & Execution

Generic Components may be less

space-efficient and may have longer execution times than their specific equivalents

57

slide-58
SLIDE 58

Reusability Enhancement

58

slide-59
SLIDE 59

Reusability Enhancement #1

4 Generalizations

Name Generalization

  • Names in a Component may be modified so

that they are not a direct reflection of a specific application entity ( push/pop on stack)

59

slide-60
SLIDE 60

Reusability Enhancement #2

4 Generalizations

Operation Generalization

  • Operations may be added to provide extra

functionality and application specific operations may be removed

60

slide-61
SLIDE 61

Reusability Enhancement #3

4 Generalizations

Exception Generalization

  • Application specific exceptions are removed

and exception management added to increase the robustness of the component

61

slide-62
SLIDE 62

Reusability Enhancement #3

4 Generalizations

Component Certification

  • Component is certified as reusable

62

slide-63
SLIDE 63

Application Families

Also Called Product Lines

63

slide-64
SLIDE 64

Application Families – Product Line

An Application Family or Product Line is a

related set of applications that has a common, domain-specific architecture

It is the common core of the application family

that is reused each time a new application is required (maybe AVL Tree)

Each specific application is then specialized in

some way

64

slide-65
SLIDE 65

3 Application Family Specializations

1.

Platform Specialization  Different versions of the application are developed for different platforms

2.

Configuration Specialization  Different versions of the application are created to handle different peripheral devices

3.

Functional Specialization  Different versions of the application are created for customers with different requirements

65

slide-66
SLIDE 66

Inventory Management System

Application Families Suppose You Are Developer!

66

slide-67
SLIDE 67

A Resource Management System

Resource database Resource desc. Screen spec. Report spec. Add Delete Query Browse Admin Report User access Program access

You might start out with this ultra simplistic description of functionality! 67

slide-68
SLIDE 68

Inventory Management Systems

Resource Database

Maintains details of the things that are being managed

I/O Descriptions

Describes the structures in the resource database and input and output formats that are used

Query Level

Provides functions implementing queries over the resources

Access Interfaces

A user interface and an application programming interface

68

slide-69
SLIDE 69

Application Family Architectures

Architectures must be structured in such a way

to separate different sub-systems and to allow them to be modified

The architecture should also separate entities and

their descriptions and the higher levels in the system access entities through descriptions rather than directly

69

slide-70
SLIDE 70

Library Management System

Application Families Suppose You Are Developer!

70

slide-71
SLIDE 71

A Library System

Library holdings database Resource desc. Screen spec. Report spec. Add Delete Query Browse Admin Report Library user access Issue Return Users

You might start out with this ultra simplistic description of functionality! 71

slide-72
SLIDE 72

Library System

The resources being managed are the books in

the library

Additional domain-specific functionality (issue,

borrow, etc.) must be added for this application

72

slide-73
SLIDE 73

Can You See The Potential Component Reuse?

Resource database Resource desc. Screen spec. Report spec. Add Delete Query Browse Admin Report User access Program access

Library holdings database Resource desc. Screen spec. Report spec. Add Delete Query Browse Admin Report Library user access Issue Return Users

A Library System Resource Management System

73

slide-74
SLIDE 74

Software Engineering

CSCI 3342

  • Dr. Thomas E. Hicks

Computer Science Department Trinity University

Textbook: Software Engineering By Roger Pressman Textbook: Software Engineering By Ian Sommerville Special Thanks To WCB/McGraw-Hill & Addison Wesley For Providing Graphics Of Some Of Text Book Figures For Use In This Presentation.

74