1 / 13

Model-Driven Development for Pluggable Collaborations

Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher , Christa Schwanninger SIEMENS CT SE 2. Contents. Aspectual Collaborations UML for Aspects (UFA) Standard UML for Aspects (sUFA) Model-Driven Development Framework openArchitectureWare

bona
Download Presentation

Model-Driven Development for Pluggable Collaborations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa Schwanninger SIEMENS CT SE 2

  2. Contents • Aspectual Collaborations • UML for Aspects (UFA) • Standard UML for Aspects (sUFA) • Model-Driven Development Framework • openArchitectureWare • Binding Generation Process

  3. Aspectual Collaborations • New programming model that supports the encapsulation of crosscutting concerns • Modular implementation of multiple collaborating types independent of the system they will be applied to • A collaboration interface specifies the abstractions (types) that together form the component • Serves as the interface between its implementation and its mapping to a base application • Interface states which properties and services are provided by the component and which ones are expected from the system (base application) it will be applied to • Can have several distinct implementations • The mapping to a base application is specified in a so-called binding • Composition of binding and implementation using mixin-composition • Explicit deployment • Supported by the aspect-oriented programming languages CaesarJ and ObjectTeams

  4. Aspectual Collaborations (2) … modularization of „crosscutting concerns“ and beyond that … … focus on component integration by means of aspect-oriented concepts.

  5. ObserverProtocol Observer Subject add (Observer) start(Subject) remove(Observer) stop(Subject) update(Subject) notify() generic component component binding ObserverProtocolImpl ObserveLibrary Subject BookCopySubject BookCopy Observer BookManagerObserver Observer Subject BookManager concrete component LibraryObserver Composition collaboration interface refinement & bindings with mixin-in inheritance

  6. UML for Aspects (UFA) • Modeling language for aspect-oriented design that strongly supports the concept of Aspectual Collaborations • The notation extends UML packages to encapsulate complex structures (either component or base application) • Three kinds of packages • Base package for base application • Abstract package for Aspectual Collaboration • Connector package for binding • The classes inside the connector package are enhanced UML classes and support the adaptation of the abstract collaboration to a certain application

  7. UML for Aspects (2) Aspectual Collaboration needing refinement before use Package refinement/specialization Package connecting the independent packages Observer and Library Directed adaptation relation: Observer may use and influence Library Ordinary package (base application)

  8. Connector Package Mapping of role Subject to class BookCopy Callin: After methods borrowCopy() and returnCopy() of class BookCopy, the method notify() of class Subject is called Mapping of role Observer to class BookManager Callout: The abstract method update() of class Observer delegates to method updateStatus() of class BookManager

  9. Standard UML for Aspects • Standard UML compliant using stereotypes • Supports all UFA concepts • Models can be developed using commercial UML modeling tools

  10. CaesarJ Binding Code abstract public cclass ObserveLibrary extends ObserverProtocol { public cclass Subject wraps BookCopy { public BookCopy getWrappee() { return wrappee; } } public cclass Observer wraps BookManager { public void update(SubjectRole s) { wrappee.updateStatus(s.getWrappee()); } } after(BookCopy bc):(call(public void borrowCopy()) || call(public void returnCopy())) && target(bc) { Subject(bc).notify(); } after(BookManager bm, BookCopy bc): (call(public void buy(BookCopy)) && target(bm) && args(bc) { Observer(bm).start(Subject(bc)); } after(BookManager bm, BookCopy bc): (call(public void drop(BookCopy)) && target(bm) && args(bc) { Observer(bm).stop(Subject(bc)); } } • Implementation of binding code straightforward  all necessary information already contained in model • Error prone • Necessary for the component composer to be familiar with CaesarJ / ObjectTeams  Generate code automatically from model

  11. openArchitectureWare • Open source MDD generator framework integrated into eclipse • Supports arbitrary input formats and output formats • Own metamodels can be implemented in Java • A metamodel of the domain has to be defined and implemented as Java classes • Templates specify the output (e.g. code) • A model has to be created (an instance of the metamodel) which can be done using for example UML tools, textual languages or XML • The generator parses the respective model and builds a syntax tree in memory by instantiating the metaclasses • The generator then navigates through the syntax tree and performs the actions described in the templates

  12. 1 2 3 4 5 Binding Generation Process • Modeling with standard UML tool using the sUFA notation • XMI export of the model (input to the generator tool chain) • Automatic transformation of the XMI model to a defined XML format • Validation of the model • Generation of CaesarJ / ObjectTeams binding code

  13. Thanks for your attention!

More Related