developing component- based systems x liu, school of computing, napier university tip this chapter...

19
Developing Developing Component-Based Component-Based Systems Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniq to develop component-based system i.e., architecture design, components and interface, component assembly, and testing.

Upload: conrad-todd

Post on 05-Jan-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Developing Component-Developing Component-Based SystemsBased Systems

X LIU, School of Computing, Napier University

TIP This chapter discusses the techniquesto develop component-based systems,

i.e., architecture design,components and interface,

component assembly, and testing.

Page 2: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

What is architectureWhat is architecture

• The software architecture of a program or The software architecture of a program or computing system is the structure or computing system is the structure or structures of the system, which comprise structures of the system, which comprise software components, the externally software components, the externally visible properties of those components, visible properties of those components, and the relationships among them. and the relationships among them.

Page 3: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

What is architectureWhat is architecture

• The architecture is not the operational software, The architecture is not the operational software, rather, it is a representation that enables a rather, it is a representation that enables a software engineer tosoftware engineer to

– Analyze the effectiveness of the design in Analyze the effectiveness of the design in meeting its stated requirementsmeeting its stated requirements

– Consider architectural alternatives at a stage Consider architectural alternatives at a stage when making design changes is still relatively when making design changes is still relatively easyeasy

– Reducing the risks associated with the Reducing the risks associated with the construction of the softwareconstruction of the software

Page 4: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Why is architecture Why is architecture importantimportant• Representations of software architecture are an Representations of software architecture are an

enabler for communication between all parties enabler for communication between all parties interested in the development of a computer-based interested in the development of a computer-based systemsystem

• The architecture highlights early design decisions that The architecture highlights early design decisions that will have a profound impact of all software engineering will have a profound impact of all software engineering work that follows, and as important, on the ultimate work that follows, and as important, on the ultimate success of the system as an operational entitysuccess of the system as an operational entity

• Architecture constitutes a relatively small, intellectually Architecture constitutes a relatively small, intellectually graspable model of how the system is structured and graspable model of how the system is structured and how its components work togetherhow its components work together

Page 5: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Components and Components and architecturearchitecture

• A component system architecture A component system architecture consists of consists of

– a set of platform decisionsa set of platform decisions

– a set of component frameworksa set of component frameworks

– an interoperation design for the an interoperation design for the component frameworks.component frameworks.

Page 6: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

PlatformPlatform• A platform is the substrate that allows for installation of A platform is the substrate that allows for installation of

components and component frameworks, such that these can components and component frameworks, such that these can be instantiated and activated. be instantiated and activated.

• A platform can be concrete or virtual. A platform can be concrete or virtual.

• Concrete platforms provide direct physical support, that is Concrete platforms provide direct physical support, that is implement their services in hardwareimplement their services in hardware

• Virtual platforms, also called platform abstractions or platform Virtual platforms, also called platform abstractions or platform shields, emulate a platform on top of another, introducing a shields, emulate a platform on top of another, introducing a cost-flexibility trade-off.cost-flexibility trade-off.

• In practice, all platforms are virtual to some degree, and a In practice, all platforms are virtual to some degree, and a sharp distinction is academic.sharp distinction is academic.

Page 7: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Component FrameworkComponent Framework• A component framework is a dedicated and focused A component framework is a dedicated and focused

architecture, usually around a few key mechanisms, and architecture, usually around a few key mechanisms, and a fixed set of policies for mechanisms at the component a fixed set of policies for mechanisms at the component level.level.

• Component frameworks often implement protocols to Component frameworks often implement protocols to connect participating components and enforce some of connect participating components and enforce some of the polices set by the framework. the polices set by the framework.

• The polices governing the use of the mechanisms that The polices governing the use of the mechanisms that are used by the framework itself are not necessarily are used by the framework itself are not necessarily fixed, instead, they can be left to higher-level fixed, instead, they can be left to higher-level architectures.architectures.

Page 8: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Interoperation DesignInteroperation Design

• A interoperation design for A interoperation design for component frameworks comprises component frameworks comprises the rules of interoperation among all the rules of interoperation among all the frameworks joined by the the frameworks joined by the system architecturesystem architecture

Page 9: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

The Structure of a The Structure of a ComponentComponent

• A component is a set of normally simultaneously A component is a set of normally simultaneously deployed atomic components.deployed atomic components.

• The distinction between components and The distinction between components and atomic components caters for the fact that most atomic components caters for the fact that most atomic components will never de deployed atomic components will never de deployed individually, although they could. individually, although they could.

• Instead, most atomic components belong to a Instead, most atomic components belong to a family of components and a typical deployment family of components and a typical deployment will cover the entire family.will cover the entire family.

Page 10: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

The Structure of a The Structure of a ComponentComponent

• An atomic component is a module and a set of An atomic component is a module and a set of resourcesresources

• Atomic components are the elementary units Atomic components are the elementary units of deployments, versioning and replacement. of deployments, versioning and replacement. Although usually deployed in groups, individual Although usually deployed in groups, individual deployment is possible.deployment is possible.

• A module is a set of classes and possible non-A module is a set of classes and possible non-object-oriented constructs, such as procedures object-oriented constructs, such as procedures or functions.or functions.

Page 11: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Architectural stylesArchitectural styles

• Any software system is based on certain Any software system is based on certain architectural style. architectural style.

• Each style describes a system category that Each style describes a system category that encompasses: encompasses:

– A set of components that perform a function A set of components that perform a function required by a systemrequired by a system

– A set of connectors that enable A set of connectors that enable communication, coordinations and communication, coordinations and cooperation among componentscooperation among components

Page 12: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Architectural stylesArchitectural styles

– Constrains that define how components Constrains that define how components can be integrated to form the systemcan be integrated to form the system

– Semantic models that enable a Semantic models that enable a designer to understand the overall designer to understand the overall properties of a system by analyzing the properties of a system by analyzing the known properties of its constituent known properties of its constituent parts.parts.

Page 13: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Architectural stylesArchitectural styles

• Data centered architecturesData centered architectures

• Data flow architecturesData flow architectures

• Call and return architecturesCall and return architectures

• Object-oriented architecturesObject-oriented architectures

• Layered architecturesLayered architectures

• Tiered component architectureTiered component architecture

Page 14: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Data centered Data centered architecturesarchitectures

Page 15: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Data centered Data centered architecturesarchitectures

• Client software accesses a central repository. Client software accesses a central repository.

• In some cases, the data repository is passive, In some cases, the data repository is passive, i.e., client software accesses the data i.e., client software accesses the data independent to any changes to the data or the independent to any changes to the data or the actions of other client software. actions of other client software.

• A variation on this approach transforms the A variation on this approach transforms the repository into a blackboard that sends repository into a blackboard that sends notifications to client software when data of notifications to client software when data of interest to the client changes.interest to the client changes.

Page 16: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Data centered Data centered architecturesarchitectures• Data centered architectures promote integrability. Data centered architectures promote integrability.

Existing components can be changed or new client Existing components can be changed or new client components can be added to the architecture without components can be added to the architecture without concern about other clients because the components concern about other clients because the components operate independently. operate independently.

• In addition, data can be passed among clients using the In addition, data can be passed among clients using the blackboard mechanism, i.e., the blackboard component blackboard mechanism, i.e., the blackboard component serves to coordinate the transfer of information serves to coordinate the transfer of information between clients. between clients.

• Client components are independently executing Client components are independently executing processes.processes.

Page 17: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Data flow architecturesData flow architectures

Page 18: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Data flow architecturesData flow architectures

• A pipe and filter pattern has a set of A pipe and filter pattern has a set of components, called filters, connected by components, called filters, connected by pipes that transmit data from one pipes that transmit data from one component to the next. component to the next.

• Each filter works independently of those Each filter works independently of those components upstream and down stream; is components upstream and down stream; is designed to expect data input of a certain designed to expect data input of a certain form, and produces data output to the next form, and produces data output to the next filter of a specified form. filter of a specified form.

Page 19: Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based

Data flow architecturesData flow architectures

• However, the filter does not require However, the filter does not require knowledge of the working of its knowledge of the working of its neighboring filters.neighboring filters.

• If data flow degenerates into a single line If data flow degenerates into a single line of transform, it is termed batch of transform, it is termed batch sequential. This pattern accepts a batch sequential. This pattern accepts a batch of data and then applies a series of of data and then applies a series of sequential components to transform it.sequential components to transform it.