Transcript Slide 1

Lesson 1 – Component-Based
Software Development
Software Engineering
Module 1 - Components
Teaching unit 3 – Advanced development
Ernesto Damiani
Free University of Bozen-Bolzano
CBSD
• CBSD (Component-Based Software Development)
also referred to as CBD (Component-Based
Development), is the creation and deployment of
software intensive systems assembled from
components, as well as the development and
harvesting of such components
Why you should learn SW Component
Technologies ?
• CBD enables higher level of SW reuse
• CBSD is the de facto paradigm for developing large
SW systems
– enterprise-scale distributed applications
– N-tier Web applications
Software Industry: Challenges (1)
• Constant innovation in hardware and software
– Powerful and sophisticated applications to desktops and
across networks
• Large and complex applications
– Time-consuming to develop, difficult and costly to maintain,
risky to extend with additional functionality
• Monolithic applications
– Large number of features, features that cannot be
removed, features that are upgraded independently or
replaced with alternatives easily
Software Industry: Challenges (2)
• Not easily integrated applications
– The functionality of one application cannot be available to
other applications even if they use the same machine and
are written in the same language
• Not sufficiently modular operating systems
– It is difficult to override, upgrade, replace services in a
clean and flexible fashion
• Not consistent programming models
– It depends upon where the service comes from: same
address space as the client, separate address space on the
same machine, from the operating system or from a
provider running on a separate machine across the network
Barriers to Integration
• End user: wealth of end user applications, tools
• Enterprise investment: wealth of enterprise vital
services
Aim is Barrier Free SW Reuse
• “To be able to use whatever from wherever”
Attempts at Software Reuse
• Source code copy and reuse
– Poorest form of reuse
• Procedural function libraries
– Better form of reuse, than source code copy
– Not extensible
• Class libraries
– Still better form of reuse; extensible
– Necessary a lot of understanding before classes can be
reused
– Support white-box reuse; clients affected if internals of
classes changed
– Language specific; no reuse across code in other languages
– Incompatible with other compilers/linkers other than that
used in the development of the library
Software Reuse Strategies (1)
• White-box reuse
– Source of a sw component is made available and can be
studied, reused, adapted or modified.
– OO frameworks provide this form of reuse
 rely on inheritance for reusing SW implementations
• Drawback: clients depend on the internals of a
component and will be adversely affected if the
internals change
Software Reuse Strategies (2)
• Black-box reuse
– Based on the principle of information hiding
– Interfaces specify the services a client may request from a
component; components provide implementations of
interfaces
– Interfaces specify only descriptions of component behavior
(operation signatures); do not include any implementation
– Clients rely only on interfaces; component implementations
of the interfaces are totally hidden from the clients
– Advantages: as long as the interfaces remain unchanged,
components can be changed internally without affecting
clients
SW Component Technology
• SW components provide mechanisms for a greater
level of SW reuse. They support black-box software
reuse.
What is a SW Component ?
• A package of software that provides some coherent
functionality, can be independently developed and
delivered as a unit, and provides its services through
well-defined interfaces
– modular implementations of significant business or system
functionality
– adheres to a component model
Component-Based SW Development
• Developing of applications by assembling SW
components
• Shifting of the emphasis from programming SW to
composing SW systems
Component-A
Component-B
Component-C
Component-D
CBSD – Programming Model
• Interface-based Programming
• Clients program to interfaces
– Clients do not need any knowledge of how a component
implements its interfaces
– as long as interfaces remain unchanged, clients are not
affected by changes in interface implementations
Interfaces
A
Client
program
B
<<realize>>
<<realize>>
Component-1
…
<<realize>>
Component-2
Example
Getfinalgrade(set of marks,
Grade)
IComputeGrade
Marks
Calculator
Student
Marks
Report
program
IBarChart
drawChart(set of data)
Bar
Chart
IDataAccess connectToDB(connection params)
Getmarks(student-id, marks-list)
Database
component
FINE