Components Intro 2022
Components Intro 2022
http://staff.cs.upt.ro/~ioana/cbse/
Application
C1
Application 2
C1
C1new
Application
C1
update
• Modules 1980
• Objects 1990
1998: Clemens Szyperski: “Component
• Components Software – Beyond Object Oriented
Programming”
2000
• Services
2010
• …
Principles for reuse by composition
• Key requirements for Black-Box reuse:
– Abstraction: an “Entity” is known by its
“interface”
– Encapsulation: the “insides” of an “Entity” are
not exposed to the outside
Commonalities
of Reusable Entities
• All are blobs of code that
can do something
• All have interfaces that
describe what they
can do.
• All live in a process
somewhere.
• All live to do the bidding
of a client.
• All support the concept
of a client making
requests by
“invoking a
method.”
From [ACM Queue]
Reusable Entities
by Location and Environment
Application
Fig.from [Sommerville]
Example: A data collector component
addSensor
removeSensor
sensorManagement
star tSensor
Data collector stopSensor
sensorData testSensor
initialise
repor t
listAll
Fig.from [Sommerville]
Component models
• A component model is a definition of standards for component
implementation, documentation and deployment.
• These standards are for:
– component developers to ensure that components can
interoperate
– Providers of component execution infrastructures who provide
middleware to support component operation
• The component model specifies how interfaces should be defined
and the elements that should be included in an interface definition.
Elements of a component model
Customisation
Naming
convention
Composition Documentation
Usage Deployment
Interfaces
information and use
Component model
Horizontal services
Platform services
Middleware
Horizontal Services:
Operating System application-independent
services used by different
components.
Hardware Concurrency, security,
transaction management,
Resource management
Relationships Between Concepts
Component-type Component
Specific interface implementation
Independent Component
deployment model
Component
Coordination Services (transactions, persistence..) Framework
Component
Coordination Services (transactions, persistence..) Framework
Component
model
Component-type Component
Specific interface implementation
Independent Component
deployment model
Component
Coordination Services (transactions, persistence..) Framework