Upload
roxanne-matthews
View
219
Download
0
Tags:
Embed Size (px)
Citation preview
Page 1, April 21, 2023
Introduction toIntroduction to
Component-Based Software Component-Based Software
EngineeringEngineeringIvica Crnkovic
Mälardalen University,
Department of Computer Engineering
Sweden
http://www.idt.mdh.se/~icc
Page 2, April 21, 2023
Topic overviewTopic overview
1 The challenges of SW- how can CBD help?
2 What is a software component?
3 Basic principles of component-based approach
4 Component-based Software Development Process
5 Problems and research issues
6 References
Page 3, April 21, 2023
The challenges of software development The challenges of software development
- how can component software help?- how can component software help?
Page 4, April 21, 2023
Challanges of Software EngineeringChallanges of Software Engineering
(The author of slides with blue background: Michel Chaudron, Tue)
Page 5, April 21, 2023
Page 7, April 21, 2023
Answer: Component-based DevelopmentAnswer: Component-based Development
Idea:
Build software systems from pre-existing components (like building cars from existing components)
Building components that can be reused in different applications
Separate development of components from development of systems
Page 8, April 21, 2023
Component-Based Software Engineering (CBSE)Component-Based Software Engineering (CBSE)
Provides methods and tools for
Building systems from components
Building components as reusable units
Performing maintenance by replacement of components and introducing new components into the system
Page 9, April 21, 2023
application
Component#1
Component #
2
Component#3
Component#4
componentsComponent-based software construction (1)Component-based software construction (1)
Component
#1
Component #
2
Component#3
Component#4
construction
Page 10, April 21, 2023
Concentration on the business partsConcentration on the business parts
Business issues
GUI
Communication
GUI
Data model
Deployment
- - - - - -
INFRASTRUCTURE
StandardReusable parts
Application specific
“30 % of SW development effort is spent on infrastructure that adds no value”
Page 13, April 21, 2023
What is a software component?What is a software component?
Page 14, April 21, 2023
The software architecture of a program or computing system is the structure or structures of the system, which comprise software components [and connectors], the externally visible properties of those components [and connectors] and the relationships among them.”
Bass L., Clements P., and Kazman R., Software Architecture in Practice,
C1
C4
C2
C5C3
Architectural point of viewArchitectural point of view
1504/21/23
CORBA (Common Object Request Broker ArchitectureCORBA (Common Object Request Broker Architecture))
CORBAappsCORBAapps CORBAdomainsCORBAdomains CORBAfacilitiesCORBAfacilities
CORBAservicesCORBAservices
Another exampleAnother example
Object Management Architecture OverviewObject Management Architecture Overview
TransactionsTransactionsTransactionsTransactions EventEventEventEvent SecuritySecuritySecuritySecurity NamingNamingNamingNaming
Corba component modelCorba component model
Page 16, April 21, 2023
Page 20, April 21, 2023
Frameworks - building Frameworks - building ““the real componentsthe real components””
Component Object Management - COM, Active X
Enterprise JavaBeans
CORBA components
.NET
Late binding - easy replacement
Word document
Excel document
My_application
Excel document
component
Page 21, April 21, 2023
Example: The architecture of a car control systemExample: The architecture of a car control system
Vehicle mechanics
ECU
Sensor ActuatorSensor
ECU
Sensor ActuatorSensor
ECU
Sensor ActuatorSensor
gateway
(CAN) BUS
brake injection
Infotaiment
ECU – Electronic Control Unit
Page 22, April 21, 2023
The architectural design challenge The architectural design challenge
Vehicle stability Suspension Drive by wire …… Complex functions
Local Control Functions
Sensor ActuatorSensor
Basic functionsLocal Control Functions
Sensor ActuatorSensor
How to implement complex functions based on local control functions?
Page 23, April 21, 2023
Problem: resource sharing Problem: resource sharing
Sensor 1
Sensor 2
Sensor 3
Sensor ..
Networkresources
++++++++++
++++++++++
++++++++++Sensor ..
Executionresources
Node 1
Node 2
Node 3
Node …
Node …
Actuator 1
Actuator 2
Actuator 3
Actuator …
Actuator …
Can functions of different criticality be allowed to share resources?
Page 24, April 21, 2023
sensors
Challenge – open and dependable platformChallenge – open and dependable platform
Vehicle
actuators
Engine Control Local brake Control Transmission ………local
Vehicle stability
Cruise control
Antispin Global (complex) functions
Hardware
Input/output drivers
MiddlewareECU ECU ECU
Applications
SOFTWARE COMPONENTS
Collision detection
Page 25, April 21, 2023
Challenge – open and dependable platformChallenge – open and dependable platform
Hardware
Input/output drivers
Middleware
ECU ECUECU
Applications C1 C2
RequirementsSeparation of hw from SW developmentSeparation of SW component development
Page 26, April 21, 2023
Szyperski: Software Component DefinitionSzyperski: Software Component Definition
Szyperski (Component Software beyond OO programming)
A software component is
a unit of composition
with contractually specified interfaces
and explicit context dependencies only.
A software component
can be deployed independently
it is subject to composition by third party.
Will you meet him?
Page 27, April 21, 2023
Composition unitComposition unit
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 party. –Clemens Szyperski
How much components fit together?
How much costs the glue code?
Components
Glue codeSystem
Page 28, April 21, 2023
What is a contract?What is a contract?
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 party.
Interface – component specification
Contract - A specification attached to an interface that mutually binds the clients and providers of the components.
Functional Aspects (API)
Pre- and post-conditions for the operations specified by API.
Non functional aspects (different constrains, environment requirements, etc.)
Page 29, April 21, 2023
What is an explicit context dependency?What is an explicit context dependency?
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 party.
Provided and Required Interface
Context dependencies - Specification of the deployment environment and run-time environment
Example: Which tools, platforms, resources or other components are required?
Do
Page 30, April 21, 2023
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 party.
Late binding - dependencies are resolved at load or run-time.
What does it mean deployed independently?What does it mean deployed independently?
Platform (framework)Platform (framework)
connector
Page 32, April 21, 2023
Components and Interfaces - UML definitionComponents and Interfaces - UML definition
Component
Interface
Operation
*
in-interfaces*
*
*
Name
1
1
1 1
1
1
Parameter
1
*
Type
1 *
OutParameterInParameter
InOutParameter
*
out-interfaces
*
Component – a set of interfacesrequired (in-interfaces)provided (out-interfaces)
Interface – set of operationsOperations – input and output parameters of
certain type
Page 33, April 21, 2023
Contractually specified interfaces in a UML metamodelContractually specified interfaces in a UML metamodel
Interface
Component
*
in-interfaces*
*
out-interfaces
*
State
1 *
Constraint
*
*
* 1
Invariant
1
*
1
*
Operation
*
*
Parameter
1
*
PreCondition
* 1
PostCondition
1 *
1
*
InParameter OutParameter
*
*
*
*
*
*
*
2
Page 34, April 21, 2023
Is Szyperski definition enough?
Page 35, April 21, 2023
Component specificationComponent specification
Components are described by their interfaces
(A black box character)
glass boxglass box
black boxblack box
white boxwhite box
grey boxgrey box
Page 36, April 21, 2023
Nice components that can be composed (put together)
Page 37, April 21, 2023
Page 38, April 21, 2023
Page 39, April 21, 2023
Another definitionAnother definition
A software component is a software element that confirms a component model can be independently deployed composed without modification according to a
composition standard.
A component model defines specific interaction and composition standards.
G. Heineman, W. Councel, Component-based software engineering, putting the peaces together, Addoson Wesley, 2001
Page 40, April 21, 2023
Page 41, April 21, 2023
Page 45, April 21, 2023
Summary CBSE – basic definitionsSummary CBSE – basic definitions
The basis is the Component
Components can be assembled according to the rules specified by the component model
Components are assembled through their interfaces
A Component Composition is the process of assembling components to form an assembly, a larger component or an application
Component are performing in the context of a component framework
All parts conform to the component model
A component technology is a concrete implementation of a component model
c1 c2
Middleware
Run-time system
framework
Component Model
Page 46, April 21, 2023
Component TechnologyComponent Technology
Component Component Framework
Platfo
rmP
latform
Co
mp
on
ents
Co
mp
on
ents
RepositoryRepository
Supporting ToolSupporting Tool
Page 56, April 21, 2023
Basic principles
of
Component-based approach
Page 57, April 21, 2023
Main principles: (1) ReusabilityMain principles: (1) Reusability
Reusing components in different systems
The desire to reuse a component poses few technical constraints.
Good documentation (component specification…)
a well-organized reuse process
Similar architecture
….
C1
C1 C2
C3 C4
Application A1
C1 C5
C6 C7
Application A2
Page 58, April 21, 2023
Main principles: (2) SubstitutabilityMain principles: (2) Substitutability
Alternative implementations of a component may be used.
The system should meet its requirements irrespective of which component is used.
Substitution principles Function level Non-functional level
Added technical challenges Design-time: precise definition of
interfaces & specification Run-time: replacement
mechanism
C1 C2
C3 C4
Application A1
C1´ C2
C3 C4
Application A1
Page 59, April 21, 2023
Substitution principleSubstitution principle
Substituting a component Y for a component X is said to be safe if:
All systems that work with X will also work with Y
From a syntax viewpoint, a component can safely be replaced if:
The new component implements at least the same interfaces as the older components
From semantic point of view?
Contractual interface holds (pre-, postconditions and invariants)
Page 60, April 21, 2023
Substitution principleSubstitution principle
Principle:
A component can be replaced if the new component Provide a sub-range of the output
Can accept larger range of input
CONDITION. Everything which comes from the firstTube fits to the second
C -C - C´ C´Input(c) <_ Input(c’)Input(c) <_ Input(c’)Output(C) _> Output(C’)Output(C) _> Output(C’)
Page 61, April 21, 2023
Main principles: (3) ExtensibilityMain principles: (3) Extensibility
Comes in two flavors:
extending components that are part of a system
Increase the functionality of individual components
Added technical challenges:
Design-time: extensible architecture
Run-time: mechanism for discovering new functionality
C1 C2 C3
C1 C2+ C3
C1 C2 C3
C1 C2 C4 C3
Page 62, April 21, 2023
Main principles: (4) ComposabilityMain principles: (4) Composability
Composition of components
P(c1 o c2) =P(c1) o P(c2) ??
Composition of functions
Composition of extra-functional properties
Many challenges
How to reason about a system composed from components? Different type of properties
Different principles of compositions
C1 C2
assembly
C
Page 63, April 21, 2023
Page 64, April 21, 2023
Page 65, April 21, 2023
Page 66, April 21, 2023
23-04-21Séverine Sentilles 67
Components in Unified Modelling Components in Unified Modelling
Language (UML)Language (UML)
23-04-21Séverine Sentilles
68
Component diagramComponent diagram
Three representations for a component
But access points are required
Utilisation of interfaces
Utilisation of port
C<<component>>
C<<component>>
C
InterfacesInterfaces Role:
Specification of the access point Required functionalities Provided functionalities
2 existing representation The most descriptive The compact
<<interface>>ProvidedItf
<<component>>C
<<interface>>
RequiredItf
<<component>>C
ProvidedItf RequiredItf
70
PortsPorts
Role:
Access point to the internal structure of the component
Can have 0 or several interfaces
Representation:
<<component>>C
23-04-21Séverine Sentilles
71
Relationship between componentsRelationship between components
Use the notion of connector Roughly a way to link components together & make them
”communicate” via a request of services
Generalisation of the means of communication Example:
Client-server Pipe&filter Message exchange
Can also be called horizontal composition
<<component>>Client
<<component>>Server
IdenticalItf
23-04-21Séverine Sentilles
72
Vertical compositionVertical composition
Can also be called hierarchical composition
Role To increase the component granularity
To expose the content of the component
Use the notion of delegation connector (between two ports)
<<component>>C
<<component>>A
<<component>>B
23-04-21Séverine Sentilles
73
Profile UMLProfile UML
Extension of the UML model in order to adapt it to the particular requirements of a context
Uses Stereotypes Tagged values OCL Constraints
Examples: Profile for EJB components Profile for a software architecture
23-04-21Séverine Sentilles
74
EJB ProfileEJB Profile
23-04-21Séverine Sentilles
75
The component model PICOLOThe component model PICOLO
From “Picolo: A Simple Python Framework for Introducing Components Principles, 2005”
UML Metamodel
Page 76, April 21, 2023
Component-based software development Component-based software development
processprocess
Page 77, April 21, 2023
Time to Market – “Classical” Development Process?Time to Market – “Classical” Development Process?
Requirements
Specification
Design
Implementation
Test
Product LifecycleProblems:Problems:•Time To MarketTime To Market•High CostsHigh Costs•Meeting deadlinesMeeting deadlines•VisibilityVisibility
Operation & Maintenance
TIMETIME
Page 78, April 21, 2023
Development processDevelopment process COTS and outsourcing require different development
processes
Requirements
Specification
Design
Implementation
Test
Find & Select
Adapt
Deploy
Page 79, April 21, 2023
Development process – emphasize reuseDevelopment process – emphasize reuse
Managing COTS in the early stage of the development process
Requirements
Specification
Design
Implementation
Test
Deploy
Find & Select
Adapt
Test
Page 80, April 21, 2023
CBDCBD – separation of development processes – separation of development processes
Requirements
Specification
Design
Implementation
Test
Deploy
Find & Select
Adapt
Test
ApplicationApplicationdevelopmentdevelopment
ComponentComponentdevelopmentdevelopment
Operation &Maintenance
Page 81, April 21, 2023
Types of component-based developmentTypes of component-based development
Internal components as structural entities
Reusable components developed in-house
COTS (commercial off the shelf) components
Page 82, April 21, 2023
Product Line ArchitectureProduct Line Architecture
Core components building a core functionality
(Basic platform)
A set of configurable components combined building different products
Page 83, April 21, 2023
Platform-based productsPlatform-based products
Basic services
Middleware / infrastructure
Platform layer
Application layer
Page 84, April 21, 2023
Advantages of Software Product LinesAdvantages of Software Product Lines
Using existing infrastructure
Savings 30%-40% of efforts per product
Time to Market - improved
Larger variety of products
Uniform and recognizable functionality/interface
Better scalability (not obvious!)
Better maintainability (not obvious!)
Better possibility of component replacement
Page 86, April 21, 2023
Problems and research issuesProblems and research issues
Page 87, April 21, 2023
CBSE research and the SW life-cycleCBSE research and the SW life-cycle
AnalysisDesign
ImplementationTesting
Deployment
AnalysisDesign
ImplementationTesting
Deployment
AnalysisDesign
ImplementationTesting
Deployment
Quality Management
Project Management
ComponentsApplication
- assembly- finding - trusting - distribution- glue code
- design for customization/ variability- wrapping- specification/contracts
- development methods- frameworks
- storage- documentation
- run-time infrastructures
- configuration management
- certification- SW development process
- team structure
Page 88, April 21, 2023
SpecificationSpecificationAre more than interface method definitions
How to specify?
Interfaces, behavior (pre-/post conditions, invariants)
dependencies (required interfaces)
quality of service
How to test/verify component specifications?
How to document component specifications?
How to automatically connect components in builder tools using their specification?
How to verify the correctness of a composite system?
...
Page 89, April 21, 2023
Design for reuseDesign for reuse
Design for reuse requires additional effort
What is the best level of reuse (component granularity)?
How can the benefit of reuse be measured?
Development and documentation of component usage patterns
Page 90, April 21, 2023
RepositoriesRepositories How to store components?
How to classify and describe components?
How to find components?
fast
different aspectsinterfaces
functionality
component model
certification level
previous usage, trust
negotiable requirements
Page 91, April 21, 2023
Software development processSoftware development process
Current approach
requirements - analyses - design - implementation - test
CBSE approach must include
reuse component selection
component test
requirements reconciliation
CBSE must be supported by
modeling formalisms and tools
development tools
Page 93, April 21, 2023
Versioning and configuration managementVersioning and configuration management
Is more complex than usually (DLL hell)
especially in dynamic environments
Dependencies and composition constraints have to be resolved almost automatically
consider systems comprising thousands of components
How to do safe exchange of components e.g. upgrade, without contractual specification and proof?
All of the issues above are prerequisite for uploading and downloading of components
Page 94, April 21, 2023
SecuritySecurity
Requires trust and certification
complicated by large group of (small) vendors
‘mobile code security’ important
not user access control but code access control
current mechanisms
sandboxing: restricted functionality, restricted availability
codesigning: not necessarily suitable to establish trustprove of problem origin
difficulty of persecution
Page 96, April 21, 2023
Information sourcesInformation sources
This presentations is based on:This presentations is based on:
Ivica Crnkovic, Magnus Larsson: Building reliable component-based systems
Chapters: PART 1 The Definition and Specification of Components
Chapter 1 Basic Concepts in Component-Based Software Engineering
Chapter 2 On the Specification of Components
PART 2 SOFTWARE ARCHITECTURE AND COMPONENTS
Chapter 3 Architecting Component-based Systems
Chapter 4 Component Models and Technology
PART 3 DEVELOPING SOFTWARE COMPONENTS Chapter 6 Semantic Integrity in Component Based Development
Ivica Crnkovic: CBSE - New Challenges in Software Development
Ivica Crnkovic et al: Specification, Implementation and Deployment of Components
Page 97, April 21, 2023
Page 98, April 21, 2023
BooksBooks Ivica Crnkovic & Magnus Larsson:
CBSE - Building reliable component--based systems Clemens Szyperski: Component Software : Beyond Object-
Oriented Programming: (1998), 2003 – second edition
Alan W. Brown: Large-Scale Component-Based Development
Betrand Meyer: Object-Oriented Software Construction, 2nd
G.T. Heineman, W. Councill: CBSE Putting the Pieces Together
J. Cheesmam, J. Daniels: UML Components
K. Wallnau: Building Systems form Commercial Components
Page 99, April 21, 2023
JournalsJournals IEEE Computer
IEEE Software
IEEE Internet Computing
IEEE Transactions on Software Engineering
IEEE Transactions on Computers
ACM Transactions on Programming Languages and Systems languages and programming systems.
ACM Transactions on Software Engineering and Methodology
ACM Transactions on Computer Systems
Software Development (www.sdmagazine.com)
… all major SW development magazines
Page 100, April 21, 2023
ConferencesConferences International Conference on Software engineering (ICSE)
International Symposium of Component-based Software Engineering (CBSE) - COmpArch
Euromicro Conference on Software Engineering and Advanced Application (SEAA) – track MOCS –Model-based development, components and services
International Workshop on Component-Oriented Programming (WCOP)
Symposium on Generative and Component-Based Software Engineering
Technology of Object-Oriented Languages and Systems (TOOLS) (www.tools-conferences.com)
International Conference on Software Reuse (ICSR)
ESEC/FSE