blob: bf48aa1b35836774607d6da1f1ee98ddcd1fc921 [file] [log] [blame]
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
#*****************************************************************************
#
# template.php
#
# Author: Freddy Allilaire
# Date: 2005-12-07
#
# Description: Type your page comments here - these are not sent to the browser
#
#
#****************************************************************************
#
# Begin: page-specific settings. Change these.
$pageTitle = "AMW Use Case - Aspect Oriented Modeling";
$pageKeywords = "";
$pageAuthor = "Marcos Didonet Del Fabro";
# End: page-specific settings
#
# Paste your HTML content between the EOHTML markers!
$html = <<<EOHTML
<!-- Main part -->
<div id="midcolumn">
<h1><font color='#280882'>AMW</font> Use Case - Aspect Oriented Modeling</h1>
<a name="goals"></a>
<img align="right" src="../../resources/amwLogoSmall.png" valign="top" style="padding-left: 10px;" alt="AMW Logo" />
<blockquote>
<ul>
<li><a href="#overview"><b>Overview</b></a></li>
<li><a href="#download"><b>Download and examples</b></a></li>
<li><a href="#related"><b>Related use cases</b></a></li>
<!--<li><a href="#documentation"><b>Documentation</b></a></li>-->
</ul>
</blockquote>
<hr class="clearer" />
<table>
<COLGROUP>
<COL width="2%">
<COL width="98%">
<tr>
<td></td>
This use case demonstrates how AMW is used as an aspect oriented modeling solution to weave
a generic communication protocol with specific communication types (this example is inspired on the paper of <a href="./#paperAOM">Florian
Heidenreich et al.</a>).
<p/>
<h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C; background-position: top left;
background-repeat; repeat-x;"><a name="overview">Overview</a></h4>
In aspect oriented modeling, the program with the main business logic and the cross cutting concerns are represented by models.
There are many cross cutting concerns that are not part of the problem, such as security, logging, persistency, etc.
Differently from traditional aspect oriented programming, in aspect oriented modeling there is no preferential entity.
This means the weaving can be done in any model (e.g., weavings in the business models or in the cross
cutting concerns).
<p/>
<p align="justify">
The weaving operations are defined in a weaving model. The weaving model conforms to a weaving metamodel, which
defines different kinds of possible links between the models. The links are domain specific, i.e., aspect oriented links.
For example, <i>create attribute</i>, <i>create method</i>, <i>add after</i>,
<i>delete</i>, <i>merge</i>, etc. The weaving operation is non invasive, i.e., the models remain unchanged.
<p/>
Consider a simple example with two simple metamodels, <i>MM1</i> and <i>MM2</i>. <i>MM1</i> describes a simple
and generic communication protocol (the <i>core model</i>). <i>MM2</i> defines attributes of specific communicaiton types, such as Email,
SMS, telephone, or fax (the <i>advice model</i>). The goal is to weave the generic protocol with the communication types. <br/>
<p/>
The first step is to create the weaving operations as as extensions of the <a href="http://www.eclipse.org/gmt/amw/zoo/#AMW%20core">core weaving metamodel</a>.
The AOM extension takes into account three main issues:
<ul>
<li><b>Where to weave:</b> the elements that can be woven are defined as extensions of <i>WElementRef</i></li>
<li><b>How to weave:</b> the different kinds of links are extensions of <i>WLink</i></li>
<li><b>How many models to weave?</b> It is possible to weave several models. This is defined in the extensions
to <i>WModel</i></li>
</ul><p/>
In the illustration in Figure 1, the metamodel extension defines only one core model, because the advice could
be defined directly as extensions of the weaving metamodel.
<p align="center">
<img src="../resources/aomWModel.png"/>
<br /><br />
<b>1. Extension to WModel</b>
</p>
To add a second model, a new reference is included. The AMW plug-in handles this automatically, because
the user interface adapts to any extension of the core metamodel (the plug-in automatically generate a set of standard menus
based on the metamodel extension).
<p align="center">
<img src="../resources/aomSecondModel.png"/"> <br/>
<img src="../resources/aomScreen.png"/>
<br /><br />
<b>2. Extension to WModel and adaptive interface of AMW</b>
</p>
The metamodel extension of Figure 3 enables to create methods and attributes of a source model into a class of
a target model. Each reference points to a different <i>WLinkEnd</i> (Class, Method, Attribute). These references enable
to create methods, classes and attributes.
<p align="center">
<img src="../resources/aomDiagram.png"/>
<br /><br />
<b>3. AOM extension to WLink</b>
</p>
The weaving operation is <i>interpreted</i> in the ATL engine.
An ATL transformation matches every type of link and executes the appropriate weaving operation.
The "Weave.atl" transformation takes the weaving model, the generic communication model and the communication
type metamodels as input and produces a new woven model. An excerpt is shown in Figure 4.
<p align="center">
<img src="../resources/aomATL.png"/>
<br /><br />
<b>4. Weave.atl</b>
</p>
<br>
<h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C;
background-position: top left; background-repeat; repeat-x;">
<a name="download">Download and examples</a></h4>
<table>
<COLGROUP>
<COL width="25%">
<COL width="75%">
<tr>
<td align="center">
<h3><a href="../../examples/AOM/AOM.zip">Communication <br/>example</a></h3>
</td>
<td>
Implementation of the simple communication example using AMW and ATL .
</td>
</tr>
<td align="center">
<h3><a href="../../examples/AOM/AMW_AOP_2007.ppt">Presentation</a></h3>
</td>
<td>
This presentation is a general overview about how Aspect Oriented Modeling is
used to solve current AOP problems.
</td>
</tr>
</table>
<h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C;
background-position: top left; background-repeat; repeat-x;">
<a name="related">Related use cases</a></h4>
<table>
<COLGROUP>
<COL width="25%">
<COL width="68%">
<tr>
<tr>
<td align="center">
<a href="../matching/"><h3>Matching</h3></a>
</td>
<td>
Matching is the generic process that creates weaving models.
This use case gives a general overview of the matching process, and how it is handled by AMW and ATL.
</td>
</tr>
</table>
<p/>
<b><a name="paperAOM">Reference</a>:</b><br/>
Florian Heidenreich and Henrik Lochmann. Using Graph-Rewriting for Model Weaving in the context of
Aspect-Oriented Product Line Engineering. In Proceedings of the First Workshop on Aspect-Oriented Product Line
Engineering (<a href="http://www.softeng.ox.ac.uk/aople/">AOPLE'06</a>) co-located with the International Conference on
Generative Programming and Component Engineering (GPCE'06), Portland, Oregon, October 2006.
(<a href="http://www.softeng.ox.ac.uk/aople/papers/submission_7.pdf">download</a>)
</div>
EOHTML;
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>