110 likes | 277 Views
Modeling COM/COM+ components with UML. Eran Gery I-Logix. Key Characteristics. Uniform programming model supported by encapsulated mechanism No need to model external/internal/remote/local views: all encapsulated by COM mechanism Logical vs. Deployment components
E N D
Modeling COM/COM+ components with UML Eran Gery I-Logix
Key Characteristics • Uniform programming model supported by encapsulated mechanism • No need to model external/internal/remote/local views: all encapsulated by COM mechanism • Logical vs. Deployment components • Logical: COM(+) objects: essentially classes that realize interfaces • Physical: Binary level components: DLL, EXE, ActiveX, Type Libraries • COM attributes (tags): A set of attributes attached to COM elements that specify certain semantics facilitated by COM mechanisms. • The COM mechanism supports extension by aggregation (composition)
Logical view • COM classes, interfaces and class features are stereotyped to capture COM semantics. • COM attributes are realized as tags attached to those stereotypes.
Logical View: Rationale • Logical COM components correspond to UML classes. They are not physical but rather describe common set of behaviors and relations. • Logical specification is realized differently across different languages and SDKs (ATL, MFC, C++, VB, Java) • Assumption: Implementation (language) level is not explicitly modeled • Automated by code generators and wizards
Component Aggregation • COM technique for component extension at binary level (language independent) • Interfaces of aggregatee are part of aggregate component (merged identities) • Modeled via UML association stereotype <<COMAggregation>> providing these semantics COM Notation (UML ??) Icustomer Ipersistence <<COMClass>> Customer <<COMClass>> Person Iperson
Aggregation: Example <<COMinterface>> <<COMinterface>> ICustomer IPersistence <<COMInterface>> IPerson <<COMClass>> Customer <<COMClass>> <<COMAggregation>> Person 1 1
COM+ Services • COM+ provides a set of component based services supported by the OS (W2000) • Transaction • Security • Queuing • Event service (publish/subscribe) • Cashing • Load balancing • Most services are specified via COM attributes on components • Some require standard interfaces • Mostly transparent to component modeling
Physical View • Models how logical components are packaged in binary physical modules for deployment • Various types of physical components (COM+) • ComponentDLL: container of COMClasses • Application: a cluster of componentDLLs • Logical components (COMClasses) are allocated to physical ones via the residency relationship • The relationship between a client component and a server component is modeled by the usage dependency stereotyped <<COMUsage>> • Interfaces of physical components are implied by the residency relationship. No need to explicitly specify them
Physical View: Example <<COMDll>> Small Business <<COMUsage>> <<Executable>> GUIClient