Download presentation
Presentation is loading. Please wait.
1
Bridging existing Web Modeling Languages to Model-Driven Engineering: A Metamodel for WebML Andrea Schauerhuber, Manuel Wimmer, Elisabeth Kapsammer Workshop on Model-Driven Web Engineering (MDWE’06) in conj. with ICWE’06 Tuesday, July 11, 2006 Standford Linear Accelerator Center, Palo Alto, California Andrea Schauerhuber Women’s Postgraduate College for Internet Technologies Institute of Software Technology and Interactive Systems Vienna University of Technology http://wit.tuwien.ac.at
2
2 Outline Motivation Related Work Methodology & Conceptual Architecture Automatic Metamodel Generation Manual Refactorings Lessons Learned Outlook
3
3 Motivation Most existing Web modeling languages not fully model-driven, i.e., they often provide code generation facilities, only but no model transformation or a common format for model exchange Metamodels or UML Profiles are a prerequisite for model-driven engineering WebML is a prominent Web modeling language, due to existing tool support (WebRatio) and applications in real world projects WebML is not specified in terms of a metamodel but in terms of a DTD A Metamodel for WebML
4
4 Related Work A metamodel for WebML proposed by [Moreno et al., 2006] Why yet another metamodel for WebML? Developed in parallel, but … different goals: DSL vs. UML Profile different methodology: bottom-up vs. top-down semi-automatic vs. manual different application: transformation of existing WebML XML documents to models vs. models from scratch Metamodels for other Web modeling languages UWE [Koch et al., 2003], W2000 [Baresi et al., 2006], Netsilon [Muller et al., 2005] are based on MOF 1.4 We use new technologies (MOF 2.0, EMF, Ecore, ATL, oaW)
5
5 Methodology Define WebML metamodel semi-automatically What WebML to use? WebRatio DTD: used as a basis for automatic generation of a first version of the metamodel WebRatio functionality: used to manually incorporate concepts that could not be captured by the DTD WebML literature: used to manually refine the generated metamodel Step 1 Step 2
6
6 M2 M1 WebML Metamodel «conformsTo» WebML Model WebML DTD WebML XML Doc Class M3 Mapping «conformsTo» MOF DTD-Grammar The Conceptual Architecture «uses» «parses» «generates» MetaModel Generator (MMG) «parses» «generates» XMI-Serializer Omondo Draft Metamodel MetaModelGenerator (MMG) User DTD element type object graph Metamodel element object graph DTD-ParserTransformer «uses» 2. Semantic enrichment 1. TransformationRules Heuristics Mapping
7
7 Step 1: Automatic Metamodel Generation XML technical space Model technical space Various approaches examined [Wimmer et al., 2006] DTD, XML Schema vs. UML, ER, ORM Until now no approach to generate MOF-based metamodels from DTDs Based on these approaches we developed Set of Transformation Rules Rules for transforming XMLElementTypes Rules for transforming XMLAttributes 3 Heuristics (may not be applicable for all DTDs) IDREF(S) Resolution Boolean Identification Package Identification
8
8 * ENTITY RELATIONSHIP relationship entity 1 Step 1: Automatic Metamodel Generation <!ATTLIST RELATIONSHIP nameCDATA#IMPLIED entityIDREF #REQUIRED> <!ATTLIST ENTITY idID#REQUIRED nameCDATA#IMPLIED> id:EStringname:EString[0..1] name:EString[0..1]entity:EObject An Example for Transformation Rules & Heuristics DTD Metamodel 1) Create classes for XML element types 2) Create containment references for XML content particles 3) Create attributes for XML attributes 1) Apply Heuristic IDREF Resolution ENTITY <!ATTLIST ENTITY idID#REQUIRED nameCDATA#IMPLIED> <!ATTLIST RELATIONSHIP nameCDATA#IMPLIED entityIDREF #REQUIRED> entity
9
9 Step1: Output - Metamodel Metrics Automatically generated metamodel draft EPackage 3 EClass 54 EAttribute 143 EBoolean 37 EInteger 0 EString 93 IDREF unresolved 12 EEnumeration 13 EReference 125 Containment 105 IDREF resolved 20 EEnumeration 13 EEnumLiteral 93 Superclasses 0 Subclasses 0 MAX EClasses/EPackage 49 MIN EClasses/EPackage 5 AVG EClasses/EPackage 27 Metamodel metrics, [Ma et al., 2004]
10
10 Step 2: Manual Refactoring DTD deficiencies Unknown referenced element type(s) Missing role concept Awkward cardinalities XOR constraints No explicit grouping mechanism Missing inheritance concept Limited set of datatypes No bi-directional associations Manual Refactorings necessary
11
11 Step 2: Manual Refactoring – Example 1 It is not possible to identify which element type(s) may be referenced from an IDREF-typed attribute <!ATTLIST Link type (normal|automatic|transport) ‘normal’ to IDREF #REQUIRED …> Unknown Referenced Element Type(s) Link type:LinkType EObject to 1 IndexUnit DataUnit … LinkableElement link * * * * type (normal|automatic|transport) ‘normal’ to IDREF #REQUIRED to 1
12
12 Step 2: Manual Refactoring – Example 2 DTDs do not allow to express that an element type can be deployed in different contexts <!ELEMENT ConnectUnit (SourceSelector?, TargetSelector?,…)> <!ELEMENT Selector (SelectorCondition+)> Missing Role Concept 0..1 targetSelector sourceSelector ConnectUnit Source Selector Target Selector Selector
13
13 Step 2: Manual Refactoring – Example 3 Restricted mechanism of DTDs to specify cardinalities (e.g., 2..5) <!ATTLIST AlternativePage … defaultPage IDREF #IMPLIED > Awkward Cardinalities page defaultPage0..1 1 page Page Alternative Page 1..* page 2..*
14
14 Step 2: Manual Refactoring – Example 4 DTDs provide no mechanism to express xor-constraints Missing XOR Constraints defaultPage 0..1 * page 0..1 defaultArea * area Page Area {xor} XOR
15
15 Step 2: Manual Refactoring – Example 5 No Explicit Grouping Mechanism %StructureDTD; %NavigationDTD; WebML … … Structure Navigation Content Management Access Control Hypertext Organization Hypertext Content %StructureDTD; %NavigationDTD;
16
16 Step 2: Manual Refactoring – Example 6 Missing Inheritance Concept to 1 link * LinkableElement ContentUnit Link GetUnitEntryUnitDisplayUnit SortableUnitDataUnit Hierarchical IndexUnit MultiChoice IndexUnit IndexUnit MultiDataUnit ScrollerUnit Hypertext 1) - normal - transport - automatic «enumeration» LinkType type:LinkType 1) Please note, that this is only an excerpt from the metamodel. See http://www.big.tuwien.ac.at/projects/webml/index.html for the full specification.
17
17 Step2: Output - Metamodel Metrics Automatically generated metamodel draft Refactored metamodel EPackage 36 EClass 54 EAttribute 14384 EBoolean 3725 EInteger 02 EString 9344 IDREF unresolved 120 EEnumeration 13 EReference 12574 Containment 10548 IDREF resolved 2026 EEnumeration 138 EEnumLiteral 9340 Superclasses 09 Subclasses 028 MAX EClasses/EPackage 4924 MIN EClasses/EPackage 53 AVG EClasses/EPackage 2710
18
18 Lessons Learned DTDs are not appropriate for designing modeling languages Technical problems Graphical editors (e.g., Omondo) have difficulties in displaying large models Manual effort for reorganizing the graphical models (layout) Eclipse plugins require a lot of memory Advantages of automatically generating a draft metamodel Correct translation of concepts and their interrelationships Visualization of the language fosters understanding With minimal manual refactorings (IDREF) one is able to obtain metamodel that is equivalent to the original DTD Models that are equivalent to the original XML documents can be generated. Metamodel still can be improved and semantically enriched by introducing generalization hierarchies, etc.
19
19 Outlook Open Issues Extend the WebML Metamodel with WebML concepts that have not been part of the DTD (Web Services, Process Modeling) OCL constraints for Links Extend, improve, and evaluate DTD2MOF-Framework Future Work Applying Aspect-Orientation to the Model-Driven Development of Ubiquitous Web Applications 1 Integration of Web modeling languages – towards a common understanding in the web modeling field. 1 A. Schauerhuber, aspectUWA: Applying Aspect-Orientation to the Model- Driven Development of Ubiquitous Web Applications, Student Extravaganza: Spring School, AOSD'06, Bonn, Germany, March 19, 2006.
20
20 References N. Moreno, P. Fraternalli, and A. Vallecillo. A UML 2.0 Profile for WebML Modeling. Workshop on Model-Driven Web Engineering (MDWE 2006), in conjunction with ICWE'06, Standford Linear Accelerator Center, Palo Alto, California, July 2006. L. Baresi, S. Colazzo, L. Mainetti, and S. Morasca. W2000: A Modeling Notation for Complex Web Applications. In E. Mendes and N. Mosley (eds.) Web Engineering: Theory and Practice of Metrics and Measurement for Web Development. Springer, 2006. L. Baresi, F. Garzotto, and M. Maritati. W2000 as a MOF Metamodel. In Proc. of the 6th World Multiconference on Systemics, Cybernetics and Informatics - Web Engineering track. Orlando, USA, July 2002. N. Koch, A. Kraus. Towards a Common Metamodel for the Development of Web Applications. In Proc. of the 3rd International Conference on Web Engineering (ICWE 2003), July 2003. P.-A. Muller, P. Studer, F. Fondement, J. Bézivin. Platform independent Web application modeling and development with Netsilon. Software & System Modeling, 4(4), November 2005. M. Wimmer, A. Schauerhuber, E. Kapsammer, and G. Kramler. From Document Type Definitions to Metamodels: The WebML Case Study. Technical Report. Vienna University of Technology, March 2006. H. Ma, W. Shao, L. Zhang, Z. Ma, and Y. Jiang. Applying OO Metrics to Assess UML Meta-models. In Proc. of the 7th International Conference on the Unified Modelling Language: Modelling Languages and Applications. Springer-Verlag LNCS 3273, 2004.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.