Introduction to Component-Based Software Engineering

Slides:



Advertisements
Similar presentations
Component-Based Software Engineering Main issues: assemble systems out of (reusable) components compatibility of components.
Advertisements

Components Alexey Golubev, What is a component? What is a component? The father of components? The father of components? Components and their.
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Basic Concepts in Component-Based Software Engineering
COP th Lecture September 26, 2005 COP 4009 Component-Based Software Engineering Fall 2005 Instructor: Masoud Sadjadi
Page 1 Building Reliable Component-based Systems Chapter 16 - Component based embedded systems Chapter 16 Component based embedded systems.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Page 1, July 3, 2015 CBSE – graduate course Component-Based Software Engineering Building reliable component-based systems Overview
Course Instructor: Aisha Azeem
Page 1, August 14, 2015 Advanced CBSE Advanced Component-Based Software Engineering - Course Organization Ivica Crnkovic Mälardalen University Software.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Component Software: A New Software Engineering Course H. Conrad Cunningham, Yi Liu, Pallavi Tadepalli, and Mingxian Fu Software Architecture Research Group.
Page 1, 12 September 2015 Introduction to Component-Based Software Engineering Ivica Crnkovic Mälardalen University, Department of Computer Engineering.
An Introduction to Software Architecture
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
Software Component Technology and Component Tracing CSC532 Presentation Developed & Presented by Feifei Xu.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
CSC 532 Term Paper Presentation Hybrid approach to component based Engineering  Introduction.  Component based development (CBD).  Pros and Cons of.
Component-Based Software Engineering(CBSE) Xingui Tang CS532, Fall /6/2015.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Component Oriented Programming 1 Introduction to COP.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Page 1, December 8, 2015 CBSE – graduate course Component-Based Software Engineering Building reliable component-based systems Overview
Introduction to Component-Based Software Engineering
Component-based Development Process and Component Lifecycle Ivica Crnkovic Mälardalen University, Department of Computer Engineering Sweden
CBSE Component Based Software Engineering cs. upt
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 32. Review Behavioral Patterns – Observer Pattern – Chain of command.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Lecture VIII: Software Architecture
Distributed Systems Architectures Chapter 12. Objectives  To explain the advantages and disadvantages of different distributed systems architectures.
Distributed Systems Architectures. Topics covered l Client-server architectures l Distributed object architectures l Inter-organisational computing.
J2EE Platform Overview (Application Architecture)
Software architecture
Software Engineering Lecture 4 System Modeling The Analysis Stage.
N-Tier Architecture.
IS301 – Software Engineering Dept of Computer Information Systems
Chapter 17 - Component-based software engineering
Chapter 18 Maintaining Information Systems
Unified Modeling Language
Software Design and Architecture
Distribution and components
Part 3 Design What does design mean in different fields?
Introduction to J2EE Architecture
Chapter 25: Architecture and Product Lines
Component-Based Software Engineering Testing
Chapter 16 – Software Reuse
Ch > 28.4.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Design and Maintenance of Web Applications in J2EE
Chapter 2 Database Environment Pearson Education © 2009.
Model-Driven Analysis Frameworks for Embedded Systems
Service-centric Software Engineering
Component-Based Software Engineering
Component-based Software Engineering
Lecture 1: Multi-tier Architecture Overview
Software Architecture
Component--based development
Database Environment Transparencies
Chapter 6 – Architectural Design
Chapter 27 Software Change.
An Introduction to Software Architecture
CS310 Software Engineering Lecturer Dr.Doaa Sami
ISpec: A Compositional Approach to Interface Specification
Automated Analysis and Code Generation for Domain-Specific Models
Quality Assurance for Component-Based Software Development
Chapter 17 - Component-based software engineering
Chapter 16 – Software Reuse
Design Yaodong Bi.
Presentation transcript:

Introduction to Component-Based Software Engineering Ivica Crnkovic Mälardalen University, Department of Computer Engineering Sweden ivica.crnkovic@mdh.se http://www.idt.mdh.se/~icc Page 1, 22 September 2018

Topic overview 1 The challenges of SW- how can CBD help? What is a software component? Component Architecture Specific component models Component-based Software Development Process Problems and research issues References Page 2, 22 September 2018

Topic overview 1 The challenges of SW- how can CBD help? What is a software component? Software Architecture and Software Components Basic principles of component-based approach Component-based Software Development Process Problems and research issues References Page 3, 22 September 2018

Part 1 The challenges of software development - how can component software help? Page 4, 22 September 2018

NATO conf 1968 SW crisis SW engineering components Software problems How to develop high quality software in an efficient an inexpensive way? The “software crisis” (1968) still exists: SW is late SW is buggy SW is expensive SW is difficult to understand Software is difficult to maintain (problems with software life cycle) Page 5, 22 September 2018

SW Productivity Gap (ITEA) Page 6, 22 September 2018 www.itea-office.org

Challanges of Software Engineering (The author of slides with blue background: Michel Chaudron, TUe Page 7, 22 September 2018

Page 8, 22 September 2018

Software paradigm shift Productivity © 2001 ITEA Office Assoc ITEA-Softec project Agent-based development Component-based development Object-Oriented Development Structured programming Time Design method SA/SO UML ADL’s ??? COBOL, C FORTRAN, ADA Smalltalk C++ C++ Java Agglets ? Language We have been moving system organisation since the 70-ies from mainframe to client server to the current N-tier distributed systems in development, moving towards self organising SW systems. We started software engineering technologies with structured programming (Structured Analysis and Organisation) and moved through Object-Oriented development now to Component-Based Technologies. The next step maybe Agent-based. Aspect based OO and CBT allows us to improve the requirements and system modeling, to set up SW development platforms based on re-use and COTS, using Architecture Design Languages at design level We are working at technologies to support distributed SW development. However, the Component based development is not yet well understood and broadly used. Large problems remain, e.g. including non-functional requirements at the design phase, scalability of architectures and design patterns, testing and validation in particular in a distributed environment, reconfiguration. At the same time we need to work towards the next step to allow connectivity for pervasive computing, dynamic reconfigurability, to create self-organising and self-correcting software. We could call this “agent-based development” We can be confident that the Information Society will come over us. How beneficial it will be and when the various steps will be made, depends on how we will address the challenges ahead. The above considerations will certainly shape the planning currently ongoing for the sixth FP. System organization Mainframe Client-server N-tier distributed Self-organizing 1970 1990 2000 2005 Page 9, 22 September 2018

Answer: 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 10, 22 September 2018

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 11, 22 September 2018

Component-based software construction (1) components Component #1 construction application Component Component Component #1 #2 #4 Component #2 Component Component Component #3 #3 #4 Page 12, 22 September 2018

Concentration on the business parts “30 % of SW development effort is spent on infrastructure that adds no value” Application specific Business issues GUI GUI Standard Reusable parts Communication Data model Deployment - - - - - - INFRASTRUCTURE Page 13, 22 September 2018

Part 2 What is a software component? Page 16, 22 September 2018

Architectural point of view 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 C3 C5 Page 17, 22 September 2018

Example: The architecture of a car control system Infotaiment gateway (CAN) BUS ECU Sensor Actuator ECU Sensor Actuator brake injection ECU Sensor Sensor Actuator Vehicle mechanics ECU – Electronic Control Unit Page 18, 22 September 2018

The architectural design challenge Vehicle stability Suspension Drive by wire …… Complex functions Local Control Functions Local Control Functions Basic functions Sensor Sensor Sensor Actuator Sensor Actuator How to implement complex functions based on local control functions? Page 19, 22 September 2018

Problem: resource sharing Network resources Execution resources Sensor 1 ++++++++++ Node 1 Actuator 1 Sensor 2 Node 2 Actuator 2 Sensor 3 ++++++++++ Node 3 Actuator 3 Sensor .. Node … Actuator … Sensor .. ++++++++++ Node … Actuator … Can functions of different criticality be allowed to share resources? Page 20, 22 September 2018

Challenge – open and dependable platform Collision detection Antispin Global (complex) functions Cruise control Vehicle stability local Engine Control Local brake Control Transmission ……… sensors actuators Vehicle Applications ECU SOFTWARE COMPONENTS Middleware Input/output drivers Hardware Page 21, 22 September 2018

Challenge – open and dependable platform Applications Middleware Input/output drivers Hardware ECU ECU ECU Requirements Separation of hw from SW development Separation of SW component development Page 22, 22 September 2018

Some successful components: In the past... Mathematical libraries NAGLIB - Fortran Library Mathematical and physical functions Characteristics Well defined theory behind the functions - very well standardized Simple Interface - procedural type of communication between client (application) and server (component) Well defined input and output Relative good error handling Difficult for adaptation (not flexible) Page 23, 22 September 2018

Some successful components: The big ones… Client - server type Database Relational databases, (Object-oriented databases, hierarchical databases) Standard API - SQL Different dialects of the standard X-windows Standard API, callback type of communication High level of adaptation Too general - difficult to use it Page 24, 22 September 2018

Even bigger components: Operating systems Example - Unix A general purpose OS, used as a platform for dedicated purposes Standard API - POSIX Commands uses as components in a shell-process Example: sort out words from text files: $ cat file1 file2 file3 ... | sed ’s/ /\ /g’ | sort -u >words.txt Different variants, POSIX is not sufficient Not a real component behavior (difficult to replace or update) MS Windows ... Page 25, 22 September 2018

Frameworks - building “the 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 26, 22 September 2018

Szyperski: 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, 22 September 2018

Composition unit How much costs the glue code? 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? System Glue code Components Page 28, 22 September 2018

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.) IBar IFoo IFoo2 A component may provide / implement several interfaces Page 29, 22 September 2018

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 30, 22 September 2018

What does it mean deployed independently? 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. 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? Page 31, 22 September 2018

Components and Interfaces - UML definition Component – a set of interfaces required (in-interfaces) provided (out-interfaces) Interface – set of operations Operations – input and output parameters of certain type UML metamodel of the concepts used in syntactic specification of software components Page 33, 22 September 2018

Contractually specified interfaces in a UML metamodel Page 34, 22 September 2018

Is Szyperski definition enough? Page 35, 22 September 2018

Component specification Components are described by their interfaces (A black box character) white box black box grey box glass box Page 36, 22 September 2018

Nice components that can be composed (put together) Page 37, 22 September 2018

Page 38, 22 September 2018

Page 39, 22 September 2018

Another 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, 22 September 2018

Page 41, 22 September 2018

Page 42, 22 September 2018

Page 43, 22 September 2018

Page 44, 22 September 2018

Page 45, 22 September 2018

Summary 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 c 1 c 2 Middleware Run-time system framework Component Model Page 46, 22 September 2018

Component Technology Supporting Tool Components Platform Component Framework Repository Page 47, 22 September 2018

Part 3 Software Architecture and Software Components Page 48, 22 September 2018

Software Architecture L. Bass, P. Clements, R. Kazman, Software Architecture In Practice 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.” Page 49, 22 September 2018

Aspects of Software Architecture Elements and Form (UniCon notation) Attachment Architectural Component Connector Representation Port Role (sub)System Page 50, 22 September 2018

N-Tier Architecture Presentation Logic Presentation Layer Tier Boundary Business Logic Business Logic Business Logic Database Driver Business Layer Tier Boundary Data Layer Database Page 52, 22 September 2018

N-Tier Architecture - and Components Componet componet Presentation Logic Presentation Layer Tier Boundary componet Business Logic Business Logic Business Logic componet Database Driver Business Layer Tier Boundary Data Layer Database Page 53, 22 September 2018

Different architecture view in different phases Phase I System architecture - Decomposition of the system <<subsystem>> ComA IComA <<subsystem>> ComB IComB <<subsystem>> ComC IComC Conceptual Architecture Page 54, 22 September 2018

System Design – Phase 2 Implementation Architecture - Component Identification Implementation Architecture <<imp>> ComA IComA <<imp>> ComB IComB <<imp>> ComC IComC <<imp>> ComY IComY <<imp>> SysX ISysX Page 55, 22 September 2018

System Design – Phase 3 Deployment architecture Server Deployment :ComA :ComB DataServer :SysX :ComC :ComB Page 56, 22 September 2018

Basic principles of Component-based approach Page 57, 22 September 2018

Main 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 C1 C5 C3 C4 C6 C7 Application A1 Application A2 Page 58, 22 September 2018

Main 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, 22 September 2018

Substitution 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, 22 September 2018

Substitution principle A component can be replaced if the new component Provide a sub-range of the output Can accept larger range of input C - C´ Input(c) <_ Input(c’) Output(C) _> Output(C’) CONDITION. Everything which comes from the first Tube fits to the second Page 61, 22 September 2018

Main 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, 22 September 2018

Main 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 C C1 C2 assembly Page 63, 22 September 2018

Page 64, 22 September 2018

Page 65, 22 September 2018

Page 66, 22 September 2018

Page 67, 22 September 2018

Part 5 Component-based software development process Page 68, 22 September 2018

Time to Market – “Classical” Development Process? Product Lifecycle Problems: Time To Market High Costs Meeting deadlines Visibility Requirements Specification Design Implementation Test Operation & Maintenance TIME Page 69, 22 September 2018

Development process COTS and outsourcing require different development processes Requirements Specification Design Implementation Test Find & Select Adapt Deploy Page 70, 22 September 2018

Development process – emphasize reuse Managing COTS in the early stage of the development process Requirements Specification Design Implementation Test Find & Select Test Adapt Deploy Page 71, 22 September 2018

CBD – separation of development processes Requirements Application development Specification Find & Select Design Test Implementation Adapt Test Deploy Operation & Maintenance Component development Page 72, 22 September 2018

Types of component-based development Internal components as structural entities Reusable components developed in-house COTS (commercial off the shelf) components Page 73, 22 September 2018

Product Line Architecture Core components building a core functionality (Basic platform) A set of configurable components combined building different products Page 74, 22 September 2018

Platform-based products Application layer Middleware / infrastructure Basic services Platform layer Page 75, 22 September 2018

Advantages 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 76, 22 September 2018

Building platforms The Cathedral and the Bazaar? La Sagrada Familia, Barcelona Building Started: On March 19, 1882 Still not completed Is it worth to build it in that way? Similar with platform-based And component-based development Is it worth? Page 77, 22 September 2018

Part 6 Problems and research issues Page 78, 22 September 2018

CBSE research and the SW life-cycle - SW development process - configuration management - certification - team structure Project Management Quality Management Analysis Design Implementation Testing Deployment Application Components Analysis Design Implementation Testing Deployment - assembly - finding - trusting - distribution - glue code Analysis Design Implementation Testing Deployment - development methods - frameworks - run-time infrastructures - design for customization/ variability - wrapping - specification/contracts - storage - documentation Design for Customization/Variability, Wrapping, Specification: Software product lines, Variability patterns Wrapping of legacy code, componentification of OO code e.g. based on inheritance trees(FZI work with CAP580) Storage, Documentation component repositories (see later) docu as part of code?, separate document, how formal, etc. Development Methods, Notations, Frameworks Methods: RUP, Catalysis, KobrA, Select Identification of components, design of component frameworks Notation languages: UML/OCL, Alloy (new from MIT), Z Finding and trusting of components, Assembly Application Distribution Composition models Glue code, automatic bridges Certification classification, test procedures per class of components legal issues Page 79, 22 September 2018

Specification Are 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 80, 22 September 2018

Design 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 81, 22 September 2018

Repositories How to store components? How to classify and describe components? How to find components? fast different aspects interfaces functionality component model certification level previous usage, trust negotiable requirements Page 82, 22 September 2018

Software 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 83, 22 September 2018

Versioning 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 85, 22 September 2018

Security 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 trust prove of problem origin difficulty of persecution Page 86, 22 September 2018

Part 7 Information sources Page 88, 22 September 2018

Books 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 Ivica Crnkovic & Magnus Larsson: CBSE - Building reliable component--based systems Page 89, 22 September 2018

Journals 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 90, 22 September 2018

Conferences International Workshop on Component-Based Software Engineering, ICSE, CBSE http://www.csse.monash.edu.au/~hws/CBSE10/ Euromicro CBSE track http://www.idt.mdh.se/ecbse/2007/ Page 91, 22 September 2018

Conferences International Conference on Software engineering (ICSE) ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (oopsla.acm.org) 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 Page 92, 22 September 2018