it323 - software engineering 2 1 tutorial 5. what is component composition? what are the three...

16
Component-Based Software Engineering (CBSE) IT323 - Software Engineering 2 1 Tutorial 5

Upload: caroline-wright

Post on 24-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

Component-Based Software Engineering

(CBSE)

IT323 - Software Engineering 2 1

Tutorial 5

Page 2: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

What is component composition?

What are the three different types of

composition?

2

Q7

Page 3: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

The process of assembling components to create a system.

Types of composition Sequential composition Hierarchical composition Additive composition

3

Answer :

Page 4: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

What are the two principal component interfaces?

4

Q3

Page 5: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

5

Answer :

A provides interface that defines the services provided by that component to

other components.

A requires interface that defines the services expected by a components

when it is integrated with other components. If these services are not available, then the provides interface cannot be guaranteed.

Page 6: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

Consider the two components below: Data collector and

Sensor. The Data collector component requires the

services provided by Sensor component to get the

SensorManagement and SensorData. From the above

specification, compose the two components. Which type

of component composition used? Is there any type of

interface incompatibility ?

6

Q1

Provides interfaceRequires interface

Data collector

addSensorremoveSensorstartSensor

stopSensor

testSensor

listAllreport

initialise

sensorManagement

sensorData

Page 7: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

7

Answer : Type of Composition: Hierarchical composition. Type of interface incompatibility:

◦ Operation incompleteness.◦ Operation incompatibility.

Data collector

addSensorremoveSensorstartSensor

stopSensortestSensor

listAllreportinitialise

sensorManagement

sensorData

Adaptersensor

start

getdata

stop

Page 8: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

In a photo library system, components are used to

implement a system that download images from a digital

camera and stores them in a photograph library. The

components are: Photo Library, Image Manager, and User

interface. Each component provides the following services:

◦ Photo Library:public void addItem (Identifier pid ; Photograph p; CatalogEntry

photodesc) ;

◦ Image Manager:public Photograph retrieve (Identifier pid) ;

◦ User interface:public CatalogEntry catEntry (Identifier pid) ;

Compose the components using the right composition type?

8

Q2

Page 9: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

9

Answer :

Page 10: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

Give 6 examples of general services

that might be implemented in

component model middleware

support?

10

Q4

Page 11: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

11

Answer : Component management.

Transaction management.

Resource management.

Concurrency.

Persistence.

Security.

Page 12: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

Give examples of changes you

might make to a component to

make it more reusable?

12

Q5

Page 13: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

13

Answer : Remove application-specific methods

Generalize names

Add methods to provide more coverage

Make exception handling consistent

Add a configuration interface

Integrate required components

Page 14: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

What are the stages of the CBSE

process?

14

Q6

Page 15: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

15

Answer : Outline system requirements

Identify candidate components

Modify requirements to fit components

Architectural design

Identify candidate components

Compose components

Page 16: IT323 - Software Engineering 2 1 Tutorial 5.  What is component composition? What are the three different types of composition? 2

Thank you

16