0% found this document useful (0 votes)
4 views23 pages

lec 20 Component-based software engineering

The document discusses Component-Based Software Engineering (CBSE), which emphasizes the reuse of software components as a solution to the limitations of object-oriented development. It covers key topics such as component definitions, interfaces, models, and the processes involved in component acquisition and management. Additionally, it addresses challenges like component trustworthiness and interface incompatibility, along with methods for component composition and the use of adaptor components to resolve incompatibilities.

Uploaded by

faridamsarhank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views23 pages

lec 20 Component-based software engineering

The document discusses Component-Based Software Engineering (CBSE), which emphasizes the reuse of software components as a solution to the limitations of object-oriented development. It covers key topics such as component definitions, interfaces, models, and the processes involved in component acquisition and management. Additionally, it addresses challenges like component trustworthiness and interface incompatibility, along with methods for component composition and the use of adaptor components to resolve incompatibilities.

Uploaded by

faridamsarhank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Software Engineering

CSCI 3701

Lecture 20: Component-based software


engineering

Presented By:
Prof. Sally Mohamed Elghamrawy

1
Chapter 17 Component-
based software engineering

2
Topics covered

• Components and component models


• CBSE processes
• Component composition

3
Component-based development

• Component-based software engineering (CBSE) is an approach to


software development that relies on the reuse of entities called
‘software components’.

• 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. They can exist as
stand-alone entities.

4
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?

5
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.

7
Component interfaces

• Provides interface
– Defines the services that are provided by the component to other
components.
– This interface, essentially, is the component API. It defines the
methods that can be called by a user of the component.
• Requires interface
– Defines the services that specifies what services must be made
available for the component to execute as specified.

8
Component interfaces

Note UML notation. Ball and sockets can fit together.

9
A model of a data collector component

• The ‘provides’ interface includes methods to add, remove, start,


stop, and test sensors.
• The ‘requires’ interface is used to connect the component to the
sensors. It assumes that sensors have a data interface, accessed
through sensorData.

10
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.

11
Basic elements of a component model

12
CBSE processes

• CBSE processes are software processes that support component-


based software engineering. There are two types of CBSE processes

• Development for reuse


– This process is concerned with developing components or services
that will be reused in other applications. It usually involves
generalizing existing components.
• Development with reuse
– This process is the process of developing new applications using
existing components and services.

14
CBSE processes

15
Supporting processes

• Component acquisition is the process of acquiring components for


reuse or development into a reusable component.
– It may involve accessing locally- developed components or
services or finding these components from an external source.
• Component management is concerned with managing a company’s
reusable components, ensuring that they are properly catalogued,
stored and made available for reuse.
• Component certification is the process of checking a component and
certifying that it meets its specification.

16
Component composition

• The process of assembling components to create a system.


• Composition involves integrating components with each other and
with the component infrastructure.
• Normally you have to write ‘glue code’ to integrate components.

17
Types of composition

a. Sequential composition where the composed components


are executed in sequence. This involves composing the
provides interfaces of each component.
b. Hierarchical composition where one component calls on
the services of another. The provides interface of one
component is composed with the requires interface of
another.
c. Additive composition where the interfaces of two
components are put together to create a new component.
Provides and requires interfaces of integrated component is a
combination of interfaces of constituent components.

18
Types of component composition

19
Interface incompatibility

• Parameter incompatibility where operations have the same name


but are of different types.
• Operation incompatibility where the names of operations in the
composed interfaces are different.
• Operation incompleteness where the provides interface of one
component is a subset of the requires interface of another.

20
Components with incompatible interfaces

21
Adaptor components

• Address the problem of component incompatibility by reconciling


the interfaces of the components that are composed.
• Different types of adaptor are required depending on the type of
composition.
• An addressFinder and a mapper component may be composed
through an adaptor that strips the postal code from an address and
passes this to the mapper component.

22
Composition through an adaptor

• The component postCodeStripper is the adaptor that facilitates the


sequential composition of addressFinder and mapper components.

23
An adaptor linking a data collector and a sensor

24
Photo library composition

25

You might also like