Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » About using EMF on backend and a web-UI frontend
About using EMF on backend and a web-UI frontend [message #754651] Thu, 03 November 2011 18:20 Go to next message
Amit  is currently offline Amit Friend
Messages: 3
Registered: July 2009
Junior Member
Hi,

I searched the EMF newsgroup, but did not find any discussions which would give me a clear direction for a path to solution for the following requirement.

We currently have a few EMF models which represent some syntax (one model per syntax-diagram). We use these in an Eclipse-based product to store syntax options specified by the user (in SWT/JFace based UI, separate UI for each syntax-diagram). The model instance is then passed on to a 'syntax-builder' object which creates a string output. The generated string can be then passed on to 'syntax-runner' which executes the syntax appropriately.

We want to make the UI available in a web-browser, but keep other artifacts like the EMF model, syntax-builder, syntax-runner etc. on the web-server so that they can be reused. Is there a way to make a light-weight model instance available on the client-side and send model updates back to the server to modify the EMF model instance accordingly? May be using JSON for this communication? We have following advantages in our current Eclipse-based implementation. But things will be much more complex in web-world:
1. The EMF model instance is made available to the UI constructors. So UI event-handlers can immediately access the model-object to be modified even if it is deep in model hierarchy e.g. rootElement.getRefA().getRefB().setAttributeX(<value>)
2. The model can be modified on each user action (e.g. selection of a combo-box entry, check-button / radio-button selection etc.)

In web implementation, a. we will need to tell the server-side how to traverse the model instance starting at the root object to reach the object which has the attribute to be changed b. we need to accumulate model changes on client-side first and then send all changes together in one shot to the server-side in order to avoid network communication overhead/delay for each and every model update.

Please let me know if this kind of architecture can be reasonably implemented using current technologies.

Thanks & Regards,
Amit
Re: About using EMF on backend and a web-UI frontend [message #754735 is a reply to message #754651] Fri, 04 November 2011 06:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Amit,

Comments below.

On 03/11/2011 7:20 PM, Amit wrote:
> Hi,
>
> I searched the EMF newsgroup, but did not find any discussions which
> would give me a clear direction for a path to solution for the
> following requirement.
>
> We currently have a few EMF models which represent some syntax (one
> model per syntax-diagram). We use these in an Eclipse-based product to
> store syntax options specified by the user (in SWT/JFace based UI,
> separate UI for each syntax-diagram). The model instance is then
> passed on to a 'syntax-builder' object which creates a string output.
> The generated string can be then passed on to 'syntax-runner' which
> executes the syntax appropriately.
>
> We want to make the UI available in a web-browser, but keep other
> artifacts like the EMF model, syntax-builder, syntax-runner etc. on
> the web-server so that they can be reused. Is there a way to make a
> light-weight model instance available on the client-side and send
> model updates back to the server to modify the EMF model instance
> accordingly?
What's on the client side? Just a Javascript engine?
> May be using JSON for this communication? We have following advantages
> in our current Eclipse-based implementation. But things will be much
> more complex in web-world:
> 1. The EMF model instance is made available to the UI constructors. So
> UI event-handlers can immediately access the model-object to be
> modified even if it is deep in model hierarchy e.g.
> rootElement.getRefA().getRefB().setAttributeX(<value>)
> 2. The model can be modified on each user action (e.g. selection of a
> combo-box entry, check-button / radio-button selection etc.)
Our GWT support might be interesting. Or you might want to have a look
at RAP and our support for it.
>
> In web implementation, a. we will need to tell the server-side how to
> traverse the model instance starting at the root object to reach the
> object which has the attribute to be changed b. we need to accumulate
> model changes on client-side first and then send all changes together
> in one shot to the server-side in order to avoid network communication
> overhead/delay for each and every model update.
We do have a ChangeRecorder that can as of the last release produce
forward deltas that can be transmitted and applied.
>
> Please let me know if this kind of architecture can be reasonably
> implemented using current technologies.
I know the Cloudsmith folks are doing this type of thing with GWT and
EMF's support for GWT...
>
> Thanks & Regards,
> Amit
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to tag a EClass as serializable.
Next Topic:[EMF Compare] Comparing intra-resource roots
Goto Forum:
  


Current Time: Thu Apr 25 02:03:14 GMT 2024

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

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

Back to the top