Assignment title: Technology
Modelling the Navigational Model of Cloud-based Applications
The goal of this assignment is to implement a DSL for designing the navigational model of cloud-based applications using HTML as the main target language and any server-side technology of your choice, e.g. PHP, ASP or JSP.
The DSL is an excerpt of the UML Extension for Web Applications by Jim Conallen. The concepts involved in the DSL that you have to implement are: ServerPage, ClientPage, Form, FrameSet, Target, Link, TargetedLink, FrameContent, Submit, Builds, Redirect, InputElement, SelectElement, TextAreaElement, Page.
In this DSL, we are not interested in modelling collaborations among objects on the server side of the cloud-based architecture although a basic web server is required in order to be able to use forms in your web pages. The XAMPP stack (available at https://www.apachefriends.org/index.html) may be used to implement the server side of your runtime engine if you choose PHP and you may use the Spring Framework if you prefer to use Java-based technology. More information about the DSL is provided below:
• Jim Conallen. UML Extension for Web Applications v0.91. http://phrogz.net/tmp/webuml/WebExtension091.htm
– Web page describing the main notions of the DSL as a UML profile. This corresponds to version 0.91 of the profile.
• Jim Conallen. Modeling Web application architectures with UML. 1999. http://dl.acm.org/citation.cfm?id=317677
– Article describing the DSL with some examples.
• Jim Conallen. Building Web applications with UML. 2000. http://dl.acm.org/citation.cfm?id=326370
– Book in which the author fully documents the use of the DSL for designing web applications. In this book, the author describes version 2 of the profile. Not strictly required.
Exercises
The assignment is split in the following tasks, which guide the development process:
1. Design and implement the syntax of the DSL:
(a) Define the domain model as an EMF metamodel, including any OCLconstraints you needed to capture the right semantics for the language. Include the class diagram of the metamodel and OCL constraints in the solution document.
(b) Define the concrete syntax for the language.
• If you choose to implement a textual language, include its grammar in xText format in the solution document.
• If you choose a graphical language, include the Eugenia script (that is, the corresponding emfatic file with Eugenia annotations) in the solution document, or similar scripts if you use other technology.
• If you choose to implement an internal DSL within UML, include a package diagram of the UML profile using Papyrus.
In any of the cases above include examples that illustrate all the concepts involved in the DSL. You may want to include a brief explanation for each example.
2. Design and implement the semantics of the DSL by compilation to HTMLpages so that each DSL program corresponds to a collection of HTML pages that implement the navigational model of a web application, to be deployed on to a cloud platform. You may choose one of the following strategies:
• Model-to-model transformations
• Model-to-text transformations
In any of the cases above:
(a) Specify the translation process by using a table with three columns.For each transformation rule, add a row in the table and add a graphical pattern of your DSL in the first column, add the target representation of the model that is generated (either textually or graphically using abstract syntax) in the second column, add any additional conditions in OCL format that need to be considered in the third column or a precise definition in English. Include the table in the solution document.
(b) Implementation
• If you choose a model-to-model transformation approach, implement the transformation using ATL or Henshin. Include the transformation in the solution document. This will be a textual file if you have used ATL and a collection of graphical transformation rules if you have used Henshin.
• If you choose a model-to-text transformation approach, implement the transformation using a templating tool such as Acceleo, Xpand or Xtend.
The resulting code should be a collection of HTML pages that are browsable from a standard web browser. Include brief comments so as to clarify the main aspects of the transformation.
The implementation should include a script for compiling your DSL programs from a terminal console. The input for that script will be your DSL program and the output will be a collection of HTML pages that need to be deployed onto a web application server. You can use Gradle as scripting language, although this choice is not enforced.
3. Develop a brief tutorial on the use of your DSL and tool support for a webdesigner (the domain expert) by including a small example.
4. Critically discuss the MDD principles, standards, technology used to develop the proposed project by considering (max. word count: 1000):
• The main features used from the model transformation language to implement the mapping from your DSL to the target language.
• The maturity of the technology used from the Eclipse Modeling Project, focusing on model transformation tasks, by considering their advantages and disadvantages.
• At least one alternative approach/tool that may help in automating the implementation of web applications using DSLs. You may refer to alternative DSLs that already implement the same idea or alternative solutions using other software engineering approaches.
In the assessment of the essay, the following marking guidelines will be considered:
• Are the main features of the model transformation language used correctly? Have all relevant technical details be taken into account?
• Are the main reasons given to justify MDD technology realistic? Are they based on concrete examples developed in the project? Are all the reasons contributing to a final conclusion?
• Are other approaches/tools referenced appropriately by including a summary of their relevant features, the correspondence with the project and appropriate references to resources? Has the student developed his own opinion on the use of the alternative approach by including a consistent comparison?
The submission should consist of a zipped file containing:
• A PDF document including a solution for each of the exercises proposed.
• A zipped file containing all the Eclipse projects used to develop the DSL and to test it.
• A README.txt file, briefly explaining the structure of the zipped file, with clear instructions on how to compile the DSL and on how to execute already prepared examples, both for testing the syntax of the DSL and for executing the model compiler.
Final Outcome
– The DSL syntax captures all the relevant notions. The concrete syntax is intuitive, properly designed using a context-free grammar (or their equivalent representation depending on the approach used):
∗ Textual syntax: Xtext script together with the plug-in that implements the compiler and several examples.
∗ Graphical syntax: project with the plug-in that implements the graphical editor and several examples.
∗ UML profile: definition of a UML profile using UML2 tools or Papyrus.
The DSL syntax has been tested with several examples covering all the possible notions.
– A compiler for DSL programs produces fully working HTML pages, which can be navigated by using a standard web browser. The compiler is available as a program (or Eclipse plug-in) and it has been thoroughly tested with examples, including those defined in the previous exercise.
– The compilation process is fully automated by using a script so that a web designer can use the DSL without having to know how it has been implemented at all. The parts of the project that are visible to an end user (web designer) are the DSL, a command to compile the program and the resulting HTML code.
– The tutorial helps a non-technical user (a web designer) to use the DSL and the DSL tool environment by explaining the main use case with examples.
– The essay includes a objective view on the technology and techniques discussed in the module, demonstrating deep, analytic comprehension of the approaches and tools used to design DSLs discussed in the module. The student is able to relate these to alternative approaches and tools for designing DSLs that may not have been discussed in the module.
– The solution document is well written, following a logical structure and using a consistent style and professional layout.
– The code submitted is well structured and properly documented. It is absolutely clear how to execute the examples and what the goal of each project included in the solution is. There is no superfluous code.