Presentation is loading. Please wait.

Presentation is loading. Please wait.

Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.

Similar presentations


Presentation on theme: "Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology."— Presentation transcript:

1 Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology

2 Page 2 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Overview qIntroduction qACME Architectural Description Language qJava Bean Component Model qCOM, DCOM, MTS and COM+ qCORBA Component Model (CCM) q.NET Component Model qOSGI Component Model

3 Page 3 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Introduction qA Short Historical Perspective qComponent Interface and Connections qPerforming Services Transparently

4 Page 4 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology A Short Historical Perspective q Programming languages, can be seen from either l The run-time point of view or, l The design and reuse perspective

5 Page 5 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Component Interface and Connections q ADLs primarily address the issues related to the early phases of software engineering: l Design l Analysis q They identify a number of concepts, such as: l Architecture, configurations, connectors, bindings, properties, hierarchical models, style, static analysis and behavior.

6 Page 6 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Component Interactions Iteractions with traditional software entities Interactions with other components Interactions with other components Interactions with component infrastructure Components Traditional software entities Component Infrastructure

7 Page 7 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Majors steps in CBD lifecycle AspectPhaseActor Interface DefinitionDesigner Assembly Architect Implementation Developer Lifecycle Packaging, Deployment Administrator Framework, run-time support ExecutionEnd User

8 Page 8 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Performing Services Transparently

9 Page 9 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology ACME Architectural Description Language qComponents and Ports qConnectors and Roles q Systems and Attachments qRepresentations and Bindings qProperties, Constraints, Types and Styles

10 Page 10 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Components and Ports q Components l Represent the computational elements and data stores of a system. q Ports l Are the points of interaction between a component and its environment. Component Port

11 Page 11 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Connectors and Roles q Connectors l Represent interactions between components such as method calls or an SQL connection between a client and a database server. qThe interface of a connector is defined as a set of roles Connector Role

12 Page 12 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Systems and Attachments qThe structure of a system is specified by a set of components, a set of connectors, and a set of attachments. q Attachment l Links a component port to a connector role. Attachement

13 Page 13 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Representations and Bindings Connector Component Port Role Attachement Binding

14 Page 14 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Java Bean Component Model qKey Features qInterface of a Component qImplementation of a Component q Components Assembly q Packaging and Deployment

15 Page 15 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Key Features qBean Box q "A Java Bean is a reusable software component that can be manipulated visually in a builder tool”. q The Java Bean was designed for the construction of graphical user interface (GUI). q Explicitly tailored to interact in two different contexts: l At composition time, within the builder tool. l At execution time, with the runtime environment.

16 Page 16 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Interface of a Component q This model defines four types of port: l methods, l properties, l event sources and l event sinks called listeners. Read-only property Write-only property Property Method Event source Event sink (listener) Bounded property v Vetoable property ro wo 1 Unicast event source Ports

17 Page 17 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Implementation of a Component q Most bean components are implemented by a simple Java object, the object being encapsulated in the component, but there are more sophisticated implementations possible. l Wrapping a legacy object. l Multiple-objects implementation. l Dependency on traditional entities.

18 Page 18 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Implementations of Bean Components Object Method Method call Binding A simple implementation A more complex implementation

19 Page 19 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Components Assembly qAssembly is one of the key features of Java Bean though no not specific solution is provided. l Different ways of assembling components are supplied. Component-based assemblyHeterogeneous assembly

20 Page 20 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Packaging and Deployment q Java Beans define a model for packaging components into archives. l Includes the definition of dependency relationships between the package items. q The customization code can be more complex than the component itself! q Each package item can be marked "Design Only", so that they can be removed in a final application.

21 Page 21 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology COM, DCOM, MTS and COM+ qInterfaces and Assembly qImplementation qFramework qLifecycle

22 Page 22 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Interfaces and Assembly q A COM interface is seen as a C++ virtual class and takes the form of a list of data and function declarations without associated code. q All interfaces are descendants of the IUnknown interface. Component interface Interface Component implementation

23 Page 23 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Implementation q A COM object is a piece of binary code, written in any programming language, as long as the compiler generates code following the binary interoperability convention.

24 Page 24 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Framework q Standard interfaces q A simple run-time

25 Page 25 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Lifecycle q COM, and COM+ are strictly execution time and binary component models.  No lifecycle issues are explicitly supported.

26 Page 26 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology CORBA Component Model (CCM) q Interface and Assembly q Framework : The Container Approach q Lifecycle

27 Page 27 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Interface and Assembly q A component interface is made of ports divided into: l Facets l Receptacles l Event sources l Event sinks Component interface Attribute Facet Event source Event sink Ports Receptacle Segment Component implementation

28 Page 28 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Framework : The Container Approach  Services can be made available to components without having to change that component’s source code. CCM run-time infrastrucure container

29 Page 29 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Lifecycle q CCM is the best effort to date: l To gather the advances made in different fields, l To include a wide spectrum of lifecycle activities, while still claiming efficiency and heterogeneity capabilities, q However, the whole does not provide the feeling of being as “simple” as claimed.

30 Page 30 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology.NET Component Model qInterfaces and Assembly qImplementation qFramework qLifecycle

31 Page 31 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Interfaces and Assembly  programming language approach for component programming.  The program contains the information related to the relationships with other “components”, and that the compiler is responsible for generating the information needed at execution. q There is no explicit concept of connection but rather the traditional list of imported and exported resources.

32 Page 32 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Implementation q A component (assembly) is made of modules, which are traditional executable files (DLL). q Modules cannot be assemblies, thus the.NET model is not hierarchical. Component interface Attribute Method Event source Ports Event source Component implementation Modules

33 Page 33 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Framework q.NET relies on the traditional programming approach : the framework is seen as the language run-time support. q Transaction control relies on MTS.

34 Page 34 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Lifecycle  Assemblies (and their modules) are local to an application, and thus different DLLs with same name can run simultaneously.  Each assembly has a versioning information about itself and about the assemblies it depends on. Version control is delegated to the dynamic loader, which selects the “right” version. q Significantly improve the application packaging and deployment. q Early lifecycles phases do not seem to have received much attention.

35 Page 35 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology OSGI Component Model qComponents qInterface of a Bundle Component qAssembly of Bundle Components qImplementation of a Bundle Component

36 Page 36 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Components q A bundle use three kinds of ports to express its interactions with l Traditional technology l Other components The run-time environment  Bundles may listen to events published by the framework such as the insertion of a new component in a system.

37 Page 37 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Interface of a Bundle Component Package export Package import Service use Ports Service interface static dynamic Interface of a bundle component

38 Page 38 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Assembly of Bundle Components  A system is an evolving set of bundle components. q A bundle component publishes a service interface It can attach to it a set of properties describing its characteristics. q A component requires an interface for its use, It will select one via a query expression based on these properties.  This flexibility also has its counterpart There is no guarantee than the service will continue to be available

39 Page 39 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Implementation of a Bundle Component q JAR archive containing: l Service components l Java packages l Other resources files Package Resource Service component Activator


Download ppt "Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology."

Similar presentations


Ads by Google