Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » What is the different between ecore, xcore,xtend,xtext etc
What is the different between ecore, xcore,xtend,xtext etc [message #1745376] Sun, 09 October 2016 09:21 Go to next message
Md.Shariful Islam is currently offline Md.Shariful IslamFriend
Messages: 4
Registered: January 2013
Junior Member
Hi,

I just started learning EMF and found few projects that is related to EMF . for example : ecore, xcore, xtend, xtext etc.

As a beginner it is becoming bit difficult to understand and relate all this projects with eclipse modeling framework.

is there any documentation or blog post where i can get the basic knowledge of all this project and relate to each other ?

Kind Regards
Sharif
Re: What is the different between ecore, xcore,xtend,xtext etc [message #1745383 is a reply to message #1745376] Sun, 09 October 2016 23:07 Go to previous messageGo to next message
Aurélien Mora is currently offline Aurélien MoraFriend
Messages: 38
Registered: July 2014
Member
Hello,

Ecore is a main component of EMF. To simplify, ecore is the way you define a metamodel for EMF (like an UML class diagram). You can directly define it in ecore files, or import it from UML, XSD, Java annoted code...

Xcore is an other project that extends EMF, based on Xtext, and allows you to define your metamodel in a new format : Xcore.

Xtext is a framework for defining languages (for programming purpose for example, but not only).
Xtend is a programming language defined with Xtext, that allows (amongst lots other features) use of powerful lambda expressions. The Xtend code is automatically transformed in java code.

[Updated on: Mon, 10 October 2016 07:34]

Report message to a moderator

Re: What is the different between ecore, xcore,xtend,xtext etc [message #1745390 is a reply to message #1745383] Mon, 10 October 2016 06:27 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31907
Registered: July 2009
Senior Member
Note however that Xtext is related to EMF and uses it heavily. The Xtext grammar language is modeled with Ecore. As such, the Xtext self-describing grammar, as do all Xtext grammars, induces or uses an Ecore/GenModel combination that helps generate the Java implementation of the infrastructure of the DSL that the grammar defines. Xcore and Xtext and are both examples of DSLs implemented with Xtext, so both have an Xtext grammar and underlying Ecore model to represent the language. In the case of Xcore, that model is used to infer an Ecore model and GenModel because the Xcore model is a DSL for describing Ecore itself. That are lots of meta dependencies involved.

In the end, if you want to define a model, you can use Ecore or Xcore to define that model, so you can use the Sample Ecore Editor, the Ecore Tools graphical editor, of the Xcore textual editor to define you model. If you want to define a model with a nice textual concrete syntax, you'll want to use Xtext to define the grammar for that model, using the very nice textual editor for it. Even in that case, you may either define the Ecore model for the language separately and map it onto the grammar, or you may let Xtext infer an Ecore model from the grammar. Separate from that whole discussion, instead of writing code in Java you may want to write it in Xtend because it's essentially Java on steroids with awesome expressive notation that lets you express your logic in super elegant ways not possible in Java itself. Xtend compiles to Java source so anything that requires code written in Java can make use of code written in Xtend and Xtend can use anything written in Java so it's totally seamless.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[EMF] Lower bound 0 vs lower bound 1 of Reference
Next Topic:[CDO] Case in schema name with PostgreSQL
Goto Forum:
  


Current Time: Fri Jun 18 04:04:21 GMT 2021

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

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

Back to the top