Home » Modeling » EMF » Introductory question EMF in general
Introductory question EMF in general [message #492083] |
Sun, 18 October 2009 09:57 |
Tom Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hello everybody,
I've been starting to read about EMF some time ago but the more I read the more confused I get. Some articles say that you can create your own models using EMF and that you can switch between the representations UML, Java and XSD (EMF unifies those). Others say that you can create your own metamodels and use Ecore as the metametamodel.
I would like to know whether my current understand of EMF is correct - and if it isn't what I got wrong.
Basically we can define our own metamodel using annotated java interfaces, xml schema or uml. This can be "transformed" into a .ecore file - the ecore model which represents our metamodel. Moreover there will be a genmodel which can be used to generate for example an eclipse plugin that allows us to create models that are conform to our own metamodel.
What confuses me is that some articles/papers say that we create our own models by using annotated java and so on. Of course a metamodel is a model too but I think a differentiation is not that bad at this point.
Up to now something I got wrong? Concerning the unification of UML, Java and XSD I have another question: I can create my metamodel for example using annotated java. After creating the corresponding .ecore I can create a uml diagram or the xml schema as well and therefore switch between different representations of the meta(!)model?
Thank you very much in advance. I know that these questions are very basic and probably boring for lots of you. Nevertheless I hope someone answers/corrects me.
Best regards,
Tom
[Updated on: Sun, 18 October 2009 09:57] Report message to a moderator
|
|
|
Re: Introductory question EMF in general [message #492084 is a reply to message #492083] |
Sun, 18 October 2009 10:44 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Tom,
Comments below.
Tom wrote:
> Hello everybody,
> I've been starting to read about EMF some time ago but the more I read
> the more confused I get.
It's a floor polish and a dessert topping. :-P
> Some articles say that you can create your own models using EMF and
> that you can switch between the representations UML, Java and XSD (EMF
> unifies those).
Yep.
> Others say that you can create your own metamodels and use Ecore as
> the metametamodel.
Indeed, XSD is a metamodel created with Ecore as the metametamodel.
There's not all that much difference between a model and a metamodel
given they're both models.
>
> I would like to know whether my current understand of EMF is correct -
> and if it isn't what I got wrong.
>
> Basically we can define our own metamodel
You can define your own model. Whether it's a metamodel really depends
on what kind of model you define.
> using annotated java interfaces, xml schema or uml. This can be
> "transformed" into a .ecore file - the ecore model which represents
> our metamodel. Moreover there will be a genmodel which can be used to
> generate for example an eclipse plugin that allows us to create models
> that are conform to our own metamodel.
>
> What confuses me is that some articles/papers say that we create our
> own models by using annotated java and so on. Of course a metamodel is
> a model too but I think a differentiation is not that bad at this point.
Actually I find that more often than not, the word meta leads to
confusion rather than clarifying anything. That appears to be the case
here.
>
> Up to now something I got wrong? Concerning the unification of UML,
> Java and XSD I have another question: I can create my metamodel for
> example using annotated java. After creating the corresponding .ecore
> I can create a uml diagram or the xml schema as well and therefore
> switch between different representations of the meta(!)model?
Yes, you can export to UML, XML Schema, and of course you can generated
Java and you can import from those forms as well.
>
> Thank you very much in advance. I know that these questions are very
> basic and probably boring for lots of you. Nevertheless I hope someone
> answers/corrects me.
As I said, EMF lets you define a model using Ecore, a model for
describing models, and hence Ecore itself is metamodel while the model
you define with Ecore may or may not be a metamodel.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | | |
Re: Introductory question EMF in general [message #492099 is a reply to message #492090] |
Sun, 18 October 2009 16:29 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------070009080903060601040606
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Volker,
Comments below.
Volker Wegert wrote:
> Hi, Tom.
>
> Tom <copiod@web.de> writes:
>
>> In order to create the [EMF] model there are different possibilities -
>> depending on my prefered way (uml, xml schema, java).
>>
>
> I think the only (small) misunderstanding is here. To simplify: EMF = Ecore +
> code generator (hope Ed won't hit me too hard).
Note that with dynamic Ecore, you don't actually need to generate the
code for the model to be able to use the model.
> To use the generator, you need
> an Ecore model. You can create it directly or transform some other source (for
> example, XML schema) into an Ecore model. I prefer to create the Ecore models
> directly and encourage you to do so, at least while you're learning EMF - it's
> a lot easier if you don't add another level of model conversions on top.
>
I agree. XML schema is nice when you need to conform to a specific XML
serialization, but if that's not the case you're best off to use Ecore
directly.
> HTH
> Volker
>
>
--------------070009080903060601040606
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Volker,<br>
<br>
Comments below.<br>
<br>
Volker Wegert wrote:
<blockquote cite="mid:844opwpxs7.fsf@zak.home.volker-wegert.de"
type="cite">
<pre wrap="">Hi, Tom.
Tom <a class="moz-txt-link-rfc2396E" href="mailto:copiod@web.de"><copiod@web.de></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">In order to create the [EMF] model there are different possibilities -
depending on my prefered way (uml, xml schema, java).
</pre>
</blockquote>
<pre wrap=""><!---->
I think the only (small) misunderstanding is here. To simplify: EMF = Ecore +
code generator (hope Ed won't hit me too hard). </pre>
</blockquote>
Note that with dynamic Ecore, you don't actually need to generate the
code for the model to be able to use the model.<br>
<blockquote cite="mid:844opwpxs7.fsf@zak.home.volker-wegert.de"
type="cite">
<pre wrap="">To use the generator, you need
an Ecore model. You can create it directly or transform some other source (for
example, XML schema) into an Ecore model. I prefer to create the Ecore models
directly and encourage you to do so, at least while you're learning EMF - it's
a lot easier if you don't add another level of model conversions on top.
</pre>
</blockquote>
I agree. XML schema is nice when you need to conform to a specific XML
serialization, but if that's not the case you're best off to use Ecore
directly.<br>
<blockquote cite="mid:844opwpxs7.fsf@zak.home.volker-wegert.de"
type="cite">
<pre wrap="">
HTH
Volker
</pre>
</blockquote>
</body>
</html>
--------------070009080903060601040606--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 01:37:14 GMT 2024
Powered by FUDForum. Page generated in 0.04092 seconds
|