Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ivan Kurtev, Klaas van den Berg Software Engineering Group

Similar presentations


Presentation on theme: "Ivan Kurtev, Klaas van den Berg Software Engineering Group"— Presentation transcript:

1 Building Adaptable and Reusable XML Applications with Model Transformations
Ivan Kurtev, Klaas van den Berg Software Engineering Group University of Twente the Netherlands

2 Outline Context; Problems in XML Processing; Basic MDA Concepts;
MDA-based XML Processing; Example; Conclusions and Future Work;

3 Context Application-specific XML processing:
XML Document DOM Parser Processing Code DOM Tree Application Objects Mature tools and techniques for syntax definition and processing: XML Schema, Parsers, XPath, XSLT, XQuery; Application-specific processing: Processing code generates application objects; Difficult to standardize;

4 Problems in XML Processing
Two Important Quality Properties of XML Applications: Adaptability: allows easy changes in applications; Reusability: processing logic should be reused in new applications Motivation: Hybrid languages (XHTML+Time, XHTML+SVG+MathML) and compound documents; Reuse of syntax is naturally followed by reuse of processing logic; Current techniques (DOM, SAX, Data Binding) do not provide the required quality properties; Processing logic is hard-coded in applications; Difficulties in reuse; Difficulties in changes;

5 Approach XML Processing based on Model Transformations (borrows techniques from Model Driven Architecture (MDA)); Transformation definition: relates an XML schema/DOM to a set of application classes; Transformation execution (processing): converts an XML document to a set of objects; Transformation definitions are expressed in a transformation language (e.g. MISTRAL);

6 Basic MDA Concepts Separation of system specification from system implementation; Increase in the level of abstraction for software development; Models: Model Transformations The MDA Pattern:

7 MOF and XML Meta Levels In the MDA, models are defined in an infrastructure known as Meta Object Facility (MOF) that spans four meta-levels; Similar meta-level organization is observed in the XML technology;

8 Transformation Pattern based on Meta Levels
Refinement of the MDA transformation pattern:

9 Transformation Pattern for XML Processing
Schema-less processing: based on DOM; Schema-based processing: an XML schema and DOM are available;

10 Structure of XML Applications
Separation of concerns: Syntax (schema); Processing logic (transformation specification); Application classes (semantic domain);

11 Example (1) Processing of a subset of SMIL timing module;
Source schema: <attribute name=’begin’ type=’string’/> <attribute name=’end’ type=’string’/> <attribute name=’dur’ type=’string’/> <attribute name=’timeContainer’ type=’string’/> Example of a timed document: <a timeContainer=’seq’ begin=’1’ dur=’20’> <b timeContainer=’par’ dur=’10’> <c timeContainer=’none’ dur=’10’/> <d timeContainer=’none’ dur=’10’/> </b> <e timeContainer=’none’ dur=’10’/> </a>

12 Example (2) Target Application Classes:

13 Example (3) Example time dependency graph as a result of timed document processing:

14 Example (4) transformation timeModule
Transformation Specification written in MISTRAL: transformation timeModule languages MOF, Java timeApplicationModel instanceOf(MOF) JavaModel source timedXMLDocument instanceOf(MOF) XMLModel default target timeGraph instanceOf(Java) timeApplicationModel default timedElementMapping abstract ModelElementRule { source [e:Element link-to(node), condition ] target [node: TimedElement {begin, end, dur, ctrlObject}] SlotRules { beginValue source target [begin=toInt(beg.value)] endValue target [end=toInt(end.value)] durValue source target [dur=toInt(duration.value)] }

15 Example (5) Handling time containers and interval nodes:
parallelContainer ModelElementRule inherits timedElementMapping { source [ condition ] target [ node: Parallel {components} ] SlotRules { componentsValue source target [components=target(timedChild, node)] } intervalNode ModelElementRule inherits timedElementMapping { source [ condition target [ node: Interval]

16 Reuse and Composition of Transformations
A new language may be composed with the timing module: New processor is obtained via: Composing target application classes (software composition); Composing transformation definitions (based on the transformation language constructs);

17 Adaptability and Reusability
Processing logic is explicit represented in transformation rules; Syntax, processing logic, and application classes are separated may evolve independently; Better granularity is achieved changes may be isolated to specific rules and classes; Reusability and Composability: Composition of software: difficult in the general case, aspect-oriented techniques may help; Composition of transformation definitions: easier since the transformation rules may be manipulated by other transformations;

18 Conclusions Approach for XML Processing:
Based on transformations between source schema/document model and target application model; Uses transformation language MISTRAL for defining transformations; Based on the MDA/MOF technology; Allows reuse of existing application classes; A prototype of an interpreter that supports the core transformation language features is implemented;

19 Future Work Exploring the scalability of the approach;
More complex case studies based on some WWW languages (e.g. SMIL, XHTML, MathML); Improving the transformation engine; Experiments with browser-like environments;


Download ppt "Ivan Kurtev, Klaas van den Berg Software Engineering Group"

Similar presentations


Ads by Google