The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Re: Processing of MetaEdit Models with oAW

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Steven Kelly

Posts: 294
Nickname: stevek
Registered: Jul, 2005

Steven Kelly is CTO at MetaCase and lead developer of the MetaEdit+ Domain-Specific Modeling tool
Re: Processing of MetaEdit Models with oAW Posted: Aug 28, 2009 5:30 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Steven Kelly.
Original Post: Re: Processing of MetaEdit Models with oAW
Feed Title: Steven Kelly on DSM
Feed URL: http://www.metacase.com/blogs/stevek/stevek-rss.xml
Feed Description: Domain-Specific Modeling: A Toolmaker Perspective
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Steven Kelly
Latest Posts From Steven Kelly on DSM

Advertisement

Heiko Kern has written a great set of information on how to process MetaEdit+ models with oAW (the openArchitectureWare model transformation tools for Eclipse). The integration he's built is a great example of how easy it is to integrate MetaEdit+ with other tools:

  • You can export models or metamodels from MetaEdit+ as XML. The format is an extension of the open Graph eXchange Language standard, GXL, supported by over 40 tools.
  • You can quickly write a little generator to output your models in whatever XML or other text format you want.
  • MetaEdit+ can call other tools from its generators, e.g. for build integration.
  • Other tools can call MetaEdit+ with command-line parameters to specify a series of actions to run.
  • Other tools can call MetaEdit+ through its WebServices / SOAP API, to create/read/update/delete any data in models, and for control integration, e.g. to animate models for model-level debugging.
  • You can import models or metamodels as XML.
  • You can import text in any format and convert it to models via reverse engineering generators.

At last year's OOPSLA DSM workshop, Heiko had an article about his MetaEdit+ / Eclipse integration. We had a good discussion about it, in particular about his reasons for building it. His paper gave the impression that he wanted to use oAW rather than MetaEdit+'s own MERL generator language, because he needed some specific features in oAW. It turned out though that he hadn't actually used MERL, and didn't realise that MERL and oAW's XPand are actually very similar in terms of approach and functionality.

MERL tends to be a little more succint: here is the MERL generator to output simple Java classes for a UML Class Diagram, as in Heiko's example:

subreport '_translators' run

foreach .Class [UML]
{  filename id '.java' write
      'public class ' id ' {' $cr2

      do :Attributes
      {  '   ' :Visibility ' ' :Data type; ' ' :Name ';' $cr2

         '   public void set' :Name%irstUpper '(' :Data type; ' ' :Name ') {' $cr
         '      this.' :Name ' = ' :Name ';' $cr
         '   }' $cr2

         '   public ' :Data type; ' get' :Name%irstUpper '() {' $cr
         '      return this.' :Name ';' $cr
         '   }' $cr2
      }
      '}'
   close 
}

Heiko's oAW XPand code is 65% longer. Even ignoring the extra loop over all Class Diagrams that Heiko needs (MetaEdit+ offers that automatically in the UI or via the forAll:run: command-line parameter), oAW is still over 20% longer. The actual difference isn't that important: I'm sure both could be made shorter for this example, but the current code is typical of what is generally written. My point is that there's no real saving to be had by using XPand instead of MERL. If your models are in MetaEdit+, use MERL; if they're in Eclipse, use oAW. Having integration is great, but if you can avoid using it then that's even better.

Read: Re: Processing of MetaEdit Models with oAW

Topic: F-Script 2.0 Previous Topic   Next Topic Topic: New Energized Work website is coming soon

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use