Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the...

16
1 Component-Based Software Engineering Dr R Bahsoon 1 Unit 3. Engineering Component-Based Software: Processes and lifecycle Dr. Rami Bahsoon School of Computer Science The University Of Birmingham [email protected] www.cs.bham.ac.uk/~rzb Office 112 Y9- Computer Science Component-Based Software Engineering Dr R Bahsoon 2 Question How do you distinguish the process of “Component Development” from that of “Systems development with Components”? Component-Based Software Engineering Dr R Bahsoon 3 Recall.. Software Process A structured set of activities required to develop a software system – Specification; – Design; – Validation; – Evolution. •A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective.

Transcript of Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the...

Page 1: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

1

Component-Based Software EngineeringDr R Bahsoon

1

Unit 3. Engineering Component-Based Software: Processes and lifecycle

Dr. Rami BahsoonSchool of Computer ScienceThe University Of [email protected]/~rzb

Office 112 Y9- Computer Science

Component-Based Software EngineeringDr R Bahsoon

2

Question

How do you distinguish the process of “Component Development” from thatof “Systems development with Components”?

Component-Based Software EngineeringDr R Bahsoon

3

Recall.. Software Process

• A structured set of activities required to develop a software system

– Specification;

– Design;

– Validation;

– Evolution.

• A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective.

Page 2: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

2

Component-Based Software EngineeringDr R Bahsoon

4

• The waterfall model– Separate and distinct phases of specification and development.

• Evolutionary development– Specification, development and validation are interleaved.

• Component-based software engineering– The system is assembled from existing components.

Recall… Process Models: Examples

Component-Based Software EngineeringDr R Bahsoon

5

Recall… Waterfall Model

Component-Based Software EngineeringDr R Bahsoon

6

Recall… Evolutionary Development

• Exploratory development – Objective is to work with customers and to evolve a final system from an initial outline specification.

– Start with well-understood requirements and add new featuresas proposed by the customer.

• Throw-away prototyping– Objective is to understand the system requirements. Should start with poorly understood requirements to clarify what is really needed.

Page 3: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

3

Component-Based Software EngineeringDr R Bahsoon

7

Recall… Evolutionary Development

Component-Based Software EngineeringDr R Bahsoon

8

Recall… Incremental Development

Reference: A. Finkelstein

Component-Based Software EngineeringDr R Bahsoon

9

Recall… Spiral Model

Page 4: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

4

Component-Based Software EngineeringDr R Bahsoon

10

Recall… RUP Model

Component-Based Software EngineeringDr R Bahsoon

11

Challenges in Software Engineering

• Complexity – The size and complexity of software is increasing rapidly

• Change, maintenance & continuous evolution– Users’ Requirements and the environment in which the software works are in continuous change…

– Changes in non-functional requirements have global impact to threat software stability

– Legacy systems: old and valuable systems must be maintained, updated, and be integrated with new systems

– Software upgrades are expected after deployment…

Development and evolution costs for long-lifetime systems

System evolutionSystem developmentTime

Component-Based Software EngineeringDr R Bahsoon

12

Challenges in Software Engineering

• Architecting dependable software– Software must be trustworthy by its users

Dependability

Availability Reliability Security

The ability of the systemto deliver services when

requested

The ability of the systemto deliver services as

specified

The ability of the systemto operate withoutcatastrophic failure

The ability of the systemto protect itelf against

accidental or deliberateintrusion

Safety

Page 5: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

5

Component-Based Software EngineeringDr R Bahsoon

13

Challenges in Software Engineering

• Single products become part of product family

• Heterogeneity– Software that can cope with heterogeneous platforms and execution environments

• E.g. Fixed distributed and mobile environments

• Time to market• There is increasing pressure for faster delivery of software to gain competitive advantage

Component-Based Software EngineeringDr R Bahsoon

14

Challenges in Software Engineering

Concentration on the business issues…“Around 30% of the development effort is spent

on the infrastructure that add no value”

Component-Based Software EngineeringDr R Bahsoon

15

Another Shift in Paradigm…

1970 1990 2000

Page 6: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

6

Component-Based Software EngineeringDr R Bahsoon

16

Shift in Effort…

Waterfall model

Iterative development

Component-based software engineering

Specification Design Development Integration and testing

25 50 75 1000

Specification Development Integration and testing

25 50 75 1 000

Specification Iterative developmentSystem testing

25 50 75 1 000

In CBSE much of the effort/cost are spent on integration and testing…

Component-Based Software EngineeringDr R Bahsoon

17

Component-Based Software Engineering

• Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-the-shelf) systems.

• Process stages– Component analysis;– Requirements modification;– System design with reuse;– Development and integration.

• Emphasis is on Reuse � Reuse-oriented development• This approach is becoming increasingly used as component standards have emerged.

Component-Based Software EngineeringDr R Bahsoon

18

Reuse-Oriented Development

Analyse written softwareDo existing software/packages fit my need?

e.g. Ariane 5 doesn’t require the 64bit conversion…. Drop it!

Page 7: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

7

Component-Based Software EngineeringDr R Bahsoon

19

The CBSE process

• When reusing components, – It is essential to make trade-offs between ideal requirements and the services actually provided by available components.

• This involves:– Developing outline requirements;– Searching for components then modifying requirements according to available functionality

– Searching again to find if there are better components that meet the revised requirements.

Component-Based Software EngineeringDr R Bahsoon

20

The CBSE process

Component-Based Software EngineeringDr R Bahsoon

21

The Component Identification Process

Page 8: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

8

Component-Based Software EngineeringDr R Bahsoon

22

Component identification issues

• Trust.– You need to be able to trust the supplier of a component

– At best, an untrusted component may not operate as advertised; at worst, it can breach your security

• Requirements. – Different groups of components will satisfy different requirements

• Validation.– The component specification may not be detailed enough to allow comprehensive tests to be developed.

– Components may have unwanted functionality. How can you test this will not interfere with your application?

Component-Based Software EngineeringDr R Bahsoon

23

Component composition

• The process of assembling components to create a system

• Composition involves integrating components with each other and with the component infrastructure

• Normally you have to write ‘glue code’ to integrate components

Component-Based Software EngineeringDr R Bahsoon

24

V Development Process for CBS

Software process

Page 9: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

9

Component-Based Software EngineeringDr R Bahsoon

25

V Development Process for CBS

Component-Based Software EngineeringDr R Bahsoon

26

CBS Process

Component-Based Software EngineeringDr R Bahsoon

27

CBS Process

• Requirements: Requirements definition → use case model and business concept model

• Specification: Component Identification, Component Interaction, and Component Specification

• Provisioning: determine what components to build, buy or reuse

• Assembly: guide correct integration of components, existing assets and suitable user interface → application that meets business needs

Theses phases replace analysis, design and implementation phases in processes like RUP.

Page 10: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

10

Component-Based Software EngineeringDr R Bahsoon

28

Component Identification

Component-Based Software EngineeringDr R Bahsoon

29

Component Interaction

Component-Based Software EngineeringDr R Bahsoon

30

Systematic Software Reuse

• In most engineering disciplines, systems are designed by composing existing components that have been used in other systems

• Software engineering has been more focused on original development…

• To achieve “potentially” better software, more quickly and at lower cost, we need to adopt a design process that is based on systematic software reuse...

Page 11: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

11

Component-Based Software EngineeringDr R Bahsoon

31

Reuse Approaches & Landscape

Design patterns

Generic abstractions that occur across applications are represented as design patterns that show abstract and concrete objects and interactions

Component-based development

Systems are developed by integrating components that conform to component-model standards

Application frameworks

Collections of abstract and concrete classes that can be adapted and extended to create application systems

Legacy system wrapping

Legacy systems that can be ‘wrapped’ by defining a set of interfaces and providing access to these legacy systems through these interfaces

Component-Based Software EngineeringDr R Bahsoon

32

Reuse Approaches & Landscape

Application product lines

An application type is generalised around a common architecture so that it can be adapted in different ways for different customers

COTS integration

Systems are developed by integrating existing application systems

Service-oriented systems

Systems are developed by linking shared services that may be externally provided

Program libraries

Class and function libraries implementing commonly-used abstractions are available for reuse

Component-Based Software EngineeringDr R Bahsoon

33

Benefits of Reuse

Increased dependability

Reused software, that has been tried and tested in working systems, should be more dependable than new software. The initial use of the software reveals any design and implementation faults

Reduced process risk

If software exists, there is less uncertainty in the costs of reusing that software than in the costs of development. This is particularly true when relatively large software components such as sub-systems are reused

Effective use of specialists

Instead of application specialists doing the same work on different projects, these specialists can develop reusable software that encapsulate their knowledge

Page 12: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

12

Component-Based Software EngineeringDr R Bahsoon

34

Benefits of Reuse

Standards compliance

Some standards, such as user interface standards, can be implemented as a set of standard reusable components. The use of standard user interfaces, for example, improves dependability as users are less likely to make mistakes when presented with a familiar interface

Accelerated development

Bringing a system to market as early as possible is often more important than overall development costs. Reusing software can speed up system production because both development and validation time should be reduced

Component-Based Software EngineeringDr R Bahsoon

35

Problems with Reuse

Creating and maintaining a component library

Populating a reusable component library and ensuring the software developers can use this library can be expensive. Our current techniques for classifying, cataloguing and retrieving software components are immature

Finding, understanding and adapting reusable components

Software components have to be discovered in a library, understood and, sometimes, adapted to work in a new environment. A component search is part of the normal development process

Component-Based Software EngineeringDr R Bahsoon

36

Problems with Reuse

Increased maintenance costs

If the source code of a reused software system or component is not available then maintenance costs may be increased as the reused elements of the system may become increasingly incompatible with system changes

Lack of tool support

CASE toolsets may not support development with reuse. It may be difficult or impossible to integrate these tools with a component library system. The software process assumed by these tools may not take reuse into account

Not-invented-here syndrome

Some software engineers sometimes prefer to re-write components as they believe that they can improve on the reusable component. This is partly to do with trust and partly to do with the fact that writing original software is seen as more challenging than reusing other people’s software

Page 13: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

13

Component-Based Software EngineeringDr R Bahsoon

37

Case Study: Ariane 5

• In 1996, the 1st test flight of the Ariane 5 rocket ended in disaster when the launcher went out of control 37 seconds after take off

• The problem was due to a reused component from a previous version of the launcher (the Inertial Navigation System) that failed because assumptions made when that component was developed did not hold for Ariane 5

• The functionality that failed in this component was not required in Ariane 5

– http://www.dailymotion.com/video/x256qu_explosion-ariane-5_events

Component-Based Software EngineeringDr R Bahsoon

38

Case Study: Ariane 5

• On June 4, 1996 Ariane 5 rocket launched by the European Space Agency exploded just forty seconds after its lift-off from French Guiana

http://www.cnn.com/WORLD/9606/04/rocket.explode/ariane.mov

• The rocket was on its first voyage, after a decade of development costing $7 billion. The destroyed rocket and its cargo were valued at $500 million

• A board of inquiry investigated the causes of the explosion and in two weeks issued a report

Component-Based Software EngineeringDr R Bahsoon

39

Case study: Ariane 5

• Software failure in the inertial reference system occurred when an attempt to convert a 64-bit floating point number to a signed 16-bit integer causing overflow.– Specifically a 64 bit floating point number relating to the horizontal velocity of the rocket with respect to the platform was converted to a 16 bit signed integer.

– The number was larger than 32,767, the largest integer storeable in a 16 bit signed integer, and thus the conversion failed!

– There was no exception handler associated with the conversion so the system exception management facilities were invoked. These shutdown the software!

– REUSE!

System Backup

Page 14: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

14

Component-Based Software EngineeringDr R Bahsoon

40

Model Driven Development

• The software development process is driven by the activity of modelling (with UML)

• Supports full lifecycle: analysis, design, implementation, deployment, maintenance, evolution and integration with later systems

• Builds in Interoperability and Portability

• Lowers initial cost and maximises return-on-investment

• Applies directly to the mix you face:• Programming language; Network; Operating system, Middleware

Component-Based Software EngineeringDr R Bahsoon

41

The Model-Driven Process

Component-Based Software EngineeringDr R Bahsoon

42

MDA Framework

• A model is a description of a system.

• A PIM describes a system without any knowledge of the final implementation platform.

• A PSM describes a system with full knowledge of the final implementation platform.

• A transformation definition describes how a model in a source language can be transformed into a model in a target language.

• A transformation tool performs a transformation for a specific source model according to a transformation definition.

Page 15: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

15

Component-Based Software EngineeringDr R Bahsoon

43

PIM - Platform Independent Model

• Platform Independent Model

– Model with a high level of abstraction independent of any implementing technology.

– Specifies the system from the viewpoint of how it best supports the business.

– Whether a system will be implemented on a mainframe with a relational database or on an EJB application server plays no role in a PIM.

Component-Based Software EngineeringDr R Bahsoon

44

PSM – Platform Specific Model

• A transformation of PIM tailored to specify a system in terms of the implementation constructs available in the chosen implementation technology

• A PIM is transformed into one or more PSMs: for each specific technology platform a separate PSM is generated.– For example, an EJB PSM is a model of the system in terms of EJB structures.

– It typically contains EJB specific terms like “home interface”, “entity bean”, “session bean” and so on.

– A relational database PSM includes terms like “table”, “column”, “foreign key”, and so on.

Component-Based Software EngineeringDr R Bahsoon

45

Code

• The final step in the development is the transformation of each PSM to code.

• A PSM fits its technology closely and so this transformation is relatively straightforward.

• MDA defines the PIM, PSM, and code and also defines how these relate to each other.

Page 16: Question - University of Birminghamrzb/CBSFund.pdf · • A board of inquiry investigated the causes of the explosion and in two weeks issued a report Component-Based Software Engineering

16

Component-Based Software EngineeringDr R Bahsoon

46

Tool Support & References

• AndroMDAhttp://www.andromda.org/

• An extensible open source generator framework that adheres to the Model Driven Architecture (MDA) paradigm.

• Models from UML tools can be transformed into deployable components for your choice of platform (J2EE, Spring, .NET).

• References:– OMG

http://www.omg.org/mda– Book by A. Kleppe et al., MDA Explained, Addison-Wesley, 2003• http://www.klasse.nl/mdaexplained

Component-Based Software EngineeringDr R Bahsoon

47

Provisioning

• Source component implementations either – by directly implementing the specification or

– by finding an existing component that fits the specification

• The component specification is as independent as possible from target technologies/platforms