Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa.

Similar presentations


Presentation on theme: "© Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa."— Presentation transcript:

1 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa Schwanninger SIEMENS CT SE 2

2 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 2 Contents Aspectual Collaborations UML for Aspects (UFA) Standard UML for Aspects (sUFA) Model-Driven Development Framework openArchitectureWare Binding Generation Process

3 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 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 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 4 Aspectual Collaborations (2) … modularization of „crosscutting concerns“ and beyond that … … focus on component integration by means of aspect-oriented concepts.

5 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 5 ObserverProtocolImpl Observer Subject Composition ObserverProtocol add (Observer) remove(Observer) Subject notify() start(Subject) stop(Subject) Observer update(Subject) collaboration interface refinement & bindings with mixin-in inheritance generic component component binding concrete component LibraryObserver BookCopy BookManager ObserveLibrary BookCopySubject BookManagerObserver Subject Observer

6 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 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 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 7 UML for Aspects (2) Aspectual Collaboration needing refinement before use Ordinary package (base application) Package refinement/specialization Directed adaptation relation: Observer may use and influence Library Package connecting the independent packages Observer and Library

8 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 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 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 9 Standard UML for Aspects Standard UML compliant using stereotypes Supports all UFA concepts Models can be developed using commercial UML modeling tools

10 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 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 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 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 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 12 Binding Generation Process 1.Modeling with standard UML tool using the sUFA notation 2.XMI export of the model (input to the generator tool chain) 3.Automatic transformation of the XMI model to a defined XML format 4.Validation of the model 5.Generation of CaesarJ / ObjectTeams binding code 1 2 3 4 5

13 © Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 13 Thanks for your attention!


Download ppt "© Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa."

Similar presentations


Ads by Google