8/3/2019 25977233 Component Based Software Engineering
1/21
By:
Harshpreet Singh(ME SoftwareEngg. 1st yr )
Thapar University
8/3/2019 25977233 Component Based Software Engineering
2/21
Szyperski: A software component is a unit of composition with contractually specified
interfaces and explicit context dependencies only. A software componentcan be deployed independently and is subject to composition by third-parties.
Councill and Heinmann: A software component is a software element that conforms to a
component model and can be independently deployed and composedwithout modification according to a composition standard.
(explicit context dependencies)
(reusable, independent deployment, composition)
A thing is not a component if it cannot be reused across multipleapplications (but it may be a module)
Single-product development (which does not develop with reuse in mind), atbest, has a remote change of yielding components, if their units are accidentlydeveloped as reusable unitsBut single-product development can reuse existing components
Development from scratch, by definition, does not reuse
8/3/2019 25977233 Component Based Software Engineering
3/21
Developing with reuse / developing for reuse Single-product development, by definition, does not involve
development for reuse
The day that we no longer need to develop for reuse is
The day that the software engineering problem (software crisis)is solved The day that software engineers and researchers lose their jobs
In the mean time, essence of CBSE: development for reuse Development with reuse may be used to achieve development
for reuse, but often this is not feasible Components are developed for reusability
8/3/2019 25977233 Component Based Software Engineering
4/21
CBSE assumes the existence of 2 component development
paradigms
Single-product development Top down, single architecture driven Planned use of components (develop only what is needed) All development within a single organization
All software developed during the process
Component market (e.g. Components Off The Shelf) Bottom-up (no global architecture defined) Use of components is opportunistic (use whatever is available) Component software is available when starting the project
It results in inter-organizational reuse
Single-product development: problems of standard software engineeringprocess Component market: problems are not so obvious. After all, this is supposedlythe goal of CBSE.
8/3/2019 25977233 Component Based Software Engineering
5/21
8/3/2019 25977233 Component Based Software Engineering
6/21
Independentcomponents (specified bytheir interfaces.)
Component standards
(to facilitate componentintegration)
Middleware(that providessupport for component inter-operability)
A developmentprocess(that is geared toreuse)
8/3/2019 25977233 Component Based Software Engineering
7/21
Provides interface Defines the services that
are provided by thecomponent to othercomponents.
Requires interface Defines the services that
specifies what servicesmust be made available for
the component to executeas specified.
Requires
provides
8/3/2019 25977233 Component Based Software Engineering
8/21
A contract specifies the interactions among components,in terms of: The set of participating components;
The role of each component through its contractual obligations;
The invariant to be maintained by the components;
The specification of the methods which instantiate the contract. A contract is comprised of:
The Invariant, the global constraints which the component willmaintain;
The Pre-condition, the constraints which need to be met by the client;
The Post-condition, the constraints which the component promises toestablish in return.
8/3/2019 25977233 Component Based Software Engineering
9/21
Patterns define recurring solutions to recurring problemscapturing non-obvious solutions, not just abstract principles orstrategies. A component, as a reusable entity, can be seen as a realization of some
design pattern.
Patterns can be classified into three major categories:
Architectural Patterns, capture the overall structure and organization ofa software system.
Design Patterns, refine the structure and the behavior of the
subsystems ,components of a software system, and the relationshipsbetween them.
Idioms, are low-level patterns which are dependent on chosen paradigm& programming language used.
8/3/2019 25977233 Component Based Software Engineering
10/21
CBSE means that we build software by "putting piecestogether". Frameworks provide the context in which thepieces can be used.
A Component Frameworkdescribes a circuit-board
with empty slots into which components can be insertedto create a working instance.
8/3/2019 25977233 Component Based Software Engineering
11/21
A Component Model is a definition of standards for
component implementation, documentation and deployment.
The component model specifies how interfaces should bedefined and the elements that should be included in aninterface definition.
Comp onent model
InterfacesUsage
informationDeployment
and use
Interface
definition
Sp eci fic
interfaces
Composition
Namingconvention
Meta-data
access
Customisation
Packaging
Docu mentation
Evolution
support
Elements ofcomponent model
8/3/2019 25977233 Component Based Software Engineering
12/21
Platform services
AddressingInter face
definition
Component
communications
Exception
management
Horizontal services
Security
Transaction
management
Concurrency
Component
management
Persistence
Resource
management
8/3/2019 25977233 Component Based Software Engineering
13/21
8/3/2019 25977233 Component Based Software Engineering
14/21
Types of compositiono Sequential compositionwhere the
composed components are executed insequence. This involves composing theprovided interfaces of each component.
o Hierarchical compositionwhere onecomponent calls on the services ofanother. The provides interface of onecomponent is composed with the requires
interface of another.
o Additive compositionwhere theinterfaces of two components are puttogether to create a new component.
Composition involves integrating components with each other andwith the component infrastructure.
8/3/2019 25977233 Component Based Software Engineering
15/21
Address the problem of component incompatibility byreconciling the interfaces of the components that arecomposed.
Different types of adaptor are required depending on the typeof composition.
An addressfinder and a mapper component may becomposed through an adaptor that strips the postal codefrom an address and passes this to the mapper component.
Data co llector
addSensorremoveSensorstartSensor
stopSensor
testSensor
listAll
repor t
initialise
sensorManagement
sensorData
Adaptersensor
start
getdata
stop
An example
8/3/2019 25977233 Component Based Software Engineering
16/21
Trust. You need to be able to trust the supplier of acomponent. At best, an untrusted component may notoperate as advertised; at worst, it can breach your security.
Requirements. Different groups of components will satisfydifferent requirements.
Validation. The component specification may not be detailed enough
to allow comprehensive tests to be developed. Components may have unwanted functionality. How can
you test this will not interfere with your application?
8/3/2019 25977233 Component Based Software Engineering
17/21
ComponentSpecification and collaboration is often too low level, missing many of high level
functional and non-functional requirements
Service componentSpecified in terms of interfaces which are parts of a contract (formally describing howprovided interfaces behave with required interfaces)
Interface behavior/obligation specified in terms of Service Level Agreement (SLA)
Characteristics Large granularity (provides single business concept or process) Asynchronous interaction (message-based, not call-and-return) Interface specification behavior fully defined as a state machine of messages
Business protocols
Business protocol = subset of business process describing the message exchangestate machine of each party
Challenges of designing a protocol (deadlocks, livelocks, reliability, sequencing, etc.) Contracts implement business protocols
Parameterized schemas (e.g. Buyer/Seller contract, with Buy and Seller as variation points)
8/3/2019 25977233 Component Based Software Engineering
18/21
Service-Oriented Architecture (SOA) A topology of loosely coupled, large granularity service components Message-based contracts (bi-directional, asynchronous)
Web services (implementation of SOA) Features
Location independent (write once, run anywhere) Internet standards (open, intranet, internet) True black-box (message interchange) No explicit programming model (connection is the common vocabulary)
Specification (Web Service Description Language) Web service data semantics
XML schemas (XMI) for data format standard Standard dictionary of terms
Semantic web (data reuse framework using Resource DescriptionFramework uses XML for syntax and URIs for naming)
Web services process semantics Language for expressing contracts (Message Exchange Patterns) Business Process Execution Language (BPEL) for web services
Specify how a group of web services work to implement a business process
8/3/2019 25977233 Component Based Software Engineering
19/21
When composing components, you may findconflicts between functional and non-functionalrequirements, and conflicts between the need forrapid delivery and system evolution.
You need to make decisions such as: What composition of components is effective for delivering
the functional requirements?
What composition of components allows for future change?
What will be the emergent properties of the composed
system?
8/3/2019 25977233 Component Based Software Engineering
20/21
CBSE is a reuse-based approach to defining andimplementing loosely coupled components into systems.
A component is a software unit whose functionality anddependencies 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.
8/3/2019 25977233 Component Based Software Engineering
21/21
Top Related