1 / 34

Component Models and Technology Component-based Software Engineering Ivica Crnkovic

Component Models and Technology Component-based Software Engineering Ivica Crnkovic ivica.crnkovic@mdh.se. Overview. Introduction ACME Architectural Description Language Java Bean Component Model COM, DCOM, MTS and COM+ CORBA Component Model (CCM) .NET Component Model

loren
Télécharger la présentation

Component Models and Technology Component-based Software Engineering Ivica Crnkovic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Component Models and Technology Component-based Software Engineering Ivica Crnkovic ivica.crnkovic@mdh.se Component models

  2. 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 Component models

  3. Architecture Definition Languages • 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. Component models

  4. ACME Architectural Description Language • Components and Ports • Connectors and Roles • Systems and Attachments • Representations and Bindings • Properties, Constraints, Types and Styles Component models

  5. 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 Component models

  6. 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 connectoris defined as a set of roles Connector Role Component models

  7. 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 Component models

  8. Representations and Bindings Component Connector Port Role Attachement Binding Component models

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

  10. Java Bean Component Model Component models

  11. Key Features • "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. • Any Java class that adheres to certain conventions regarding property and event interface definitions can be a JavaBean. • Beans are Java classes that can be manipulated in a visual builder tool and composed into applications. Component models

  12. v Interface of a Component • This model defines four types of port: • methods, • properties, • event sources (generate an event) • event sinks called listeners (they receive event) Property Read-only property ro Method Write-only property wo Event source Unicast event source 1 Event sink (listener) Bounded property Vetoable property Ports Component models

  13. Implementation of a Component • Most bean components are implemented by a simple Java object by naming convention Object Method Properties public void set<Property_name> (PropertyType value) public PropertyType get<Property_name> () Events public viod add<ListenerType> (<ListenerType> listener); public viod remove<ListenerType> (<ListenerType> listener); public class Y implements <Y>Listener { public viod <YoccuranceNaem> (<YObjectType> evt); } A simple implementation Component models

  14. Component-based assembly Heterogeneous assembly Components Assembly • Assembly is one of the key features of Java Bean though no not specific solution is provided. • Composition tools (Bean Box) • No composition language • Different ways of assembling components are supplied. Component models

  15. Packaging and Deployment • Java Beans define a model for packaging components into archives. • Includes the definition of dependency relationships between the package items. • Each package item can be marked "Design Only", so that they can be removed in a final application. Component models

  16. Enterprise JavaBeans • Architecture for distributed applications • Framework for creating middleware EJB Server EJB Container EJB client Enterprise bean Clients accesses JBs via containers Component models

  17. EJB Servers • Analogous to CORBA ORB • Naming and directory interface (JNDI) • Client finds EJB via JNDI • JTS • Java Transaction Services Component models

  18. COM/DCOM Component models

  19. 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 Component models

  20. Implementation • COM defines a binary standard for interfaces • Language independent implementation of the interfaces • Interfaces are defined in Interface Definition Language (IDL) • An interface has an GUID as an identifier IUnknown IDispatch Component models

  21. Composition • Two type of explicit composition • Delegation • Aggregation • For aggregation source code is needed Component models

  22. CORBA Component Model (CCM) Component models

  23. OMA Overview OMA–Object Management Architecture CORBAdomains CORBAapps CORBAfacilities CORBA (Common Object Request Broker Architecture) Transactions Event Security Naming CORBAservices Component models

  24. Interface and Assembly • A component interface is made of ports divided into: • Facets - for interaction with clients • Receptacles – references o external code • Event sources • Event sinks Attribute Facet Segment Receptacle Event source Event sink Component interface Component implementation Ports Component models

  25. Framework : The Container Approach • Framework – a set of containers. Containers contains components and provides a set of standard services (security, events, persistence, life-cycle support) container CCM run-time infrastrucure Component models

  26. .NET Component models

  27. What is .NET? • NET is a platform that enables: • Software as services, especially over the web • Distributed computing • Componentization • Enterprise services Component models

  28. .NET Platform VB C++ C# JScript … Visual Studio.NET Common Language Specification ASP.NET Windows Forms ADO.NET and XML Base Class Library Common Language Runtime Operating Systems Component models

  29. .NET Framework Components • Common Language Runtime (CLR) • Common type system for all languages • Runtime environment • Class libraries (.NET Framework) • Base class libraries, ADO.NET and XML • Windows Forms for, Win32 applications • Web application platform ASP.NET • Interactive pages • Web services that are SOAP enabled Component models

  30. .NET Component Model - 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 Modules Event source Ports Component implementation Component interface Component models

  31. Framework • .NET relies on the traditional programming approach : the framework is seen as the language run-time support. • MISL – Microsoft Intermediate language (similar to Java Byte code) • Common Runtime Language (similar to Java Virtual Machine) • Transaction control relies on MTS. Component models

  32. 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. Component models

  33. Other component models • OSGI Component Model • KOALA component model • IEC 61131-3 standard languages (functional blocks) • Real-time components Component models

  34. A Koala Component Subcomponent Interfaces A switch CC C1 s m C3 C2 A module Component models

More Related