0% found this document useful (0 votes)
41 views39 pages

Component Models and Technology

This document provides an overview of different component models and technologies, including ACME, Java Beans, COM/DCOM/MTS/COM+, CORBA, .NET, and OSGi. For each model, it describes key concepts like interfaces, implementations, assembly, and lifecycle management. It also provides detailed explanations of specific aspects of several models, such as the components, ports, and connectors defined in ACME, and the interfaces, implementation, and framework defined in COM.

Uploaded by

Muthu Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views39 pages

Component Models and Technology

This document provides an overview of different component models and technologies, including ACME, Java Beans, COM/DCOM/MTS/COM+, CORBA, .NET, and OSGi. For each model, it describes key concepts like interfaces, implementations, assembly, and lifecycle management. It also provides detailed explanations of specific aspects of several models, such as the components, ports, and connectors defined in ACME, and the interfaces, implementation, and framework defined in COM.

Uploaded by

Muthu Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 39

Chapter 4

Component Models and Technology

Building Reliable Component-based Systems Page 1


Chapter 4 - Component Models and Technology
Overview

 Introduction
 ACME Architectural Description Language
 Java Bean Component Model
 COM, DCOM, MTS and COM+
 CORBA Component Model (CCM)
 .NET Component Model
 OSGI Component Model

Building Reliable Component-based Systems Page 2


Chapter 4 - Component Models and Technology
Introduction

 A Short Historical Perspective


 Component Interface and Connections
 Performing Services Transparently

Building Reliable Component-based Systems Page 3


Chapter 4 - Component Models and Technology
A Short Historical Perspective

 Programming languages, can be seen from either


 The run-time point of view or,
 The design and reuse perspective

Building Reliable Component-based Systems Page 4


Chapter 4 - Component Models and Technology
Component Interface and Connections

 ADLs primarily address the issues related to the early


phases of software engineering:
 Design
 Analysis
 They identify a number of concepts, such as:
 Architecture, configurations, connectors, bindings,
properties, hierarchical models, style, static analysis and
behavior.

Building Reliable Component-based Systems Page 5


Chapter 4 - Component Models and Technology
Component Interactions

Iteractions with
traditional software entities Traditional
software
entities
Interactions Interactions
with with
Components
other other
components components
Component
Infrastructure
Interactions with
component infrastructure

Building Reliable Component-based Systems Page 6


Chapter 4 - Component Models and Technology
Majors steps in CBD lifecycle
Aspect Phase Actor
Interface Definition Designer

Assembly Assembly Architect


Implementation Implementation Developer

Lifecycle Packaging, Administrator


Deployment

Framework, Execution End User


run-time support

Building Reliable Component-based Systems Page 7


Chapter 4 - Component Models and Technology
Performing Services Transparently

Building Reliable Component-based Systems Page 8


Chapter 4 - Component Models and Technology
ACME Architectural Description Language

 Components and Ports


 Connectors and Roles
 Systems and Attachments
 Representations and Bindings
 Properties, Constraints, Types and Styles

Building Reliable Component-based Systems Page 9


Chapter 4 - Component Models and Technology
Components and Ports

 Components
 Represent the computational elements and data stores
of a system.
 Ports
 Are the points of interaction between a component and
its environment.

Component
Port

Building Reliable Component-based Systems Page 10


Chapter 4 - Component Models and Technology
Connectors and Roles

 Connectors
 Represent interactions between components such as
method calls or an SQL connection between a client and
a database server.
 The interface of a connector is defined as a set of roles

Connector
Role

Building Reliable Component-based Systems Page 11


Chapter 4 - Component Models and Technology
Systems and Attachments

 The structure of a system is specified by a set of


components, a set of connectors, and a set of
attachments.
 Attachment
 Links a component port to a connector role.

Attachement

Building Reliable Component-based Systems Page 12


Chapter 4 - Component Models and Technology
Representations and Bindings

Component
Connector
Port
Role
Attachement
Binding

Building Reliable Component-based Systems Page 13


Chapter 4 - Component Models and Technology
Java Bean Component Model

 Key Features
 Interface of a Component
 Implementation of a Component
 Components Assembly
 Packaging and Deployment

Building Reliable Component-based Systems Page 14


Chapter 4 - Component Models and Technology
Key Features

 Bean Box
 "A Java Bean is a reusable software component that can
be manipulated visually in a builder tool”.
 The Java Bean was designed for the construction of
graphical user interface (GUI).
 Explicitly tailored to interact in two different contexts:
 At composition time, within the builder tool.
 At execution time, with the runtime environment.

Building Reliable Component-based Systems Page 15


Chapter 4 - Component Models and Technology
Interface of a Component

 This model defines four types of port:


 methods,
 properties,
 event sources and
 event sinks called listeners.
Property ro Read-only property
Method wo Write-only property
Event source 1 Unicast event source
Event sink (listener)
Bounded property

v Vetoable property

Ports

Building Reliable Component-based Systems Page 16


Chapter 4 - Component Models and Technology
Implementation of a Component

 Most bean components are implemented by a simple


Java object, the object being encapsulated in the
component, but there are more sophisticated
implementations possible.
 Wrapping a legacy object.
 Multiple-objects implementation.
 Dependency on traditional entities.

Building Reliable Component-based Systems Page 17


Chapter 4 - Component Models and Technology
Implementations of Bean Components

Object
Method
Method call
Binding

A simple implementation A more complex implementation

Building Reliable Component-based Systems Page 18


Chapter 4 - Component Models and Technology
Components Assembly

 Assembly is one of the key features of Java Bean


though no not specific solution is provided.
 Different ways of assembling components are supplied.

Component-based assembly Heterogeneous assembly

Building Reliable Component-based Systems Page 19


Chapter 4 - Component Models and Technology
Packaging and Deployment

 Java Beans define a model for packaging components


into archives.
 Includes the definition of dependency relationships
between the package items.
 The customization code can be more complex than the
component itself!
 Each package item can be marked "Design Only", so
that they can be removed in a final application.

Building Reliable Component-based Systems Page 20


Chapter 4 - Component Models and Technology
COM, DCOM, MTS and COM+

 Interfaces and Assembly


 Implementation
 Framework
 Lifecycle

Building Reliable Component-based Systems Page 21


Chapter 4 - Component Models and Technology
Interfaces and Assembly

 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.
 All interfaces are descendants of the IUnknown
interface.

Interface

Component interface Component implementation

Building Reliable Component-based Systems Page 22


Chapter 4 - Component Models and Technology
Implementation

 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.

Building Reliable Component-based Systems Page 23


Chapter 4 - Component Models and Technology
Framework

 Standard interfaces
 A simple run-time

Building Reliable Component-based Systems Page 24


Chapter 4 - Component Models and Technology
Lifecycle

 COM, and COM+ are strictly execution time and binary


component models.
 No lifecycle issues are explicitly supported.

Building Reliable Component-based Systems Page 25


Chapter 4 - Component Models and Technology
CORBA Component Model (CCM)

 Interface and Assembly


 Framework : The Container Approach
 Lifecycle

Building Reliable Component-based Systems Page 26


Chapter 4 - Component Models and Technology
Interface and Assembly

 A component interface is made of ports divided into:


 Facets
 Receptacles
 Event sources
 Event sinks
Attribute
Facet
Receptacle Segment

Event source
Event sink

Component interface Ports Component implementation

Building Reliable Component-based Systems Page 27


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.

container

CCM run-time infrastrucure

Building Reliable Component-based Systems Page 28


Chapter 4 - Component Models and Technology
Lifecycle

 CCM is the best effort to date:


 To gather the advances made in different fields,
 To include a wide spectrum of lifecycle activities, while
still claiming efficiency and heterogeneity capabilities,
 However, the whole does not provide the feeling of
being as “simple” as claimed.

Building Reliable Component-based Systems Page 29


Chapter 4 - Component Models and Technology
.NET Component Model

 Interfaces and Assembly


 Implementation
 Framework
 Lifecycle

Building Reliable Component-based Systems Page 30


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.
 There is no explicit concept of connection but rather the
traditional list of imported and exported resources.

Building Reliable Component-based Systems Page 31


Chapter 4 - Component Models and Technology
Implementation

 A component (assembly) is made of modules, which are


traditional executable files (DLL).
 Modules cannot be assemblies, thus the .NET model is
not hierarchical.

Attribute
Method
Event source
Event source Modules

Component interface Ports Component implementation

Building Reliable Component-based Systems Page 32


Chapter 4 - Component Models and Technology
Framework

 .NET relies on the traditional programming approach :


the framework is seen as the language run-time support.
 Transaction control relies on MTS.

Building Reliable Component-based Systems Page 33


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.
 Significantly improve the application packaging and
deployment.
 Early lifecycles phases do not seem to have received
much attention.

Building Reliable Component-based Systems Page 34


Chapter 4 - Component Models and Technology
OSGI Component Model

 Components
 Interface of a Bundle Component
 Assembly of Bundle Components
 Implementation of a Bundle Component

Building Reliable Component-based Systems Page 35


Chapter 4 - Component Models and Technology
Components

 A bundle use three kinds of ports to express its


interactions with
 Traditional technology
 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.

Building Reliable Component-based Systems Page 36


Chapter 4 - Component Models and Technology
Interface of a Bundle Component

Package export
static
Package import

Service interface
dynamic
Service use

Interface of a bundle component Ports

Building Reliable Component-based Systems Page 37


Chapter 4 - Component Models and Technology
Assembly of Bundle Components

 A system is an evolving set of bundle components.


 A bundle component publishes a service interface
 It can attach to it a set of properties describing its
characteristics.
 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

Building Reliable Component-based Systems Page 38


Chapter 4 - Component Models and Technology
Implementation of a Bundle Component

 JAR archive containing: 


 Service components
 Java packages
 Other resources files

Package

Resource

Service component

Activator

Building Reliable Component-based Systems Page 39


Chapter 4 - Component Models and Technology

You might also like