Component-Based Software Engineering
Component-Based Software Engineering
LEGO analogy
Set of building blocks in different shapes and colors Can be combined in different ways Composition through small stubs in one and corresponding holes in another building block
LEGO blocks are generic and easily composable LEGO can be combined with LEGO, not with Meccano
SE, CBSE, Hans van Vliet, 2008 2
Why CBSE?
Component model
Defines the types of building block, and the recipe for putting them together
More precisely, a component model defines standards for:
Properties individual components must satisfy Methods and mechanisms for composing components
A software component:
A component technology
Component forms
Component goes through different stages: development, packaging, distribution, deployment, execution Across these stages, components are represented in different forms:
During development: UML, e.g. When packaging: in a .zip file, e.g. In the execution stage: blocks of code and data
10
Black box: only specification is known Glass box: internals may be inspected, but not changed Grey box: part of the internals may be inspected, limited modification is allowed While box: component is open to inspection and modification
11
12
13
Approach A: left to the designers (e.g. when integrating COTS components) Approach B: model provides standardized facilities for managing qualities Approach C: component only addresses functionality, quality in surrounding container Approach D: similar to C, but container interacts with platform on quality issues
14
Infrastructure mechanisms, for binding, execution, etc Instantiation Binding (design time, compile time, ) Mechanisms for communication between components Discovery of components Announcement of component capabilities (interfaces) Development support Language independence Platform independence Analysis support Support for upgrading and extension Support for quality properties
15
16
Requirements: also considers availability of components (like in COTS) Analysis and design: very similar to what we normally do Implementation: less coding, focus on selection of components, provision of glue code Integration: largely automated Testing: verification of components is necessary Release: as in classical approaches Maintenance: replace components
SE, CBSE, Hans van Vliet, 2008 17
Component assessment
18
Managing requirements is more difficult More effort required to develop reusable components More effort in documentation for consumers
19
Requirements: combination of top-down (from system) and bottom-up (generality) Analysis and design: generality is an issue, assumptions about system (use) must be made Implementation: largely determined by component technology Testing: extensive (no assumptions of usage!), and well-documented Release: not only executables, also metadata
20
Component maintenance
Who is responsible: producer or consumer? Blame analysis: relation between manifestation of a fault and its cause, e.g.
Component A requires more CPU time As a consequence, B does not complete in time As required by C, so C issues a time-out error to its user Analysis: goes from C to B to A to input of A Who does the analysis, if producers of A,B,C are different?
21
22
Summary
23