Introduction

This post is going to be very short as there comparison here is rather trivial. Both tools can be integrated with any of the transformation frameworks available in Eclipse.

EMFText does not include transformation nor suggest any specific  transformer.

Xtext integrates tightly with one of the transformation frameworks, but can be reconfigured to use others.

Xtext and Xpand/Xtend

Xtext provides an integrated model-to-text (M2T) code generation framework called Xpand. Xpand is a separate Eclipse project (part of the M2T in Eclipse). The integration is relatively seamless and the wizards of Xtext create a separate project dedicated to code generation.

Xtext also provides an integration with Xtend. Xtend can be used to extend Xpand and it can also be used as a model-to-model (M2M) transformation framework.

Xpand and Xtend are mature transformation tools that you can read about here. I’ll not discuss the Xpand nor Xtend framework further in this blog (I’m thinking of writing up a comparison blog of the various M2T framework later).

If for some reason you’d like to use another transformation framework, you can do so with Xtext, although you have to spend some time deconfiguring and reconfiguring your project.

EMFText and Transformers

The short story is that EMFText does not include a transformation framework , but I speculate that this is deliberate!
There are several options for transformation from the abstract syntax (that is the ecore model) in Eclipse (and also outside eclipse) and EMFText allows you to choose whichever toolset you’d like.

For M2T, the obvious choices are Xpand, JET, or Acceleo.

For M2M, there are also many choices (including Xtend). For more information of the M2M projects for Eclipse, take a look at the M2M portal at Eclipse.

Which Approach is better?

If you don’t have a preference for transformation tools, you may benefit from the tight integration that Xtext provides with Xpand and Xtend. The new project wizard creates a complete setup using Xpand and Xtext.

However, if you do have a preference and this preference is not Xpand and Xtext, you may find the EMFText a better starting point as you don’t have to 'deconfigure’ your project to remove the Xpand/Xtend dependencies.

As I said when comparing the development processes, it is unfair to say that one approach is better than the other. They’re just different.

On a personal note, some of my code generators are too complex to use M2T or a trival M2M transformation. I have to run the model through a chain of M2M transformation before the final M2T, in these projects. For these projects I could use Xtext and reconfigure the projects or just simply use EMFText.

Conclusion

Again we’re seeing a slightly different philosophy when looking at EMFText and Xtext. EMFText does not provide any particular code generation framework (or other transformer technologies) and you decide which framework to use.

With Xtext you’ll pay a penalty if you want to use a different framework than Xpand/Xtend, but if you use Xpand/Xtext, configuration is automatic.

In EMFText you would have to configure the code generation framework yourself, but you never have to ‘deconfigure’ the project :)

4

View comments

Today, I want to introduce the word 'dugnad' (pronounced ˈdʉːgnɑd]) to my friends and colleagues.  
Dugnad is a word from Old Norse and it is wrongly translated as 'volunteer work' in the English dictionary. Dugnad has a much richer meaning and tradition in Norway. Dugnad is when a community comes together to fix a problem in their community. 
When I lived in Norway, it was usually used to describe a common effort like cleaning up a common area in your neighborhood or perhaps your sports club comes together to improve the sports facility.
The word, dugnad, is now used in Norway to talk about the shared effort required to fight the coronavirus. 
Source: Wikipedia. Picture of a Dugnad where a group came together to put down a roof 
I can't find a US word for dugnad, so I am hereby submitting it to the dictionary for inclusion (the last word I know we managed to sneak into the English dictionary was quisling, so it is time the Norwegian language contributes a positive word).
I have seen how the communities come together in the US as well. A great example is all the healthcare workers that have volunteered for working with the coronavirus patients in New York (76,000 of them at the latest count). Also, Jayde Powell, who started Angle Shopper (see https://www.cnn.com/2020/03/17/us/coronavirus-student-volunteers-grocery-shop-elderly-iyw-trnd/index.html). 
In fact, the USA is known to come together under a crisis. E.g., think of the effort that the USA put together to fight the Nazis during the second world war. In 1939, the airplane production in the US was 3,000... by the end of the war,  the US produced 300,000 planes.
I pledge to start my own dugnads. The first will be to share the lessons learned working remotely. I am one of the fortunate ones that work remotely and have been for the last 12 years. As of now, the virus has not hit me and my company because all our work is already remote.
I also plan to start free online seminars on various topics that I now teach for various companies and universities.
I'll post the article on how to work remotely here on my blog. I will also start my online seminars as soon as I can figure out which platform is best suited to handle the load (last time I taught a class online, I had 8,000 students and I'm pretty sure my Zoom subscription doesn't handle that :). 
1

View comments

About Me
About Me
Blog Archive
Subscribe
Subscribe
Links
Subscribe
Subscribe
Loading