Hi Stefan,

On 29 May 2012 10:45, Stefan Wuelfrath
<[email protected]> wrote:
> - As I understand XText is syntax-oriented (but also uses metamodels)
> and EMFText is metamodel-oriented. So, for new DSLs I think EMFText is
> the better choice. For already existing languages it is more difficult
> to decide, because with XText I can simply "copy" the language's
> syntax from its specification and with EMFText I must define its
> metamodel by myself. But by defining the metamodel this maybe helps
> someone to understand the language's structure. Would you agree with me?

Yes I tend to agree with you. When we did the Java metamodel and
grammar for EMFText, we created the metamodel and the grammar manually
(on the bases of the an ANTLR Java grammar). It helped us to
understand how concepts should be represented in the metamodel, which
was then very important for all the other code that needed to be
implemented (ReferenceResolvers and so on). And we found gaps and
errors in the grammar.

> - Do you know a syntax zoo (like the EMFText-one) for XText?

The only collection of Xtext projects I know of is the Xtext community
site: http://www.eclipse.org/Xtext/community/

Cheers
Jendrik

> Zitat von Jörn Guy Süß <[email protected]>:
>
>> Hi Stefan,
>>
>> I am using (have to use) both Xtext and EMFtext in different contexts.
>>
>> I guess the main difference in the "feel" of using the tools is the
>> philosophy towards the role of models, the integration into the 'base'
>> emf/eclipse environment, the speed of processing and documentation.
>>
>> XText is a very large tool, and it is built on a secondary generator
>> framework (MWE). It is great to get started with, but implicitly adds a
>> layer of abstraction to the build that requires an additional steep
>> learning curve. Usually this is not what you want to discover once
>> honeymoon is over. It is also built ontop two other meta languages that
>> it is closely connected to. So more to learn if you want to use it.
>> None of it is badly designed, but all of it very closely knitted.
>> Because of the intermittent steps, XText produces a lot of files and
>> takes its time for this. It is best suited for a top-down, one-step
>> approach (new metamodel, all the magic in the text-to-model step). I
>> mainly use XText with the embedded OCL editor to provide my EMF models
>> with declarative derived properties and queries.
>>
>> EMFText is highly respectful of existing frameworks and standards. As a
>> result, if you are familiar with EMF and associated extension points in
>> Eclipse, finding your way is easier. This makes its dependency tree
>> smaller and its translation faster. The documentation is very compact
>> and concise. EMFText's grammar editor has very good feedback so finding
>> issues is simplified. I find EMFText works well when working of an
>> existing metamodel with the full set of standard EMF features
>> (validation, declarative derived attributes ...) From my point of view
>> it is a more solid tool because issues are easier to diagnose. My only
>> gripe is that EMFtext is not an Eclipse sub-project. This would provide
>> more traction and exposure, and would allow other contributors in
>> eclipse space to use it, when they now seem to "default" to XText.
>>
>> My soapbox (i.e. personal opinion)
>> I believe that models should come first. They are the pivotal artifacts
>> in model-driven engineering. If you start MDE with a grammar, your
>> thinking will be dominated by the grammar form. Consequently I like
>> EMFText better for its approach, but I also like its lean design and
>> tight integration with standard facilities.
>>
>> Cheers, JG
>>
>> On 29/05/2012 04:47, Mirko Seifert wrote:
>>> Hi Stefan,
>>>
>>> sorry for the late reply.
>>>
>>> Your question is not easy to answer, mostly because there is many
>>> differences and it's hard to name all of them. I'll try to highlight the
>>> things that I think are most important, maybe the other developers or
>>> users will add to this. Also, please correct me if I'm wrong! I prefer
>>> to use EMFText, which is why the facts about Xtext might not be up to
>>> date ;)
>>>
>>> First, some words about the commonalities:
>>>
>>> - Both tools produce similar editors, parsers and printers. So from the
>>> perspective of a DSL user only few differences will be noted.
>>> - Both tools rely on EMF and ANTLR which explains why they are often
>>> perceived as very similar. The former fact allows to easily integrate
>>> with other EMF-based tools. Even the Xtool family (e.g., Xtend) can
>>> easily be used with EMFText.
>>>
>>> Now some differences:
>>>
>>> - EMFText does not derive a metamodel from the syntax. This is not a
>>> missing feature, but an intentional design decision.
>>>
>>> - EMFText does not allow syntax rules that do not correspond to
>>> metaclasses. This is also intentional as we think that all elements of a
>>> textual representation should be present in the respective metamodel. If
>>> some details of the text are not important for some task, they can be
>>> discarded at the model level.
>>>
>>> - EMFText generates code that is independent of EMFText. There is no
>>> runtime library. This allows to make arbitrary changes to the generated
>>> code and ensures that generated DSL plug-ins are not influenced by
>>> future versions of EMFText (unless one regenerated the code). Also, one
>>> can run multiple DSLs that were generated by different versions of
>>> EMFText within the same Eclipse instance.
>>>
>>> - EMFText has override options that allow users to select which classes
>>> are regenerated and which are kept. In contrast, Xtext uses dependency
>>> injection to let developers introduce customizations. The former is a
>>> way to support unforeseen extensions, the latter is a way to support
>>> foreseen extensions.
>>>
>>> - EMFText has a huge library of existing DSLs (the syntax zoo), which
>>> serve as examples. There is more than 100 working languages! Some
>>> languages in the zoo (e.g., Java, OCL and OWL) are quite complex and
>>> show how far one can get with EMFText.
>>>
>>> - EMFText integrates with the EMF Validation Framework, whereas Xtext
>>> has its own validation mechanism.
>>>
>>> - EMFText integrates with the EMF Edit infrastructure, whereas Xtext
>>> uses its own providers for icons and labels in the outline view.
>>>
>>> - EMFText has special support for expression languages (the @Operator
>>> annotations). Xtext provides the Xbase library for this purpose, which
>>> contains Java-like expressions (AFAIK).
>>>
>>> - EMFText DSLs can integrate with Java using JaMoPP (the Java syntax and
>>> metamodel) or the org.emftext.commons.jdt Plug-in. Xtext provides Java
>>> integration that is similar to the latter way.
>>>
>>> - EMFText has a quite complex syntax generator that can be used to
>>> obtain parameterized syntaxes for existing metamodels.
>>>
>>> - EMFText does not use a workflow languages to generate code. We support
>>> Single-Click-Code-Generations (in Eclipse) and provide Ant scripts that
>>> can do the same on a CI server.
>>>
>>> - EMFText generates builder and interpreter stubs, as well as, a
>>> complete debugger that works out of the box. I'm not sure to what extent
>>> this is supported by Xtext.
>>>
>>> - Parsers and printers that are generated by EMFText run without
>>> Eclipse. I don't know whether this is possible with Xtext.
>>>
>>>
>>> I hope others will add to this list so we can make this a part of the
>>> documentation.
>>>
>>> Best regards,
>>>
>>> Mirko
>>>
>>>
>>> 24.05.2012 15:21, Stefan Wuelfrath:
>>>> Hi,
>>>>
>>>> I have browsed the archives of EMFText and found a link to that article:
>>>>
>>>> http://pettergraff.blogspot.de/2009/11/xtext-or-emftext-that-is-question.html
>>>>
>>>> Since the article is a little bit old (2009), have been there some
>>>> changes in EMFText which could be interesting for comparing both tools?
>>>>
>>>> Thank your very much for your help!
>>>>
>>>> Best regards,
>>>> Stefan Wülfrath
>>>>
>>>> Zitat von Stefan Wuelfrath<[email protected]>:
>>>>
>>>>> Dear EMFText team,
>>>>>
>>>>> how you would compare EMFText with XText?
>>>>>
>>>>> What are advantages and disadvantages of both frameworks? What's the
>>>>> same and what's different?
>>>>>
>>>>> Can you give me a hint in which cases EMFText is the better choice and
>>>>> when to use XText?
>>>>>
>>>>> I know: That are many questions. :-)
>>>>>
>>>>> Thank you very much for your help!
>>>>>
>>>>> Best regards,
>>>>> Stefan Wülfrath

-- 
Dr. Jendrik Johannes
Geschäftsführer
DevBoost GmbH
Birkenau 10
22087 Hamburg

Tel.: +49 178 536 3745
E-Mail: [email protected]

http://www.devboost.de

Postanschrift:
DevBoost GmbH, Rungestraße 22-24, 10179 Berlin

Handelsregister Amtsgericht Berlin (Charlottenburg) HRB 140026
_______________________________________________
emftext-users mailing list
[email protected]
http://mail-st.inf.tu-dresden.de/cgi-bin/mailman/listinfo/emftext-users

Reply via email to