01-11-2012, 02:16 PM
Components Lecture
Components.PPT (Size: 113.5 KB / Downloads: 26)
What is a component?
A component:
unit of independent deployment
unit of third-party composition
persistent state?
A component: a group of data and services that is used to build a larger entity
building block for applications
building block for other components
Object Characteristics
In contrast, an object:
is a unit of instantiation
has a unique identity
may be persistent
encapsulates state and behavior
Objects during analysis
end user, the system, printer, another system,…
Objects during arch. design
database, client process, server process, libraries,…
Objects during detailed design
java classes
Components and Arch
Components are the elements of software architecture
class hierarchies + object collaboration = detailed design
components + collaboration = architectural design
java class == a brick, a piece of wood, a nail
javabean component = a wall element, a roof, a room
client application == a building
An architecture does not concentrate on nails and bricks!
Component
“a software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties.
interface defines component’s access points
may have multiple interfaces
must define explicit needs (context dependencies)
Finally: a Silver Bullet?
Nope.
Must still provide same amount of functionality and data
New challenges
design of components and architectures
product management
component quality
Components may even increase complexity of systems
testing
integration
maintenance
Impact on SE?
Architecture
Builder tools discover a Bean’s features (properties, methods,events) through introspection
Properties - bean’s appearance and behavior characteristics that are customizable
attributes referenced by name
read/write methods
Events - beans communicate through events
listener bean registers with source bean (who will fire the event)
Methods
implementation of bean interface