Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Xpand vs Acceleo vs JET
Xpand vs Acceleo vs JET [message #510287] Wed, 27 January 2010 06:17 Go to next message
Erik Putrycz is currently offline Erik PutryczFriend
Messages: 13
Registered: December 2009
Junior Member
I would like to generate several artifacts from UML 2 classes (Java code and jsp pages) and I'm trying to select the best tool for the job.

I found a decent amount of documentation for Acceleo and examples, it is reasonably straightforward to generate java code from UML.

Xpand seems quite powerful but I cannot figure out how to get started and not sure what kind of advantages I would get. Is there any updated documentation?

JET looks like JSP which I would like to avoid. I heard about JET2 but the most recent version is 1.1.

Any clues, recommendations or comments?
Re: Xpand vs Acceleo vs JET [message #510312 is a reply to message #510287] Wed, 27 January 2010 08:34 Go to previous messageGo to next message
Erhard Weinell is currently offline Erhard WeinellFriend
Messages: 39
Registered: January 2010
Location: Kassel, Germany
Member
Hi Erik,

Am 27.01.2010 07:17, schrieb Erik Putrycz:
> Xpand seems quite powerful but I cannot figure out how to get started
> and not sure what kind of advantages I would get. Is there any updated
> documentation?

The reference manual is up-to-date as far as I know.

To get started, just create a new Xpand project and choose the "generate
sample" option. From there, you have to add a dependency to the
org.eclipse.uml2.uml plugin, and reference the uml2 metamodel in the
MWE-workflow. BTW, Xtend/Xpand have quite some decent support for UML
profiles, in case you need this.

Best regards,
Erhard
Re: Xpand vs Acceleo vs JET [message #510444 is a reply to message #510287] Wed, 27 January 2010 14:48 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Erik:

With regard to JET. The 1.1 version is the 'in-development' version -
slated for release in June 2010. The most recent released version is
1.0. Both are sometimes know as 'JET2'. JET2 is an evolution of the JET
engine used by EMF (which I sometimes call JET1). Here's a quick rundown
of the differences:

JET1
* template language based on JSP-like 'scriptlets' and 'expressions'.
That is, you embed Java statements (scriptlets) and expressions into a
text document.
* Each template produces a Java class that transforms a Java Object into
a String object. As a developer, you are responsible for instantiating
this class, passing it the correct object and doing something useful
with the returned string.
* Because of its simplicity, JET1 templates have NO external dependences
other than the ones that you explicitly introduce.

JET2
* In additional to scriptlets and expressions, JET2 supports tag
libraries, and provides standard tag libraries for basic flow control,
model access, formatting and writing of template results to an Eclipse
workspace.
* It is entirely feasible to write JET2 templates that includes no Java
code.
* Further more, it is entirely feasible to write suites of JET2
templates (called a transformation) that traverse a model (such as a
UML2 model) and write results to an Eclipse workspace without writing
any Java code.
* JET2 tags navigate a model via XPath expressions. But this does not
constrain JET2 to reading only XML documents. The XPath engine can adapt
XPath expressions to just about any meta-model. JET2 supports EMF-based
models (including UML2) out of the box.
* JET2 is dependent on Eclipse. JET2 templates and transforms will not
run outside of an Eclipse runtime (although you do not need a UI).

If you are interested, IBM Developer Works has just published an article
on using JET against UML2 models. It should give you an idea of what is
possible:

http://www.ibm.com/developerworks/rational/library/10/modeld rivenarchitecutreusing
jet2inrasorrsm/

Although it mentions IBM products, as far as I can see, you can
accomplish the same thing using only open source components. The IBM
products mentioned are using JET2 0.9.x. JET2 1.0 includes some
improvements with respect to stereotype access, and some attempts to
shorten markup. See:

http://wiki.eclipse.org/M2T-JET/Whats_New_in_1.0_%28Galileo% 29

Paul
Re: Xpand vs Acceleo vs JET [message #511245 is a reply to message #510287] Sun, 31 January 2010 18:18 Go to previous message
Anderson Ledo is currently offline Anderson LedoFriend
Messages: 13
Registered: July 2009
Junior Member
Do you have any reason for not trying MOFScript?
As I'm a mofscript user and I'm getting to know other generative technologies, it may help somehow knowing if you do.

http://www.eclipse.org/gmt/mofscript/

Regards,


Anderson Ledo
Campina Grande, Brazil
Previous Topic:[Acceleo] Nested calls to 'iterate' method
Next Topic:[Xpand] Referenced model unaccessible
Goto Forum:
  


Current Time: Fri Apr 19 20:42:15 GMT 2024

Powered by FUDForum. Page generated in 0.03169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top