Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Cbse Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Component-based

Software Engineering
(CBSE)

Fakhreldin Ali
fakhreldin.t.ali@gmail.com
1/25/2024
Contents
Introduction: .......................................................................................................................... 3
History:................................................................................................................................... 4
Component Characteristic: ..................................................................................................... 4
CBSE and object-oriented programming: ................................................................................ 5
Different between Components and objects: .......................................................................... 6
Component Interface: ............................................................................................................ 6
Component Interface Problems: ......................................................................................... 7
Component Composition: ....................................................................................................... 7
Component composition Types: ......................................................................................... 7
CBSE Process: ......................................................................................................................... 8
CBSE Advantages: ................................................................................................................... 9
CBSE Disadvantages:............................................................................................................. 10
Component-based Development Frameworks and Technologies .......................................... 10
CBSE Example: ...................................................................................................................... 11
Summary: ............................................................................................................................. 13
References: .......................................................................................................................... 14

Page 2 of 14
Introduction:
Component-based software engineering (CBSE) is an approach to software development that relies on
software reuse.

Components are more abstract than object classes and can be considered to be stand-alone service
providers.

Also, we can view component as an independent executable entity that can be made up of one
executable object or more, it provides a service without conceding where the component is executing or
programming language used to write the component code.

The services offered by a component are made available through an interface and all component
interactions take place through that interface.

Page 3 of 14
History:

“ This idea was first published in Douglas McIlroy's address at the NATO conference on software
engineering in Garmisch, Germany, 1968 titled Mass Produced Software Components. This conference
set out to counter the so-called software crisis.

The modern concept of a software component was largely defined by Brad Cox of Stepstone, who
called them Software ICs and set out to create an infrastructure and market for these components by
inventing the Objective-C programming language.

IBM led the path with their System Object Model (SOM) in the early 1990s, today, many successful
software component models exist” [5].

Component Characteristic:

We can summarize the main characteristic of the component in the flowing table:

Characteristic Description

A component should be independent – it should be possible to compose and


Independent deploy it without use other components. If the component needs external
services, this should be mention in a ‘requires’ interface specification.

Standardisation means that that component used in a CBSE process has to


Standardised conform to some standardised component model. This model may define
component interfaces, component meta-data, composition, deployment
documentation.

Deployable To be deployable, a component has to be self-contained and must be able to


operate as a stand-alone entity on some platform that implements the
component model.

Page 4 of 14
That’s mean all external interactions must take place through the defined
Compose able interfaces. In addition, it must provide external access to information about
itself such as its methods and attributes.

Components have to be documented so that users of the component can


Documented decide whether or not component meet their needs. The syntax and, the
semantics of the component interfaces have to be specified.

Table 3.1: Component Characteristic

CBSE and object-oriented programming:

There is link between CBSE and OOP but OOP is not prerequisite for practicing CBSE because we can built
component using any programming language do not support OOP as , we just need to defined
appropriate methodology for design and use of these component .

The idea in object-oriented programming (OOP) is that software should be written according to a mental
model of the actual or imagined objects it represents. OOP and the related disciplines of object-oriented
design and object-oriented analysis focus on modelling real-world interactions and attempting to create
'verbs' and 'nouns' which can be used in intuitive ways, ideally by end users as well as by programmers
coding for those end users [5].

Component-based software engineering, by contrast, makes no such assumptions, and instead states
that software should be developed by” gluing “ prefabricated components together much like in the field
of electronics or mechanics.

Page 5 of 14
Different between Components and objects:

1. Components are deployable entities.

2. Components do not define types.

3. Component implementations are hidden.

4. Components are language-independent.

5. Components are standardized.

6. Components change traditional programming idea to assembly.

Component Interface:

The services offered by a component are made available through an interface and all component
interactions take place through that interface, components have tow types of interfaces:
1- Provides interface :

Defines the services that are provided by the component to other components.

2- Requires interface:

Sspecifies what services must be made available for the component to execute as specified.

Requires int er face Provides int er face


Defines the services Defines the services
fromthe component’s Component that are provided
environment that it by the component
uses to other components

Figure 5.1: Component Interface [1].

Page 6 of 14
Component Interface Problems:

1- Parameter incompatibility.
2- Operation incompatibility.
3- Operation incompleteness.

Component Composition:
We mean by component composition the process of assembling components to create the targeted
software, and that’s involves integrating components with each other and with the component
infrastructure.
Normally developer have to write ‘glue code’ to integrate components so they can create the targeted
software.

Component composition Types:

1-Sequential composition:

Where the composed components are executed in sequence, this involves


composing, the provides interfaces of each component.

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

3-Additive composition:

Where the interfaces of two components are put together to create a new
component.

Page 7 of 14
A A

A B

B B

(a) (b) (c)

Figure 6.1: Component Composition Types [1].


(a) Sequential composition.
(b) Hierarchical composition.
(c) Additive composition.

CBSE Process:
In the Process of reusing components, it is essential to make trade-offs between ideal
requirements and the services actually provided by available components.

The CBSE Process involves:

• Developing outline requirements;

• Searching for components then modifying requirements according to


available functionality.

• Searching again to find if there are better components that meet the revised
requirements.

Page 8 of 14
Figure 7.1: Component bas software Engineering Process [1].

Figure 7.2: Component Identification Process [1].

CBSE Advantages:

Hear we list some of the advantages of using software component [6] :

1-Functionality: use of pre-existing components allows faster delivery of greater


functionality.

2-Maintainability: modular structure of a component-based solution allows individual


components to be replaced easily.

3-Usability: use of standard components supports commonality of GUI.

Page 9 of 14
4- Efficiency: components can be internally optimized to improve performance, without
affecting their specification; components can be moved between platforms to improve
performance, without affecting the functionality or usability of the application.

5-Reliability: because component is already tested and the errors are fixed, the application
constructed from reliable components is more reliable.

6-Portability: The specification of a component is platform-independent. So, a component


can be quickly rebuilt for a new platform, without affecting any other component.

CBSE Disadvantages:

Hear we list some of the disadvantages of using software component:

1- Component trustworthiness:
How can a component with no available source code be trusted?

2- Component certification:
Who will certify the quality of components?

3- Emergent property prediction:


How can the emergent properties of component compositions be predicted?

4- Requirement’s trade-offs:
How do we do trade-off analysis between the features of one component and another?

Component-based Development Frameworks and Technologies

Examples of component-based development frameworks and technologies include:

• JavaBeans and Enterprise JavaBeans (EJB) in Java development


• .NET Framework and .NET Core for Microsoft development
• Angular, React, and Vue.js for front-end web development
• OSGi (Open Services Gateway Initiative) for Java componentization and modularity
• Spring Framework for Java-based enterprise applications

Page 10 of 14
CBSE Example:

CBSE has become increasingly popular due to its potential for improving development speed, code
maintainability, and software quality. By promoting reusability and modular design, CBSE can lead to
more efficient development processes and more reliable software systems.

Here’s a simple PHP example that demonstrates component-based software engineering by creating and
using a reusable component. In this example, we’ll create a basic “Calculator” component that
encapsulates arithmetic operations.

Create a Calculator Component:

✓ Create a file named Calculator.php:

✓ Use the Calculator Component:

Create another file named index.php:

Page 11 of 14
In this example, we’ve created a Calculator class as a reusable component that encapsulates arithmetic
operations. The index.php file demonstrates how to use the Calculator component by performing basic
arithmetic operations.
To run the example, save both files (Calculator.php and index.php) in the same directory and access
index.php using a web browser.
Please note that this is a simplified example to illustrate the concept of component-based software
engineering in PHP. In a real-world scenario, components would likely be more complex, and you might
use tools like Composer for dependency management.

Page 12 of 14
Summary:
CBSE is an approach to defining and implementing loosely coupled components into systems its mainly
depend on reuse, and components are software units where functionality and dependencies are
completely defined by its interfaces and we any interaction between component and any other
components or system achieved throw this interface.

Software component have a characteristic like they are standard, independent, compos able, deployable
and documented.
OOP is not prerequisite for practicing CBSE, we can build component using programming language do not
support OOP as long as we defined appropriate methodology for design and use of these components.

Each software component has two types of interfaces they provide interface and the required interface,
and any connection to the component must be throw one of those interfaces.

When composing reusable components, developers normally have to write ‘glue code’ to integrate
components.

In the Process of reusing components, it is essential to make trade-offs between ideal requirements and
the services actually provided by available components.

Page 13 of 14
References:
[1] Software Engineering, Ian Sommerville, 10th edition 2010.

[2] Software Engineering, A Practitioners Approach, Roger S. Pressman.

[3] Software paradigms, Stephen Hendrick Kaisler, ISBN0471483478 ,2005.

[4] Jim Q. Ning., “Component-Based Software Engineering (CBSE)”, in Assessment of


Software Tools and Technologies, 1997., Proceedings Fifth International
Symposium on, IEEE Computer Society Press.
[5] Gössler, G., Sifakis, J.: Composition for component-based modeling. Science of
Computer Programming 55(1-3) (2005)
[6] http://www.ajevans.com/benefits.shtml.

[7] Schneider, J.-G., Nierstrasz, O.: Components, scripts and glue. In: Barroca, L., Hall, J.,
Hall, P. (eds.) Software Architectures - Advances and Applications, pp. 13–25.
Springer, Heidelberg (1999).
[8] Jifeng, H., Li, X., Liu, Z. (2005). Component-Based Software Engineering. In: Van
Hung, D., Wirsing, M. (eds) Theoretical Aspects of Computing – ICTAC 2005. ICTAC
2005. Lecture Notes in Computer Science, vol 3722. Springer, Berlin, Heidelberg.
https://doi.org/10.1007/11560647_5

Page 14 of 14

You might also like