Cbse Notes
Cbse Notes
Cbse Notes
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
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.
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:
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.
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.
1-Sequential composition:
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
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.
• 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].
CBSE Advantages:
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.
CBSE Disadvantages:
1- Component trustworthiness:
How can a component with no available source code be trusted?
2- Component certification:
Who will certify the quality of components?
4- Requirement’s trade-offs:
How do we do trade-off analysis between the features of one component and another?
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.
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.
[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