Professional Documents
Culture Documents
Software Reuse
Ian Sommerville
Lutz Prechelt
z Component reuse
Components of an application from sub-systems to single
objects may be reused. Covered in Chapter 19.
z Accelerated development
Often more important than anything else.
z Reuse is possible
at a range of granularity levels
• from simple functions to complete application systems
at a range of abstraction levels
• from requirements to code etc.
at a range of scales
• from one-time-reuse to mass-marketing
z The reuse landscape covers the range of possible
reuse techniques.
© Ian Sommerville 2004, Software Engineering, 7th edition, prechelt@inf.fu-berlin.de 10
The reuse landscape
Design
patterns
Component Application
frameworks product lines Aspect-oriented
software development
z Problem description
Context, requirements, constraints
z Solution description
Not a concrete design but a template for a design solution
that can be instantiated in different ways.
z Consequences
The results, variants and trade-offs when applying the
pattern.
50
D
A
C 25
A B C D
B 0
Subject
Observer 1 A: 40 Observer 2
B: 25
C: 15
D: 20
Subject Observer
ConcreteSubject ConcreteObserver
observerState =
GetState () return subjectState Update ()
subject ->
GetState ()
subjectState observerState
Aspect 1 Aspect 2
Model queries
Model edits and updates
Model state
Model methods
Server
z Design-time configuration
A common generic code is adapted and changed
according to the requirements of particular customers.
Creates a specific version of the software.
Configuration
planning tool
System database
Transaction management
Resource database
z Adaptations include:
At the UI level, there are components for operator display
and communications;
At the I/O management level, there are components that
handle authentication, reporting and route planning;
At the resource management level, there are components
for vehicle location and despatch, managing vehicle status
and incident logging;
The database includes equipment, vehicle and map
databases.
© Ian Sommerville 2004, Software Engineering, 7th edition, prechelt@inf.fu-berlin.de 42
A vehicle despatching system
Renegotiate
requirements
Elicit Choose
stakeholder closest-fit
requirements family member
Adapt existing Deliver new
system family member