Post on 28-Jul-2018
Page 1
Page 1, 1 November 2003
Introduction toIntroduction toComponentComponent--Based Software Based Software
EngineeringEngineeringIvica Crnkovic
Mälardalen University, Department of Computer Engineering
Swedenivica.crnkovic@mdh.se
http://www.idt.mdh.se/~icc
Page 2, 1 November 2003
Topic overviewTopic overview
1 The challenges of SW- how can CBD help?2 What is a software component?3 Component Architecture4 Specific component models5 Component-based Software Development Process6 Problems and research issues7 References
Page 2
Page 3, 1 November 2003
Part 1 Part 1 The challenges of software development The challenges of software development -- how can component software help?how can component software help?
Page 4, 1 November 2003
Software problemsSoftware problems
How to develop high quality software in an efficient an inexpensive way?
The “software crisis” (1968) still exists:
SW is lateSW is buggySW is expensiveSW is difficult to understandSoftware is difficult to maintain (problems with software life cycle)
Page 3
Page 5, 1 November 2003
SWSW problems and problems and CBDCBDSW is late SW is buggySW is expensive
… because too often applications are created instead of constructed, requiring
re-invention re-codingre-testing
Component-based software engineering can help because it focuses on reuse of
subsystemsinfrastructure
Page 6, 1 November 2003
application
Component#1
Component#2
Component#3
Component#4
componentsComponentComponent--based software construction (1)based software construction (1)
Component#1
Component#2
Component#3
Component#4
construction
Page 4
Page 7, 1 November 2003
Application 1
Component#1
Component#2
Component#3
Component#4
components
ComponentComponent--based software construction (2)based software construction (2)
Component#1
constructionApplication 2
Component#1
Component#5
Component#3
Component#6
Page 8, 1 November 2003
application
Component#1
Component#2
Component#3
Component#4
NewComponent
#4
component
update
ComponentComponent--based software construction (3)based software construction (3)
Page 5
Page 9, 1 November 2003
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 10, 1 November 2003
Is CBD the same as OOIs CBD the same as OOPP??
Object-oriented programming
ObjectObjectAttributesAttributesMethodsMethods
ObjectObjectAttributesAttributesMethodsMethodsMessageMessage
Are objects the same as components?Are objects the same as components?
Page 6
Page 11, 1 November 2003
Side remark: OO and reuseSide remark: OO and reuseObject orientation is not primarily concerned with reuse, but with appropriate domain/problem representationusing the technological enablers
Objects, classes, inheritance, polymorphism Experience has shown that the use of OO does not necessarily produce reusable SW
CBD scale reusable entities: Component = many objects in collaboration reusable parts on the execution level (plug-in)Additional services provided by component models
Page 12, 1 November 2003
Part 2 Part 2 What is a component?What is a component?
Page 7
Page 13, 1 November 2003
Different understandings…Different understandings…
Architectural point of viewThe 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,
Page 14, 1 November 2003
Software architecture Software architecture –– and architectural componentsand architectural components
SystemSystem
subsystemsubsystem SubsystemSubsystem
componentcomponent componentcomponent componentcomponent
Page 8
Page 15, 1 November 2003
Aspects architectural componentsAspects architectural components
Connector
RolePort
Attachment
Assembly(compositions)
Component
Elements and Form
Page 16, 1 November 2003
SensorSensor
Different understandings Different understandings –– Automotive IndustryAutomotive Industry
Vehicle stabilityVehicle stability SuspensionSuspension Drive by wireDrive by wire ……………………
Local control functionLocal control function
SensorSensor ActuatorActuator
Component Component –– combination of hardwarecombination of hardwareand software (ECU)and software (ECU)
Functional componentsFunctional components
ImplementationsImplementations
VehicleVehiclemechanicsmechanics
ComputerComputerDrive UnitDrive Unit
Signal Signal condcond..
ActuatorActuator
SensorSensor
BusComputerComputer
Drive UnitDrive Unit
Signal Signal condcond..
ActuatorActuator
SensorSensor
ComputerComputerDrive UnitDrive Unit
Signal Signal condcond..
ActuatorActuator
SensorSensor
Page 9
Page 17, 1 November 2003
Some successful components: In the past...Some successful components: In the past...
Mathematical librariesNAGLIB - Fortran Library Mathematical and physical functions
CharacteristicsWell defined theory behind the functions - very well standardizedSimple Interface - procedural type of communication between client (application) and server (component)Well defined input and outputRelative good error handlingDifficult for adaptation (not flexible)
Page 18, 1 November 2003
Some successful components: The big ones…Some successful components: The big ones…
Client - server typeDatabase
Relational databases, (Object-oriented databases, hierarchical databases)Standard API - SQLDifferent dialects of the standard
X-windowsStandard API, callback type of communicationHigh level of adaptationToo general - difficult to use it
Page 10
Page 19, 1 November 2003
Even bigger components: Operating systemsEven bigger components: Operating systems
Example - UnixA general purpose OS, used as a platform for dedicated purposesStandard API - POSIXCommands uses as components in a shell-processExample: sort out words from text files:
$ cat file1 file2 file3 ... | sed ’s/ /\/g’ | sort -u >words.txt
Different variants, POSIX is not sufficientNot a real component behavior (difficult to replace or update)
Page 20, 1 November 2003
Frameworks Frameworks -- building “the real components”building “the real components”
Component Object Management - COM, Active XEnterprise JavaBeansCORBA components.NET
Late binding - easy replacement
Word document
Excel document
My_application
Excel document
component
Page 11
Page 21, 1 November 2003
Component definition (Component definition (SzyperskiSzyperski))
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.
How much components fit together?How much costs the glue code?
ComponentsGlue code
System
Page 22, 1 November 2003
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.
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.)
A component may provide/ implement several interfaces
IBar
IFoo
IFoo2
Page 12
Page 23, 1 November 2003
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.
Context dependencies - Specification of the deployment environment and run-time environment
Example: Which tools, platforms, resources or other components are required?
Do existing component models have support for declaring the dependencies?
Is it possible to verify if the environment comply with the context required?
Page 24, 1 November 2003
A software component is a unit of composition with contractuallyspecified 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.Replacing of a component independent of the client (main application) if the contract is not broken.Delegation - interaction with a weak coupling (for example no inheritance).
Which problems can occur in relation to late binding?How can we guarantee that a replacement of a component will not affect other parts of the system?
What does it mean deployed independently?What does it mean deployed independently?
Page 13
Page 25, 1 November 2003
CBS vs. subsystem structuringCBS vs. subsystem structuring
Component-based systemfocus is on interfaces between unitsmultiple instances of one component (class) in the running systemcomposition, bottom-up
System with subsystems
focus is on functional units
structuring, top-down
Page 26, 1 November 2003
Part 2 Part 2 -- SummarySummary
What is component?
No clearly defined conceptNo revolutionary technology
Most important features can be summarized asinterfacesInfrastructureIndependent deployment
Page 14
Page 27, 1 November 2003
Part 3 Part 3 Component ArchitectureComponent Architecture
Page 28, 1 November 2003
NN--Tier Architecture Tier Architecture
DatabaseDatabase
Tier Boundary
BusinessLogic
BusinessLogic
DatabaseDriver
DatabaseDriver
BusinessLogic
BusinessLogic
BusinessLogic
BusinessLogic
PresentationLogic
PresentationLogic
Data Layer
Business Layer
Tier BoundaryPresentation Layer
Page 15
Page 29, 1 November 2003
NN--Tier Architecture Tier Architecture -- and Componentsand Components
DatabaseDatabase
Tier Boundary
BusinessLogic
BusinessLogic
DatabaseDriver
DatabaseDriver
BusinessLogic
BusinessLogic
BusinessLogic
BusinessLogic
PresentationLogic
PresentationLogic
Data Layer
Business Layer
Tier BoundaryPresentation Layer
ComponetComponet
componetcomponet
componetcomponet
componetcomponet
Page 30, 1 November 2003
Different architecture view in different phasesDifferent architecture view in different phases
Phase I System architecture - Decomposition of the system
<<subsystem>>ComAIComA
<<subsystem>>ComBIComB
<<subsystem>>ComCIComC
ConceptualArchitecture
Page 16
Page 31, 1 November 2003
System Design System Design –– Phase 2Phase 2
Implementation Architecture - Component Identification
<<imp>>ComAIComA
<<imp>>ComBIComB
<<imp>>ComCIComC
<<imp>>SysXISysX
<<imp>>ComYIComY
ImplementationArchitecture
Page 32, 1 November 2003
System Design System Design –– Phase 3Phase 3
Deployment architecture
:ComB:SysX :ComC
:ComA
DeploymentArchitecture
:ComB
Server
DataServer
Page 17
Page 33, 1 November 2003
Part 4 Part 4 Specific component modelsSpecific component models
Page 34, 1 November 2003
Component models (technologies)Component models (technologies)
There are many component technologiesIn-house developed Domain specificPlatform specificLanguage-related
Standards and de facto standardsCOM.NETJavaBeans, Enetrpise JavaBeansCORBA, CCM……
Page 18
Page 35, 1 November 2003
Part 5Part 5ComponentComponent--based software development based software development processprocess
Page 36, 1 November 2003
Time to Market Time to Market –– “Classical” Development Process?“Classical” Development Process?
Requirements
Specification
Design
Implementation
Test
Product LifecycleProblems:Problems:••Time To MarketTime To Market••High High CostsCosts••MeetingMeeting deadlinesdeadlines••VisibilityVisibility
Operation & Maintenance
TIMETIME
Page 19
Page 37, 1 November 2003
Development processDevelopment processCOTS and outsourcing require different development processes
Requirements
Specification
Design
Implementation
Test
Find & Select
Adapt
Deploy
Page 38, 1 November 2003
Development process Development process –– emphasize reuseemphasize reuse
Managing COTS in the early stage of the development process
Requirements
Specification
Design
Implementation
Test
Deploy
Find & Select
Adapt
Test
Page 20
Page 39, 1 November 2003
CBDCBD –– separation of development processesseparation of development processes
Requirements
Specification
Design
Implementation
Test
Deploy
Find & Select
Adapt
Test
ApplicationApplicationdevelopmentdevelopment
ComponentComponentdevelopmentdevelopment
Operation &Maintenance
Page 40, 1 November 2003
Part 6Part 6Problems and research issuesProblems and research issues
Page 21
Page 41, 1 November 2003
CBSE research and the SW lifeCBSE research and the SW life--cyclecycle
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 42, 1 November 2003
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 22
Page 43, 1 November 2003
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 44, 1 November 2003
RepositoriesRepositoriesHow to store components?How to classify and describe components?How to find components?
fastdifferent aspects
interfacesfunctionalitycomponent modelcertification levelprevious usage, trust
negotiable requirements
Page 23
Page 45, 1 November 2003
Software development processSoftware development processCurrent approach
requirements - analyses - design - implementation - test
CBSE approach must includereuse component selectioncomponent testrequirements reconciliation
CBSE must be supported bymodeling formalisms and toolsdevelopment tools
Page 46, 1 November 2003
Organizational changesOrganizational changes
New mind-set: create -> construct Allocate reuse management staff (repository, training)Accept short term productivity reduction Accept new business model: first use of a component designed for reuse may not recover production costMore interdepartmental cooperation and trust necessary
“Through at least 2002, most IS organizations will be unable to achieve anticipated CBD payback due to factors such as undefined goals, conflicts of purpose, inflexibility in component design, domain scope or turf wars, and inadequate reuse infrastructure” [Gartner]
Page 24
Page 47, 1 November 2003
Developing a component marketDeveloping a component marketImperative feature for component success
Have to establish framework for …?legal aspects (licensing and warranties)technical abilitieseconomic forces
Proven business caseRepositories, precise descriptions and search enginesDocumentations and application support
Page 48, 1 November 2003
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 componentsHow 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 25
Page 49, 1 November 2003
SecuritySecurity
Requires trust and certificationcomplicated by large group of (small) vendors‘mobile code security’ important
not user access control but code access controlcurrent mechanisms
sandboxing: restricted functionality, restricted availabilitycodesigning: not necessarily suitable to establish trust
prove of problem origindifficulty of persecution
Page 50, 1 November 2003
Problems and research issues Problems and research issues -- SummarySummary
Contracts and documentationDesign for reuseRepositoriesSoftware development processOrganizational changesDeveloping a component marketVersioning and configuration managementSecurityComponent models for embedded systems