Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: [EMF] Writing an application that writes code
Re: [EMF] Writing an application that writes code [message #415731] Fri, 04 January 2008 12:21 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Mark,

It's best to ask about EMF on the EMF newsgroup, which I've added to the
to list of the reply.


Mark Hoffmann wrote:
> Hello,
>
> I am a newcomer in the EMF topic. So first I want to explain what I
> currently do.
>
> I build a data-centric application using JEE5 server Geronimo and
> Eclipse as client. On the server I have to deploy stateless beans, JPA
> entities. On the client side I need my POJO with
> property-change-support for databinding.
EMF 2.4 has direct support for data binding of EMF objects via two new
plugins, org.eclipse.emf.databinding and
org.eclipse.emf.databinding.edit. The former operates directly on the
objects while the later uses and editing domain to execute commands to
effect changes and hence supports undo and redo. (I know some folks
have backported these plugins to work with EMF 2.3 and hence Eclipse 3.3.)
>
> I have to import the entites from the server to the client.
You'll want to keep your objects in resources and then you can serialize
it as XML and transport that between the client and the server.
> On the client I use a wrapper object for the entity the contains the
> property-change-support. I don't like that way, so I thought about an
> interface that is available on client and server because I don't want
> to bring the entity to the client and the property-change-support to
> the server. If I use the interface I need a wrapper on the server and
> on the client. To write this stuff is always the same and makes a lot
> of work. So I want to write an application that generates the code for
> the property-beans, the entities and the stateless beans, based on my
> interface.
EMF already supports notification so there shouldn't be a real need for
bean support, especially if the only goal is to integrate with data
binding. The Teneo project in EMFT support integration with Hibernate
and supports external JPA binding, so I suspect you can accomplish your
goal of persisting your objects to a database using Teneo. The
EclipseLink project is also working towards JPA support for EMF
instances some of the same folks are also committers on the Teneo project.
>
> EMF is so large I don't know if it's even possible to do such things,
> but I think so.
It's even possible to specialize the templates to generate additional
funky thing within the existing templates or to define new templates to
generate even more artifacts.
> Second I don't know where to start. I already tried the book-store
> tutorial, but it doesn't do what I want to do.
I'd need to understand if there is really a need to generate specialized
code or if the new data binding support for EMF objects in 2.4 is
sufficient. I also suspect that Teneo directly addresses your
JPA-needs. So it's maybe just a matter of reading about how to use
Teneo; it's quite easy to set up and Martin is very fast at answering
questions on the EMFT newsgroup about it.
> Can you help me giving an entry to EMF regarding this topic.
>
> Thanks,
> Mark


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF] Writing an application that writes code [message #415732 is a reply to message #415731] Fri, 04 January 2008 14:09 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Ed Merks wrote:
> Mark,
>
> It's best to ask about EMF on the EMF newsgroup, which I've added to the
> to list of the reply.
>
>
> Mark Hoffmann wrote:
>> Hello,
>>
>> I am a newcomer in the EMF topic. So first I want to explain what I
>> currently do.
>>
>> I build a data-centric application using JEE5 server Geronimo and
>> Eclipse as client. On the server I have to deploy stateless beans, JPA
>> entities. On the client side I need my POJO with
>> property-change-support for databinding.
> EMF 2.4 has direct support for data binding of EMF objects via two new
> plugins, org.eclipse.emf.databinding and
> org.eclipse.emf.databinding.edit. The former operates directly on the
> objects while the later uses and editing domain to execute commands to
> effect changes and hence supports undo and redo. (I know some folks
> have backported these plugins to work with EMF 2.3 and hence Eclipse 3.3.)

Here's the bug report that included a patch for the EMF.edit databinding
to work on Eclipse 3.3/EMF 2.3:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=75625

Hope this helps,
Eric
Re: [EMF] Writing an application that writes code [message #415733 is a reply to message #415731] Fri, 04 January 2008 14:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ed Merks schrieb:
> Mark,
>
> It's best to ask about EMF on the EMF newsgroup, which I've added to the
> to list of the reply.
>
>
> Mark Hoffmann wrote:
>> Hello,
>>
>> I am a newcomer in the EMF topic. So first I want to explain what I
>> currently do.
>>
>> I build a data-centric application using JEE5 server Geronimo and
>> Eclipse as client. On the server I have to deploy stateless beans, JPA
>> entities. On the client side I need my POJO with
>> property-change-support for databinding.
> EMF 2.4 has direct support for data binding of EMF objects via two new
> plugins, org.eclipse.emf.databinding and
> org.eclipse.emf.databinding.edit. The former operates directly on the
> objects while the later uses and editing domain to execute commands to
> effect changes and hence supports undo and redo. (I know some folks
> have backported these plugins to work with EMF 2.3 and hence Eclipse 3.3.)
>>

I'm using the org.eclipse.emf.databinding in my EMF-GWT-port which is
forked of from EMF-2.2. I haven't looked at the
org.eclipse.emf.databinding.edit because of other GWT-limitations I have
to overcome but that should not be a problem at all.

The only thing I had to do was to remove generics but if you are
targeting 2.3 I think no extra work is needed at all.

The patch I'm using currently is:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=211340

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: [EMF] Writing an application that writes code [message #415734 is a reply to message #415733] Fri, 04 January 2008 14:34 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
One more note if you don't want to depend on cvs code you can easily
translate the EMF-Notification in PropertyChange events and use the
BeanObservables part of 3.3.

I have started an article about this but recently had not time to finish
it. I think the secenrio represented there is comparable to yours
because beside showing how to use EMF-Objects for Databinding it also
shows other RCP related things like extension-points, ... .

http://wiki.eclipse.org/Wire_EMF_Databinding_RCP

Tom

Tom Schindl schrieb:
> Ed Merks schrieb:
>> Mark,
>>
>> It's best to ask about EMF on the EMF newsgroup, which I've added to
>> the to list of the reply.
>>
>>
>> Mark Hoffmann wrote:
>>> Hello,
>>>
>>> I am a newcomer in the EMF topic. So first I want to explain what I
>>> currently do.
>>>
>>> I build a data-centric application using JEE5 server Geronimo and
>>> Eclipse as client. On the server I have to deploy stateless beans,
>>> JPA entities. On the client side I need my POJO with
>>> property-change-support for databinding.
>> EMF 2.4 has direct support for data binding of EMF objects via two new
>> plugins, org.eclipse.emf.databinding and
>> org.eclipse.emf.databinding.edit. The former operates directly on the
>> objects while the later uses and editing domain to execute commands to
>> effect changes and hence supports undo and redo. (I know some folks
>> have backported these plugins to work with EMF 2.3 and hence Eclipse
>> 3.3.)
>>>
>
> I'm using the org.eclipse.emf.databinding in my EMF-GWT-port which is
> forked of from EMF-2.2. I haven't looked at the
> org.eclipse.emf.databinding.edit because of other GWT-limitations I have
> to overcome but that should not be a problem at all.
>
> The only thing I had to do was to remove generics but if you are
> targeting 2.3 I think no extra work is needed at all.
>
> The patch I'm using currently is:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=211340
>
> Tom
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Using EMF plugins on HP-Itanium
Next Topic:[Announce] XMF
Goto Forum:
  


Current Time: Thu Apr 25 16:05:08 GMT 2024

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

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

Back to the top