Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF for application architecture
EMF for application architecture [message #493221] Fri, 23 October 2009 17:19 Go to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Hi,
I was wondering if there is any reason one should not use EMF to model and generate a whole application architecture.
I.e. to not only model the document/entity models, but also the controller classes. Except maybe if one was planning to
use any special application frameworks.
So, would you say "totally yes", "rather not", or "matter of style and taste"?

Thanks

Joel
Re: EMF for application architecture [message #493232 is a reply to message #493221] Fri, 23 October 2009 18:07 Go to previous messageGo to next message
Richard Catlin is currently offline Richard CatlinFriend
Messages: 50
Registered: July 2009
Member
From the genmodel, you can generate
1. the model classes
2. EMF.Edit the controller classes. The EMF book states this is a starting point, and needs to be modified/extended for the application. See Ch 11 EMF Edit Generator Patterns
3. The Editor project, which is also a starting point. This is the UI dependent portion of EMF Edit.

Hope this helps some.
Richard
Re: EMF for application architecture [message #493249 is a reply to message #493232] Fri, 23 October 2009 21:19 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Richard,
thanks for your reply. However, my question is not so much on what EMF generates, but what to use EMF for and what,
maybe, not. Of course, the EMF 101 is create a model and generate all the editor support...
But what I mean is: Would you model your *application architecture* with EMF?
For example, let's say you created a business process model with EMF--okay. But, now you want to build a workflow engine
which executes your process models. And you engine consists of controllers with algorithms, a whole bunch of
communicating components... Would you model that application structure with EMF or rather not?

Best

Joel

Richard Catlin wrote:
> From the genmodel, you can generate
> 1. the model classes
> 2. EMF.Edit the controller classes. The EMF book states this is a
> starting point, and needs to be modified/extended for the application.
> See Ch 11 EMF Edit Generator Patterns
> 3. The Editor project, which is also a starting point. This is the UI
> dependent portion of EMF Edit.
>
> Hope this helps some.
> Richard
Re: EMF for application architecture [message #493273 is a reply to message #493249] Sat, 24 October 2009 05:41 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Joel,

I think the question should be: "Would you model and generate your
application architecture at all?" If so, you would certainly love to do
it with EMF.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Joel Greenyer schrieb:
> Richard,
> thanks for your reply. However, my question is not so much on what EMF
> generates, but what to use EMF for and what, maybe, not. Of course,
> the EMF 101 is create a model and generate all the editor support...
> But what I mean is: Would you model your *application architecture*
> with EMF?
> For example, let's say you created a business process model with
> EMF--okay. But, now you want to build a workflow engine which executes
> your process models. And you engine consists of controllers with
> algorithms, a whole bunch of communicating components... Would you
> model that application structure with EMF or rather not?
>
> Best
>
> Joel
>
> Richard Catlin wrote:
>> From the genmodel, you can generate
>> 1. the model classes
>> 2. EMF.Edit the controller classes. The EMF book states this is a
>> starting point, and needs to be modified/extended for the
>> application. See Ch 11 EMF Edit Generator Patterns
>> 3. The Editor project, which is also a starting point. This is the
>> UI dependent portion of EMF Edit.
>>
>> Hope this helps some.
>> Richard


Re: EMF for application architecture [message #493283 is a reply to message #493273] Sat, 24 October 2009 09:23 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Thanks Eike,
actually I really like doing that with EMF, but I was just not sure if there were any reasons not to. I was suggesting
some students in a project we're currently working on to model everything with EMF and they were a bit puzzled to use
EMF for anything apart from the entity model.

One case where I found EMF a bit "different" was the following:
I defined an extension point where the extending plug-in had to provide an implementation of an (EMF) base class. At the
extension point, however, one cannot simply hand over implementing class as one would do in case of plain Java. Rather,
I figure, for the extended plug-in to instantiate the extending class, the extension has to provide the package and the
name of that extending class (such that the EMF mechanisms for instantiating classes can be used properly).

Another thing is that ECore, as far as I can see, only supports the "public" visibility of operations. If I was modeling
with UML, I would also model and document the protected and private methods of the classes.
In the end, ECore is rather EMOF than UML, i.e. its primarily intended to model languages, and not software in general,
right?


Regards

Joel


Eike Stepper wrote:
> Hi Joel,
>
> I think the question should be: "Would you model and generate your
> application architecture at all?" If so, you would certainly love to do
> it with EMF.
>
> Cheers
> /Eike
Re: EMF for application architecture [message #493288 is a reply to message #493283] Sat, 24 October 2009 11:02 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Joel,

Comments below...


Joel Greenyer schrieb:
> Thanks Eike,
> actually I really like doing that with EMF, but I was just not sure if
> there were any reasons not to. I was suggesting some students in a
> project we're currently working on to model everything with EMF and
> they were a bit puzzled to use EMF for anything apart from the entity
> model.
I have the feeling you mess up a little bit the concepts of modeling and
generating artifacts from these models. You can use EMF technologies for
either one or both. In my opinion using Ecore as a modeling language is
generally a good choice, even if you use it to create your own domain
specific modeling language. For what you call entity models the EMF
generator, consisting of JET and some default templates, usually does a
very good job. In general you're not required to use those. You can
write your own Jet templates or even use a completely different
generation technology like Xpand or Acceleo. It's mostly a matter of
taste and your own specific requirements whether you use the EMF
generator for your application architecture components, or not.

>
> One case where I found EMF a bit "different" was the following:
> I defined an extension point where the extending plug-in had to
> provide an implementation of an (EMF) base class. At the extension
> point, however, one cannot simply hand over implementing class as one
> would do in case of plain Java. Rather, I figure, for the extended
> plug-in to instantiate the extending class, the extension has to
> provide the package and the name of that extending class (such that
> the EMF mechanisms for instantiating classes can be used properly).
I could see a question mark here, but I guess you're asking for a
confirmation that the constructors of your generated EClasses must be
non-public. somewhere in your Genmodel you can configure them to be
public and then you can make an IExecutableExtension instantiating them
just like normal Java classes.

>
> Another thing is that ECore, as far as I can see, only supports the
> "public" visibility of operations.
Yes.

> If I was modeling with UML, I would also model and document the
> protected and private methods of the classes.
I guess you could.

> In the end, ECore is rather EMOF than UML,
Yes, it is isomorphic to EMOF.

> i.e. its primarily intended to model languages, and not software in
> general, right?
Who knows? It's primarily important that you know what it *can* be used
for, or not, and if that's appropriate for your requirements ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
>
> Regards
>
> Joel
>
>
> Eike Stepper wrote:
>> Hi Joel,
>>
>> I think the question should be: "Would you model and generate your
>> application architecture at all?" If so, you would certainly love to do
>> it with EMF.
>>
>> Cheers
>> /Eike


Re: EMF for application architecture [message #493371 is a reply to message #493288] Sun, 25 October 2009 12:01 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Eike,
thanks for your helpful comments.

Best

Joel

Eike Stepper wrote:
> Hi Joel,
>
> Comments below...
>
>
> Joel Greenyer schrieb:
>> Thanks Eike,
>> actually I really like doing that with EMF, but I was just not sure if
>> there were any reasons not to. I was suggesting some students in a
>> project we're currently working on to model everything with EMF and
>> they were a bit puzzled to use EMF for anything apart from the entity
>> model.
> I have the feeling you mess up a little bit the concepts of modeling and
> generating artifacts from these models. You can use EMF technologies for
> either one or both. In my opinion using Ecore as a modeling language is
> generally a good choice, even if you use it to create your own domain
> specific modeling language. For what you call entity models the EMF
> generator, consisting of JET and some default templates, usually does a
> very good job. In general you're not required to use those. You can
> write your own Jet templates or even use a completely different
> generation technology like Xpand or Acceleo. It's mostly a matter of
> taste and your own specific requirements whether you use the EMF
> generator for your application architecture components, or not.
>
>> One case where I found EMF a bit "different" was the following:
>> I defined an extension point where the extending plug-in had to
>> provide an implementation of an (EMF) base class. At the extension
>> point, however, one cannot simply hand over implementing class as one
>> would do in case of plain Java. Rather, I figure, for the extended
>> plug-in to instantiate the extending class, the extension has to
>> provide the package and the name of that extending class (such that
>> the EMF mechanisms for instantiating classes can be used properly).
> I could see a question mark here, but I guess you're asking for a
> confirmation that the constructors of your generated EClasses must be
> non-public. somewhere in your Genmodel you can configure them to be
> public and then you can make an IExecutableExtension instantiating them
> just like normal Java classes.
>
>> Another thing is that ECore, as far as I can see, only supports the
>> "public" visibility of operations.
> Yes.
>
>> If I was modeling with UML, I would also model and document the
>> protected and private methods of the classes.
> I guess you could.
>
>> In the end, ECore is rather EMOF than UML,
> Yes, it is isomorphic to EMOF.
>
>> i.e. its primarily intended to model languages, and not software in
>> general, right?
> Who knows? It's primarily important that you know what it *can* be used
> for, or not, and if that's appropriate for your requirements ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>>
>> Regards
>>
>> Joel
>>
>>
>> Eike Stepper wrote:
>>> Hi Joel,
>>>
>>> I think the question should be: "Would you model and generate your
>>> application architecture at all?" If so, you would certainly love to do
>>> it with EMF.
>>>
>>> Cheers
>>> /Eike
Re: EMF for application architecture [message #493372 is a reply to message #493288] Sun, 25 October 2009 12:01 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Eike,
thanks for your helpful comments.

Best

Joel

Eike Stepper wrote:
> Hi Joel,
>
> Comments below...
>
>
> Joel Greenyer schrieb:
>> Thanks Eike,
>> actually I really like doing that with EMF, but I was just not sure if
>> there were any reasons not to. I was suggesting some students in a
>> project we're currently working on to model everything with EMF and
>> they were a bit puzzled to use EMF for anything apart from the entity
>> model.
> I have the feeling you mess up a little bit the concepts of modeling and
> generating artifacts from these models. You can use EMF technologies for
> either one or both. In my opinion using Ecore as a modeling language is
> generally a good choice, even if you use it to create your own domain
> specific modeling language. For what you call entity models the EMF
> generator, consisting of JET and some default templates, usually does a
> very good job. In general you're not required to use those. You can
> write your own Jet templates or even use a completely different
> generation technology like Xpand or Acceleo. It's mostly a matter of
> taste and your own specific requirements whether you use the EMF
> generator for your application architecture components, or not.
>
>> One case where I found EMF a bit "different" was the following:
>> I defined an extension point where the extending plug-in had to
>> provide an implementation of an (EMF) base class. At the extension
>> point, however, one cannot simply hand over implementing class as one
>> would do in case of plain Java. Rather, I figure, for the extended
>> plug-in to instantiate the extending class, the extension has to
>> provide the package and the name of that extending class (such that
>> the EMF mechanisms for instantiating classes can be used properly).
> I could see a question mark here, but I guess you're asking for a
> confirmation that the constructors of your generated EClasses must be
> non-public. somewhere in your Genmodel you can configure them to be
> public and then you can make an IExecutableExtension instantiating them
> just like normal Java classes.
>
>> Another thing is that ECore, as far as I can see, only supports the
>> "public" visibility of operations.
> Yes.
>
>> If I was modeling with UML, I would also model and document the
>> protected and private methods of the classes.
> I guess you could.
>
>> In the end, ECore is rather EMOF than UML,
> Yes, it is isomorphic to EMOF.
>
>> i.e. its primarily intended to model languages, and not software in
>> general, right?
> Who knows? It's primarily important that you know what it *can* be used
> for, or not, and if that's appropriate for your requirements ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>>
>> Regards
>>
>> Joel
>>
>>
>> Eike Stepper wrote:
>>> Hi Joel,
>>>
>>> I think the question should be: "Would you model and generate your
>>> application architecture at all?" If so, you would certainly love to do
>>> it with EMF.
>>>
>>> Cheers
>>> /Eike
Re: EMF for application architecture [message #493467 is a reply to message #493283] Mon, 26 October 2009 12:23 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-MD5PcCwKDjCKMpCEegR4
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Joel,

You might want to take a look at what the Xtext project has done for
model-driven development of applications (and application frameworks
such as Xtext) using EMF. Probably you are already familiar with it.
The Xtext team has done an excellent job of applying EMF to the
construction of DSLs, generating sophisticated editors for those DSLs,
and then letting Xtend and Xpand (or your transformation engines of
choice) take over the generation of your application's code.

Your comment about Ecore's affinity with EMOF and its utility in
defining modeling languages is spot on. Xtext is an example that
realizes that purpose particularly well. With your own DSL, there isn't
any facet of an application's structure or behaviour that you can't
model. :-)

Cheers,

Christian



On Sat, 2009-10-24 at 11:23 +0200, Joel Greenyer wrote:

> Thanks Eike,
> actually I really like doing that with EMF, but I was just not sure if there were any reasons not to. I was suggesting
> some students in a project we're currently working on to model everything with EMF and they were a bit puzzled to use
> EMF for anything apart from the entity model.
>
> One case where I found EMF a bit "different" was the following:
> I defined an extension point where the extending plug-in had to provide an implementation of an (EMF) base class. At the
> extension point, however, one cannot simply hand over implementing class as one would do in case of plain Java. Rather,
> I figure, for the extended plug-in to instantiate the extending class, the extension has to provide the package and the
> name of that extending class (such that the EMF mechanisms for instantiating classes can be used properly).
>
> Another thing is that ECore, as far as I can see, only supports the "public" visibility of operations. If I was modeling
> with UML, I would also model and document the protected and private methods of the classes.
> In the end, ECore is rather EMOF than UML, i.e. its primarily intended to model languages, and not software in general,
> right?
>
>
> Regards
>
> Joel
>
>
> Eike Stepper wrote:
> > Hi Joel,
> >
> > I think the question should be: "Would you model and generate your
> > application architecture at all?" If so, you would certainly love to do
> > it with EMF.
> >
> > Cheers
> > /Eike

--=-MD5PcCwKDjCKMpCEegR4
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Joel,<BR>
<BR>
You might want to take a look at what the Xtext project has done for model-driven development of applications (and application frameworks such as Xtext) using EMF.&nbsp; Probably you are already familiar with it.&nbsp; The Xtext team has done an excellent job of applying EMF to the construction of DSLs, generating sophisticated editors for those DSLs, and then letting Xtend and Xpand (or your transformation engines of choice) take over the generation of your application's code.<BR>
<BR>
Your comment about Ecore's affinity with EMOF and its utility in defining modeling languages is spot on.&nbsp; Xtext is an example that realizes that purpose particularly well.&nbsp; With your own DSL, there isn't any facet of an application's structure or behaviour that you can't model.&nbsp; :-)<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
<BR>
On Sat, 2009-10-24 at 11:23 +0200, Joel Greenyer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Thanks Eike,
actually I really like doing that with EMF, but I was just not sure if there were any reasons not to. I was suggesting
some students in a project we're currently working on to model everything with EMF and they were a bit puzzled to use
EMF for anything apart from the entity model.

One case where I found EMF a bit &quot;different&quot; was the following:
I defined an extension point where the extending plug-in had to provide an implementation of an (EMF) base class. At the
extension point, however, one cannot simply hand over implementing class as one would do in case of plain Java. Rather,
I figure, for the extended plug-in to instantiate the extending class, the extension has to provide the package and the
name of that extending class (such that the EMF mechanisms for instantiating classes can be used properly).

Another thing is that ECore, as far as I can see, only supports the &quot;public&quot; visibility of operations. If I was modeling
with UML, I would also model and document the protected and private methods of the classes.
In the end, ECore is rather EMOF than UML, i.e. its primarily intended to model languages, and not software in general,
right?


Regards

Joel


Eike Stepper wrote:
&gt; Hi Joel,
&gt;
&gt; I think the question should be: &quot;Would you model and generate your
&gt; application architecture at all?&quot; If so, you would certainly love to do
&gt; it with EMF.
&gt;
&gt; Cheers
&gt; /Eike
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-MD5PcCwKDjCKMpCEegR4--
Previous Topic:testing in EMF - JUnit, Mock objects?
Next Topic:EMF 2.4.1 with JRE 6.0_04
Goto Forum:
  


Current Time: Sat Apr 27 02:33:50 GMT 2024

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

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

Back to the top