Beruflich Dokumente
Kultur Dokumente
● Building software from
reusable components.
o
rainG
enD
raattedb p
raso
g
a
m
e
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 12
Componentbased development
● Componentbased software engineering (CBSE)
is an approach to software development that
relies on reuse
● It emerged from the failure of objectoriented
development to support effective reuse. Single
object classes are too detailed and specific
● Components are more abstract than object classes
and can be considered to be standalone service
providers
om
ponetP
rovides interface
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 15
Component interfaces
● Provides interface
• Defines the services that are provided by the component to
other components
● Requires interface
• Defines the services that specifies what services must be made
available for the component to execute as specified
A Se
a
rcdhitsecgnural com rch
for o
mp
o
n s
upsonblets bascdreutabl
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 21
CBSE problems
● Component incompatibilities may mean that cost
and schedule savings are less then expected
● Finding and understanding components
● Managing evolution as requirements change in
situations where it may be impossible to change
the system components
M
o de
lan pqduaetris M M
o de
lodel m
settahoeds M o d el
d
i
ts
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 27
COTS product reuse
● COTS Commercial OffTheShelf systems
● COTS systems are usually complete application
systems that offer an API (Application
Programming Interface)
● Building large systems by integrating COTS
systems is now a viable development strategy for
some types of system such as Ecommerce
systems
eiztongeO
p e
rnlatziongeE
x
c ep
tnralziaoncCo m po
ne
t
ertifcai
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 33
Application families
● An application family or product line is a related
set of applications that has a common, domain
specific architecture
● The common core of the application family is
reused each time a new application is required
● Each specific application is specialised in some
way
e
s Que r
y BroP
r
o
w
s
eg
a
m
A
a
c
e
d
m
i
nsR
e
p
o
r
t
R
esource dsc.R S cre n
spec.
esource datbase R
e
po
r
t
sp
e
c
.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 36
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
L
rsco.w i
b
seS r
ay
A
u
d s
mer ac e
icrenn specRs
e.portIR
seu
eport spR
eect.urnU
ser
Libray holdings datbase
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 39
Library system
● The resources being managed are the books in the
library
● Additional domainspecific functionality (issue,
borrow, etc.) must be added for this application
istngfaD
daspyt exm em
liyvem
r new
br
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 41
Family member development
● Elicit stakeholder requirements
• Use existing family member as a prototype
● Choose closestfit family member
• Find the family member that best meets the requirements
● Renegotiate requirements
• Adapt requirements as necessary to capabilities of the software
● Adapt existing system
• Develop new modules and make changes for family member
● Deliver new family member
• Document key features for further member development
O
bserv 1A
©Ian Sommerville 2000
:B
C
D 4
2
10
5
: 0 O
b
s
e
rv
2
Software Engineering, 6th edition. Chapter 14 Slide 45
The Observer pattern
● Name
• Observer
● Description
• Separates the display of object state from the object itself
● Problem description
• Used when multiple displays of state are needed
● Solution description
• See slide with UML description
● Consequences
• Optimisations to enhance display performance are impractical
l o
U i
pn
daob
ts
e
(r
)v
sO
Up b
d s
ae
r
t v
(
)
C
o
rsG njcat ()eectreturn subjectSateC
c
tubetjSe S ub on
rU c e
tobpsdearv (O b
s)S e
rtaevo bsuervjcS
t >
aeG
=
tS
ate ()
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14 Slide 47
Key points
● Design with reuse involves designing software
around good design and existing components
● Advantages are lower costs, faster software
development and lower risks
● Componentbased software engineering relies on
blackbox components with defined requires and
provides interfaces
● COTS product reuse is concerned with the reuse
of large, offtheshelf systems