Component-Based Software Engineering
Component-Based Software Engineering
engineering
By,
Ilakiyaselvan N
Objectives
• To explain that CBSE is concerned with
developing standardised components and
composing these into applications
• To describe components and component
models
• To show the principal activities in the CBSE
process
• To discuss approaches to component
composition and problems that may arise
Topics covered
• Components and component models
• The CBSE process
• Component composition
Component-based development
• Component-based software engineering
(CBSE) is an approach to software
development that relies on software reuse.
• It emerged from the failure of object-oriented
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 stand-
alone service providers.
CBSE essentials
• Independent components specified by their
interfaces.
• Component standards to facilitate component
integration.
• Middleware that provides support for
component inter-operability.
• A development process that is geared to
reuse.
CBSE and design principles
• Apart from the benefits of reuse, CBSE is
based on sound software engineering design
principles:
– Components are independent so do not interfere
with each other;
– Component implementations are hidden;
– Communication is through well-defined interfaces;
– Component platforms are shared and reduce
development costs.
CBSE problems
• Component trustworthiness - how can a component with no
available source code be trusted?
• Component certification - who will certify the quality of
components?
• Emergent property prediction - how can the emergent
properties of component compositions be predicted?
• Requirements trade-offs - how do we do trade-off analysis
between the features of one component and another?
Components
• Components provide a service without regard
to where the component is executing or its
programming language
– A component is an independent executable
entity that can be made up of one or more
executable objects;
– The component interface is published and all
interactions are through the published interface;
Component definitions
• Councill and Heinmann:
– A software component is a software element that conforms to a
component model and can be independently deployed and composed
without modification according to a composition standard.
• Szyperski:
– 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.
Component as a service provider
• The component is an independent, executable
entity. It does not have to be compiled before
it is used with other components.
• The services offered by a component are
made available through an interface and all
component interactions take place through
that interface.
Component characteristics 1
Standa rdised Componen t stand ardis ation means that a componen t that is
used in a CBSE process ha s to conform t o some standard is ed
componen t model. This model may define componen t
interfaces, compon ent meta-data, documentation, composit ion
and deployment.
Independen t A componen t should be independen t Š it should be possible to
compose and deploy it wit hout hav ing to use other specifi c
componen ts. In sit uations whe re the componen t need s
externall y p rovided services, these shou ld be explicitly set out
in a ŌrequiresÕinterface specifi cation.
Composable For a componen t to be compo sable, all external interactions
must take place through public ly defined interfaces. In
additi on, it must provid e external access to information about
it self such as it s method s and attributes.
Component characteristics 2
addSenso r
senso rMan agemen t remov eSenso r
startSenso r
Data collecto r sto pSenso r
senso rData testSen sor
in itialise
repo rt
listAll
Components and objects
• Components are deployable entities.
• Components do not define types.
• Component implementations are opaque.
• Components are language-independent.
• Components are standardised.
Component models
• A component model is a definition of standards for
component implementation, documentation and deployment.
• Examples of component models
– EJB model (Enterprise Java Beans)
– COM+ model (.NET model)
– Corba Component Model
• 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
Custo misation
Naming
con ven tion
Co mpo sitio n Do cumentatio n
Platfo rm services
A A
A B
B B
getImage
addItem Image
adap tor Man ager
Ph oto retrieve
Library
catEntry getCatalogEn try
User
In terface
Photo Library documentation
-- The context keyword names the component to which the conditions apply
context addItem
context delete
Data
(b) Data base
collection Rep ort
Key points
• CBSE is a reuse-based approach to defining and implementing
loosely coupled components into systems.
• A component is a software unit whose functionality and
dependencies are completely defined by its interfaces.
• A component model defines a set of standards that
component providers and composers should follow.
• During the CBSE process, the processes of requirements
engineering and system design are interleaved.
Key points
• Component composition is the process of
‘wiring’ components together to create a
system.
• When composing reusable components, you
normally have to write adaptors to reconcile
different component interfaces.
• When choosing compositions, you have to
consider required functionality, non-functional
requirements and system evolution.