computer science department trinity university...
TRANSCRIPT
1
Dr. Tom HicksComputer Science Department
Trinity University
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 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
Software Reuse
Early Software Engineering was more focused on original 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
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
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
Benefits Of
Reuse
7
5 Major Benefits Of Reuse - 1
1. Increased Reliability
• Components exercised in working systems
8
5 Major Benefits Of Reuse - 2
2. Reduced Process Risk
• Less uncertainty in development costs
9
5 Major Benefits Of Reuse - 3
3. Effective Use of Components
• Reuse components instead of people
10
5 Major Benefits Of Reuse - 4
4. Standards Compliance
• Embed standards in reusable components
• i.e. Reuse Requirements/Specifications
11
5 Major Benefits Of Reuse - 5
5. Accelerated Development
• Avoid original development and hence speed-up production
12
Reuse
Requirements
13
3 Requirements For Design With Reuse - 1
A. It must be possible to find Appropriate Reusable Components
14
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
3 Requirements For Design With Reuse - 3
C. The Components Bust Be Documented so that they can be understood and, where appropriate, modified
16
Search Is On!
To Find Appropriate , Documented, Reliable Components!
17
Common Reuse
Problems
18
5 Common Reuse Problems - 1
1. Increased Maintenance Costs
19
5 Common Reuse Problems - 2
2. Lack of Tool Support
20
5 Common Reuse Problems - 3
3. Not-Invented-Here Syndrome
21
5 Common Reuse Problems - 4
4. Maintaining a Component Library
22
5 Common Reuse Problems - 5
5. Finding and Adapting Reusable Components
23
Program Generators &
Reuse
24
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
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
3 Types Of Program Generator
3 Types of Program Generators
o Application Generators for business data processing
o Parser and Lexical Analyzer Generators for language processing
o Code Generators in CASE tools
Generator-Based Reuse is very cost-effective but its applicability is limited to a relatively small number of application domains
It is easier for end-users to develop programsusing generators compared to other component-based approaches to reuse
27
Reuse Through Program Generation
Program generator Generated programApplicationdescription
Application domainknowledge Database
28
About
Components
29
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
About Components - 2
The component interface is published and all interactions are through the published interface
Components can range in size from simplefunctions to entire application systems
31
Component Based
Development
32
CBSE
Component-Based Software Engineering (CBSE) is an approach to software development that relies on reuse
CBSE has emerged from the failure of object-oriented development to support effective reuse. Single object classes are often too detailed and specific [templated data structure applications tend to be the exception!]
33
CBSE Components More Abstract
In CBSE, Components are More Abstract than object classes and can be considered to be stand-alone service providers
34
CBSE ProcessesComponent-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
CBSE Prototyping
CBSE usually involves a Prototyping or an
incremental development process with components
being ‘glued together’ using a scripting language
36
CBSE
Problems
37
3 Most Common CBSE Problems - 1
Component Incompatibilities may mean that Cost
and Schedule Savings are Less Than Expected
38
3 Most Common CBSE Problems - 2
Finding & Understanding Components
39
3 Most Common CBSE Problems - 3
Managing Evolution as requirements change in
situations where it may be impossible to change the
system components
40
Application
Frameworks
41
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
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
systems43
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 operations 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 complexityand the time it takes to use them effectively
44
COTS
45
COTS Product Reuse
COTS - Commercial Off-The-Shelf systems
COTS Systems are usually Complete Application
Systems that offer an API (Application Programming
Interface)
46
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
Problems With
COTS Systems
48
Lack of Control Over Functionality and Performance
COTS systems may be less effective than they appear
49
4 Problems With COTS System Integration - 1
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
4 Problems With COTS System Integration - 3
No Control Over System Evolution
COTS vendors, not system users, control evolution
51
4 Problems With COTS System Integration - 1
No Control Over Support from COTS vendors
COTS vendors may not offer support over the lifetimeof the product
52
Component Development
For Reuse
53
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
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
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
Space & Execution
Generic Components may be less
space-efficient and may have longer execution
times than their specific equivalents
57
Reusability
Enhancement
58
Reusability Enhancement #14 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
Reusability Enhancement #24 Generalizations
Operation Generalization
• Operations may be added to provide extra
functionality and application specific operations
may be removed
60
Reusability Enhancement #3
4 Generalizations
Exception Generalization
• Application specific exceptions are removed
and exception management added to
increase the robustness of the component
61
Reusability Enhancement #3
4 Generalizations
Component Certification
• Component is certified as reusable
62
Application FamiliesAlso Called
Product Lines
63
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
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
Inventory Management
System
Application Families
Suppose You Are Developer!
66
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
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
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
Library Management
System
Application Families
Suppose You Are Developer!
70
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
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
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
Software EngineeringCSCI 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