Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2005-2006 The ATHENA Consortium. 5-3. UML Profiles and Domain-Specific Languages (DSLs),

Similar presentations


Presentation on theme: "© 2005-2006 The ATHENA Consortium. 5-3. UML Profiles and Domain-Specific Languages (DSLs),"— Presentation transcript:

1 © 2005-2006 The ATHENA Consortium. 5-3. UML Profiles and Domain-Specific Languages (DSLs),

2 2 © 2005-2006 The ATHENA Consortium. ATHENA Model-Driven Interoperability (MDI) Framework MDA & Interoperability Metamodelling UML Profiles & DSLs Model Transformations Method Engineering Reusable MDI Assets Method chunks Tools and services Models and metamodels Model transformations DSLs and UML profiles Reference examples

3 3 © 2005-2006 The ATHENA Consortium. Objective The objective of this part of the course is to: –Understand what a UML profile and a domain-specific language (DSL) are. –Be able to develop your first DSL in the Eclipse Graphical Modeling Framework (GMF) [optional exercise]

4 4 © 2005-2006 The ATHENA Consortium. Outline UML profiles Metamodelling (revisited) Domain-specific languages (DSLs) Eclipse Graphical Modeling Framework (GMF) Examples –UML profile for PIM4SOA –UML profile for Web services (XSD, WSDL and BPEL) References

5 5 © 2005-2006 The ATHENA Consortium. UML profiles

6 6 © 2005-2006 The ATHENA Consortium. UML profiles They allow us to adapt the UML language to the needs of the analysts or the application domain Allows designers to model using application domain concepts. There are three extension mechanisms: –Stereotypes –Restrictions –Tagged values

7 7 © 2005-2006 The ATHENA Consortium. Stereotype Extends the vocabulary of UML with new construction elements derived from existing UML but specific to a problem domain Can have associated restrictions and tagged values Possibility of assigning an icon for a better graphical representation DB Partners

8 8 © 2005-2006 The ATHENA Consortium. Restriction Is a semantical condition represented by a textual expression Imposes some kind of condition or requisite on the element to which it is applied OCL – Object Constraint Language {An interface does not have attributes, only operations}

9 9 © 2005-2006 The ATHENA Consortium. Tagged value Is a property associated to a model element Used to store information about the element –Management information, documentation, coding parameters,... Generally, the tools store this information but it is not shown in the diagrams

10 10 © 2005-2006 The ATHENA Consortium. Metamodels and profiles MOFUML process generic Meta-model real-time model Workflow Meta-model UML For J2EE migration model Workflow model Migration oriented process Meta-model UML Real-time M3 M2 M1 extension relationship model meta-model relationship

11 11 © 2005-2006 The ATHENA Consortium. Metamodelling (revisited)

12 12 © 2005-2006 The ATHENA Consortium. Classification Dog Collie Animal Living Being Four Legged Object Celebrity Movie Star Lassie

13 13 © 2005-2006 The ATHENA Consortium. Classification dimensions Collie Celebrity Four Legged Object Animal Dog Movie Star Model Element Instance Object Ontological classification (domain types) Linguistic classification (representation form)

14 14 © 2005-2006 The ATHENA Consortium. Kinds of metamodels Two kinds of information of a set of models are modelled in metamodels –Form (linguistic aspects) OMG is predominantly occupied with this –Content (ontological aspects)

15 15 © 2005-2006 The ATHENA Consortium. Linguistic metamodelling LassieCollie ClassObject Class represents linguistic ”instance-of” instance-of ontological instance-of L0 (called M0 in OMG) L1 (called M1 in OMG) L2 (called M2 in OMG) L3 (called M3 in OMG)

16 16 © 2005-2006 The ATHENA Consortium. Ontological metamodelling Lassie Collie Class Breed represents linguistic instance-of O0 O1 O2 O3 Object Biological rank ontological ”instance-of” linguistic instance-of ontological ”instance-of” ontological ”instance-of” L1 L2

17 17 © 2005-2006 The ATHENA Consortium. Domain-specific languages (DSLs)

18 18 © 2005-2006 The ATHENA Consortium. UML – one size fits all? While the OMG MDA promotes UML as the visual “universal” glue suitable for modelling everything, we are also seeing a trend towards development and co-existence of several domain-specific modelling languages, e.g. supported by the Microsoft Domain-Specific Language (DSL) tools (http://lab.msdn.microsoft.com/teamsystem/workshop/dsltools/default. aspx).http://lab.msdn.microsoft.com/teamsystem/workshop/dsltools/default. aspx Such approaches are now also being discussed in various OMG forums. UML is seen as a “general-purpose” language while DSLs may be more expressive for most purposes. A model-driven framework needs to acknowledge the existence of different models and views expressed in different modelling languages. The MDA technologies can help us to align these models through a common metamodelling language on which model transformations and model mappings can be defined.

19 19 © 2005-2006 The ATHENA Consortium. Software factory The Software Factories Web site (http://www.softwarefactories.com/) defines the term Software Factory in the following way:http://www.softwarefactories.com/ “A Software Factory is a software product line that configures extensible development tools like Visual Studio Team System with packaged content like DSLs, patterns, frameworks and guidance, based on recipes for building specific kinds of applications. For example, we might set up a Software Factory for thin client Customer Relationship Management (CRM) applications using the.NET framework, C#, the Microsoft Business Framework, Microsoft SQL Server, and the Microsoft Host Integration Server. Equipped with this factory, we could rapidly punch out an endless variety of CRM applications, each containing unique features based on the unique requirements of specific customers. Better yet, we could use this factory to create an ecosystem, by making it available to third parties, who could extend it to rapidly build CRM applications incorporating their value added extensions.”

20 20 © 2005-2006 The ATHENA Consortium. UML and DSLs The issue of the role of UML is often stated in overly simplistic terms: MDD advocates the use of UML for all domain modeling while the Software Factories approach advocates that UML never used. This is an incorrect statement of the positions of both camps. –While the MDD approach treats UML, with customization, as the modeling language of choice for most application modeling, it also acknowledges the value of custom languages in certain specialized circumstances. –This is the purpose of the OMG Meta-Object Facility (MOF) standard that plays an important role in MDD. UML itself is defined using MOF and there are MOF definitions of many other languages. –The MDD approach acknowledges the value of non-UML DSLs as a technique to be applied judiciously. –Further, the Software Factories approach does not reject UML entirely. It suggests that you use UML for developing sketches and documentation, where DSLs should be used for developing models from which code is generated.

21 21 © 2005-2006 The ATHENA Consortium. Advantages of using UML profiles UML is an open standard modelling language for which there are many available books and training courses. UML profiles provide a lightweight approach that is easily implemented using readily available UML tooling. Models with UML profiles applied can be read by all UML tools even if they do not have any knowledge of the profile. Basing all DSLs on UML creates a set of related languages that share common concepts. UML can be used for high-level architectural models as well as detailed models from which code can be generated.

22 22 © 2005-2006 The ATHENA Consortium. Disadvantages of using UML profiles UML profiles only permit a limited amount of customization. –It is not possible to introduce new modelling concepts that cannot be expressed by extending existing UML elements. The use of UML does require familiarity with modelling concepts.

23 23 © 2005-2006 The ATHENA Consortium. Eclipse Graphical Modeling Framework (GMF)

24 24 © 2005-2006 The ATHENA Consortium. Graphical Modelling Framework (GMF) The Eclipse Graphical Modeling Framework (GMF) provides a generative component and runtime infrastructure for developing graphical editors based on EMF and GEF. GMF v.1.0 released June 28, 2006

25 25 © 2005-2006 The ATHENA Consortium. GMF overview GMF uses and depends on EMF and GEF –EMF: Core facility for defining models generates java code for manipulating and persisting model insances –GEF: Manipulates object models Simplifies combination of EMF and GEF Generates GEF editors for manipulating EMF models

26 26 © 2005-2006 The ATHENA Consortium. Example #1: UML profile for PIM4SOA

27 27 © 2005-2006 The ATHENA Consortium. PIM4SOA Implementation Alternatives Define a metamodel using a UML Profile –they allow the model to be manipulated with ‘industry standard’ modelling tools. –the metamodel could be severely affected by changes in the UML infrastructure. –The UML element semantics must be respected Define a metamodel using MOF –decouple the metamodel from the notation, therefore if the notation changes the metamodel is not severely affected. –A graphical interface to the metamodel must be developed

28 28 © 2005-2006 The ATHENA Consortium. Metamodel and profile development 1. Metamodel Scope, concepts, style 3. Test Evaluate in user scenarios 2. UML profile Map metamodel concepts to UML 4. Feedback Add, remove, and modify concepts Understanding of SOA concepts and interoperability issues Initial (interoperability) requirements SOA concepts Partitioning of the metamodel into structures Architectural style for developing interoperable software systems Document the metamodel in RSM (.uml2) and develop it in EMF (.ecore) Define how SOA models should be specified using UML Map metamodel concepts to UML types Define UML stereotypes and tagged values Define new visual symbols Define model views Define validation rules Implement UML profile in RSM Evaluate and test UML profile in user scenarios Four ATHENA use cases (pilots) Feedback Iterative development Modifications according to test and evaluation

29 29 © 2005-2006 The ATHENA Consortium. PIM4SOA profile implementation issues PIM4SOA GRIDP2PBDI Teams WSA PIM4SOA UML Profile ArisGraiMetisMoogoPOP* Business expert IT infrastructure GAP CIMPIM PSM Easier Transformations Modelling support 2 Transformations

30 30 © 2005-2006 The ATHENA Consortium. PIM4SOA profile implementation platform PIM4SOA GRIDP2PBDI Teams WSA PIM4SOA UML Profile ArisGraiMetisMoogoPOP* Business expert IT infrastructure GAP CIMPIM PSM eCore, MTF RSM eCore, MTF EMF eCore

31 31 © 2005-2006 The ATHENA Consortium. Sketches out the stereotypes and the base classes for the PIM4SOA elements The PIM4SOA metamodel is composed by four aspects: Service, Process, Information and quality of service aspects –Each aspect is related with a set of elements of the profile –For a clear profile description these elements will be described separately (followed by an example) UML extensions for Service Modelling UML Extensions for Process Modelling UML Extensions for Information Modelling UML Extensions for Quality of Service Modelling UML extensions for PIM4SOA modelling

32 32 © 2005-2006 The ATHENA Consortium. UML extensions for PIM4SOA modelling UML extensions for Service Modelling UML Extensions for Process Modelling UML Profile for Information Modelling UML Extensions for QoS Modelling

33 33 © 2005-2006 The ATHENA Consortium. UML extensions for service modelling StereotypeBase ClassDescription Collaboration This element represents the definition of a service. Each service description is viewed as a collaboration between roles CollaborationUseCollaborationUse (sometimes called CollaborationOccurence) A collaboration use represents the usage of a service. This service must to be defined previously. CollaborationUse specification must be encapsulated in a composition structure. This structure is provided by a collaboration definition or by a service provider. RoleBindingDependencyThis is not a mandatory feature. It is used to connect two roles in the structural part of a class or collaboration ServiceProviderClassThis element represent the service provider RolePartA role represents a structural part in a collaboration EndPointProperty [2] [2] An endpoint represent the address for a service RegistryPackageRegistry represents a container to know where the services are placed RegistryItemClass, PartRegistry Item is an entity to relate a collaboration and an address MessageOperationThe message concept is related with a role through an interface. ItemParameterItem represents the data managed by a role

34 34 © 2005-2006 The ATHENA Consortium. UML extensions for process modelling StereotypeBase ClassDescription ProcessActivityA process represents an activity diagram. This activity diagram is contained by a service provider or collaboration TaskStructured Activity NodeA structured task is related with a collaboration use. This element contains a set of interactions InteractionInteraction, Call behaviorAction An interaction represents a reference to a message. It also contains a reference to an input pin or an output pin TagDefinition:JoinSpecification:string FlowControlFlowThis flow relates two interactions. TagDefinition: GuardSpecification:String ColaborationUsePathDependencyThis dependency relates a “structuredTask” (source) with a collaboration use (target). This relationship contains a parameter indicating the order of containment.

35 35 © 2005-2006 The ATHENA Consortium. UML extensions for information modelling StereotypeBase ClassDescription >Class, PackageAssigned to class or package. Indicates root and packaging of a business document information model as a reusable asset. >PackageAssigned to package. Indicates the business logic >ClassAssigned to class. Represents elements used to describe complex types >PackageAssigned to package. Indicates packaging of a reusable type library.

36 36 © 2005-2006 The ATHENA Consortium. UML extensions for quality of service modelling (1) Metamodel element StereotypeBase ClassDescription NFA Part, ClassEach collaboration is related with a NFA element to describe and model quality of service aspects QoSContext PackageQoSContext allows describing the context of quality expressions. QoSCategory PackageIt is mechanism of grouping QoSCharacteristics QoSOffered PackageQoSOffered inherits from the abstract class QoSConstraint. This constraint specifies the quality that the provider must achieve QoSRequired PackageQoSRequired inherits from the abstract class QoSConstraint. This constraint specifies the quality that the server must achieve

37 37 © 2005-2006 The ATHENA Consortium. UML extensions for quality of service modelling (2) Metamodel element StereotypeBase ClassDescription QoSContract PackageQoSContract inherits from the abstract class QoSConstraint. This constraint specifies the agreement between constraints QoSCharacteristic ClassQoS Characteristics represents quantifiable characteristics of services QoSDimension Feature (structuralFeature)QoS Dimensions are dimensions for the quantification of QoS Characteristic QoSValue InstanceSpecificationQoS Value instantiate QoS Characteristic and fixes it with specific values of its value definitions (QoS DimensionSlot) QoSDimensionSlot Documentation [1] [1] QoS Dimension Slot represents the value of a primitive QoS Dimension or a reference to another QoS Value

38 38 © 2005-2006 The ATHENA Consortium. RSM and UML profile for PIM4SOA

39 39 © 2005-2006 The ATHENA Consortium. Example #2: UML profile for Web services

40 40 © 2005-2006 The ATHENA Consortium. UML profile We have defined a basic metamodel for Web services that covers those basic aspects that all Web services have to fulfil, and two extended metamodels that extend the basic specification with important concepts for Web services technology, such as faults and security. Starting from these metamodels, we have defined three different UML profiles that try to make easy the specification and development of Web services.

41 41 © 2005-2006 The ATHENA Consortium. UML profile for Web services Web Service Basic Profile –This plugin implements the base UML modelling support for how to specify and develop Web services. –This plugin can be extended with other specific Web service technology profiles (e.g. XSD, WSDL and BPEL) each covering different parts of the Web service stack. UML Profile for XSD –This plugin implements UML modelling support for XML schema definitions UML Library for XSD –This plugin defines XSD types to be used when modelling XML schema definitions in UML. UML Profile for WSDL –This plugin implements UML modelling support for WSDL. UML Profile for BPEL –This plugin implements UML modelling support for BPEL.

42 42 © 2005-2006 The ATHENA Consortium. UML profile for XSD (1)

43 43 © 2005-2006 The ATHENA Consortium. UML profile for XSD (2)

44 44 © 2005-2006 The ATHENA Consortium. UML profile for XSD (3)

45 45 © 2005-2006 The ATHENA Consortium. UML profile for WSDL (1)

46 46 © 2005-2006 The ATHENA Consortium. UML profile for WSDL (2)

47 47 © 2005-2006 The ATHENA Consortium. UML profile for WSDL (3) UML representationText representation

48 48 © 2005-2006 The ATHENA Consortium. UML profile for BPEL (1)

49 49 © 2005-2006 The ATHENA Consortium. UML profile for BPEL (2)

50 50 © 2005-2006 The ATHENA Consortium. UML profile for BPEL (3)

51 51 © 2005-2006 The ATHENA Consortium. RSM and UML profile for Web services

52 52 © 2005-2006 The ATHENA Consortium. References

53 53 © 2005-2006 The ATHENA Consortium. References [Atkinson and Kühne 2003] C. Atkinson and T. Kühne, "Model-Driven Development: A Metamodeling Foundation", IEEE Software, vol. 20, no. 5, pp. 36-41, 2003. http://www.mm.informatik.tu-darmstadt.de/staff/kuehne/publications/papers/mda- foundation.pdf http://www.mm.informatik.tu-darmstadt.de/staff/kuehne/publications/papers/mda- foundation.pdf [Clark, et al. 2004] T. Clark, A. Evans, P. Sammut, and J. Willans, "Applied Metamodelling - A Foundation for Language Driven Development, Version 0.1", 2004. http://albini.xactium.com/web/index.php?option=com_remository&Itemid=54&func=sele ct&id=1 http://albini.xactium.com/web/index.php?option=com_remository&Itemid=54&func=sele ct&id=1 [Seidewitz 2003] E. Seidewitz, "What Models Mean", IEEE Software, vol. 20, no. 5, pp. 26-32, 2003. [Swithinbank, et al. 2005] P. Swithinbank, M. Chessell, T. Gardner, C. Griffin, J. Man, H. Wylie, and L. Yusuf, "Patterns: Model-Driven Development Using IBM Rational Software Architect", IBM, Redbooks, December 2005. http://www.redbooks.ibm.com/redbooks/pdfs/sg247105.pdf http://www.redbooks.ibm.com/redbooks/pdfs/sg247105.pdf

54 54 © 2005-2006 The ATHENA Consortium. This course has been developed under the funding of the EC with the support of the EC ATHENA-IP Project. Disclaimer and Copyright Notice: Permission is granted without fee for personal or educational (non-profit) use, previous notification is needed. For notification purposes, please, address to the ATHENA Training Programme Chair at rg@uninova.pt. In other cases please, contact at the same e-mail address for use conditions. Some of the figures presented in this course are freely inspired by others reported in referenced works/sources. For such figures copyright and all rights therein are maintained by the original authors or by other copyright holders. It is understood that all persons copying these figures will adhere to the terms and constraints invoked by each copyright holder.rg@uninova.pt


Download ppt "© 2005-2006 The ATHENA Consortium. 5-3. UML Profiles and Domain-Specific Languages (DSLs),"

Similar presentations


Ads by Google