Home » Modeling » EMF » EMF and REST (JAX-RS)
| |
Re: EMF and REST (JAX-RS) [message #1021600 is a reply to message #1021570] |
Wed, 20 March 2013 11:20 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Nigel,
The Texo project maybe of interest for this. Although currently it does not do JAX-RS it provides rest access to your
model out-of-the-box.
http://martintaal.wordpress.com/2012/04/05/emf-texo-json-rest-web-service-support-connecting-your-client-to-an-emf-supporting-web-server/
Here is a video showing how easy it is to generate code and then access the data through a web url:
http://www.youtube.com/watch?v=D0oO4gw-gLI
Let me know if/how jax-rs can add value to this, I am always interested to adapt/extend Texo...
gr. Martin
On 03/20/2013 11:22 AM, Ed Merks wrote:
> Nigel,
>
> Comments below.
>
> On 20/03/2013 11:15 AM, Nigel Daniels wrote:
>> Hi,
>>
>> I've found lot's of reference to eclipse being RESTful
> I don't know about Eclipse as a whole...
>> and indeed the use of URI's in Ecore and the state (mostly) living in the model goes a long way towards that.
> Yes, EMF's resource framework is design around the principles of REST.
>>
>> However I can't generate a JAX-RS interface to my model out of the box.
> Being RESTful isn't the same as generating some specific interfaces. The Web itself is design around the principle of
> REST, but that has nothing directly to do with JAX-RS.
>> Has any one attempted this or does any one have any advice on writing such a layer on top of an EMF model?
> Sorry, I don't know anything of JAX-RS. I'm not sure it makes sense to try to make the modeled objects themselves be
> the services though...
>>
>> Thanks for any help,
>>
>> Nigel
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: EMF and REST (JAX-RS) [message #1021745 is a reply to message #1021570] |
Wed, 20 March 2013 15:57 |
Nigel Daniels Messages: 66 Registered: July 2009 |
Member |
|
|
Hi Ed,
thanks for getting back to me, I've added some comments inline.
Nigel
On 20/03/2013 10:22, Ed Merks wrote:> Nigel,
>
> Comments below.
>
> On 20/03/2013 11:15 AM, Nigel Daniels wrote:
>> Hi,
>>
>> I've found lot's of reference to eclipse being RESTful
> I don't know about Eclipse as a whole...
Ooops, I should have typed EMF
>> and indeed the use of URI's in Ecore and the state (mostly) living in
>> the model goes a long way towards that.
> Yes, EMF's resource framework is design around the principles of REST.
>>
>> However I can't generate a JAX-RS interface to my model out of the box.
> Being RESTful isn't the same as generating some specific interfaces. The
> Web itself is design around the principle of REST, but that has nothing
> directly to do with JAX-RS.
Agreed the interface != principle, however it would just seem to be a
natural fit/evolution, especially as, more often than not, people
request application as services. I like to use EMF as it lets me step
from the conceptual domain to the code. I used it in conjunction with
GMF a great deal, but the desktop application is not what people are
asking for anymore.
>> Has any one attempted this or does any one have any advice on writing
>> such a layer on top of an EMF model?
> Sorry, I don't know anything of JAX-RS. I'm not sure it makes sense to
> try to make the modeled objects themselves be the services though...
I'm relatively new to much of this myself (JAX-RS, JSON, Dojo, etc) but
I have found out that the JAX-RS interface is particularly suited to
CRUD interfaces, hence I though wrapping the underlying model may be a
good fit. If any one with JAX-RS knowledge can advise if I've got the
wrong end of the stick here I'd appreciate it.
My next step is to experiment with a Dojo/JGraph front end to see if
that will get me GMF like results in a web environment.
Again if there are better/simpler approaches I'd welcome the advice.
>>
>> Thanks for any help,
>>
>> Nigel
>
|
|
|
Re: EMF and REST (JAX-RS) [message #1021748 is a reply to message #1021745] |
Wed, 20 March 2013 16:01 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Nigel,
Comments below.
On 20/03/2013 4:57 PM, Nigel Daniels wrote:
> Hi Ed,
>
> thanks for getting back to me, I've added some comments inline.
>
> Nigel
>
> On 20/03/2013 10:22, Ed Merks wrote:> Nigel,
> >
> > Comments below.
> >
> > On 20/03/2013 11:15 AM, Nigel Daniels wrote:
> >> Hi,
> >>
> >> I've found lot's of reference to eclipse being RESTful
> > I don't know about Eclipse as a whole...
> Ooops, I should have typed EMF
I see.
> >> and indeed the use of URI's in Ecore and the state (mostly) living in
> >> the model goes a long way towards that.
> > Yes, EMF's resource framework is design around the principles of REST.
> >>
> >> However I can't generate a JAX-RS interface to my model out of the
> box.
> > Being RESTful isn't the same as generating some specific interfaces.
> The
> > Web itself is design around the principle of REST, but that has nothing
> > directly to do with JAX-RS.
> Agreed the interface != principle, however it would just seem to be a
> natural fit/evolution, especially as, more often than not, people
> request application as services. I like to use EMF as it lets me step
> from the conceptual domain to the code. I used it in conjunction with
> GMF a great deal, but the desktop application is not what people are
> asking for anymore.
It depends on the people. :-P
> >> Has any one attempted this or does any one have any advice on writing
> >> such a layer on top of an EMF model?
> > Sorry, I don't know anything of JAX-RS. I'm not sure it makes
> sense to
> > try to make the modeled objects themselves be the services though...
> I'm relatively new to much of this myself (JAX-RS, JSON, Dojo, etc)
> but I have found out that the JAX-RS interface is particularly suited
> to CRUD interfaces, hence I though wrapping the underlying model may
> be a good fit. If any one with JAX-RS knowledge can advise if I've got
> the wrong end of the stick here I'd appreciate it.
It's really the resources that are driven by REST, e.g., this MongoDB
integration
http://bryanhunt.wordpress.com/2011/03/15/mongo-emf/
>
> My next step is to experiment with a Dojo/JGraph front end to see if
> that will get me GMF like results in a web environment.
>
> Again if there are better/simpler approaches I'd welcome the advice.
> >>
> >> Thanks for any help,
> >>
> >> Nigel
> >
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: EMF and REST (JAX-RS) [message #1021753 is a reply to message #1021600] |
Wed, 20 March 2013 16:07 |
Nigel Daniels Messages: 66 Registered: July 2009 |
Member |
|
|
Hi Martin,
I've just installed Texo to take a look and loaded up the examples. One
problem I have is with JS library called Jasmine, jasmin-html.js.
The error I get is:
Description Resource Path Location Type
Unable to retrieve the error message for problem id: 903. Check
compiler resources. jasmine-html.js
/org.eclipse.emf.texo.web.example/WebContent/mobile/sdk/command/vendor/nodejs/node_modules/jasmine-node/node_modules/jasmine-reporters/ext
line 0 JavaScript Problem
Any suggestions? This is not an area I know much about.
Best regards,
Nigel
On 20/03/2013 11:20, Martin Taal wrote:
> Hi Nigel,
> The Texo project maybe of interest for this. Although currently it does
> not do JAX-RS it provides rest access to your model out-of-the-box.
> http://martintaal.wordpress.com/2012/04/05/emf-texo-json-rest-web-service-support-connecting-your-client-to-an-emf-supporting-web-server/
>
>
> Here is a video showing how easy it is to generate code and then access
> the data through a web url:
> http://www.youtube.com/watch?v=D0oO4gw-gLI
>
> Let me know if/how jax-rs can add value to this, I am always interested
> to adapt/extend Texo...
>
> gr. Martin
>
> On 03/20/2013 11:22 AM, Ed Merks wrote:
>> Nigel,
>>
>> Comments below.
>>
>> On 20/03/2013 11:15 AM, Nigel Daniels wrote:
>>> Hi,
>>>
>>> I've found lot's of reference to eclipse being RESTful
>> I don't know about Eclipse as a whole...
>>> and indeed the use of URI's in Ecore and the state (mostly) living in
>>> the model goes a long way towards that.
>> Yes, EMF's resource framework is design around the principles of REST.
>>>
>>> However I can't generate a JAX-RS interface to my model out of the box.
>> Being RESTful isn't the same as generating some specific interfaces.
>> The Web itself is design around the principle of
>> REST, but that has nothing directly to do with JAX-RS.
>>> Has any one attempted this or does any one have any advice on writing
>>> such a layer on top of an EMF model?
>> Sorry, I don't know anything of JAX-RS. I'm not sure it makes sense
>> to try to make the modeled objects themselves be
>> the services though...
>>>
>>> Thanks for any help,
>>>
>>> Nigel
>>
>
>
|
|
|
Re: EMF and REST (JAX-RS) [message #1021762 is a reply to message #1021753] |
Wed, 20 March 2013 16:24 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Nigel,
Be sure to watch the video it shows how to setup a web project, start tomcat/jetty, generate testdata and access the
data through browser url's.
These type of compile errors (in js files) are not related to Texo or java. Normally you can ignore them (unless it is
your own js file), I disable javascript checking as it often does not work correctly on javascript files which are
minified/compressed.
gr. Martin
On 03/20/2013 05:07 PM, Nigel Daniels wrote:
> Hi Martin,
>
> I've just installed Texo to take a look and loaded up the examples. One problem I have is with JS library called
> Jasmine, jasmin-html.js.
>
> The error I get is:
>
> Description Resource Path Location Type
> Unable to retrieve the error message for problem id: 903. Check compiler resources. jasmine-html.js
> /org.eclipse.emf.texo.web.example/WebContent/mobile/sdk/command/vendor/nodejs/node_modules/jasmine-node/node_modules/jasmine-reporters/ext
> line 0 JavaScript Problem
>
> Any suggestions? This is not an area I know much about.
>
> Best regards,
>
> Nigel
>
>
> On 20/03/2013 11:20, Martin Taal wrote:
>> Hi Nigel,
>> The Texo project maybe of interest for this. Although currently it does
>> not do JAX-RS it provides rest access to your model out-of-the-box.
>> http://martintaal.wordpress.com/2012/04/05/emf-texo-json-rest-web-service-support-connecting-your-client-to-an-emf-supporting-web-server/
>>
>>
>>
>> Here is a video showing how easy it is to generate code and then access
>> the data through a web url:
>> http://www.youtube.com/watch?v=D0oO4gw-gLI
>>
>> Let me know if/how jax-rs can add value to this, I am always interested
>> to adapt/extend Texo...
>>
>> gr. Martin
>>
>> On 03/20/2013 11:22 AM, Ed Merks wrote:
>>> Nigel,
>>>
>>> Comments below.
>>>
>>> On 20/03/2013 11:15 AM, Nigel Daniels wrote:
>>>> Hi,
>>>>
>>>> I've found lot's of reference to eclipse being RESTful
>>> I don't know about Eclipse as a whole...
>>>> and indeed the use of URI's in Ecore and the state (mostly) living in
>>>> the model goes a long way towards that.
>>> Yes, EMF's resource framework is design around the principles of REST.
>>>>
>>>> However I can't generate a JAX-RS interface to my model out of the box.
>>> Being RESTful isn't the same as generating some specific interfaces.
>>> The Web itself is design around the principle of
>>> REST, but that has nothing directly to do with JAX-RS.
>>>> Has any one attempted this or does any one have any advice on writing
>>>> such a layer on top of an EMF model?
>>> Sorry, I don't know anything of JAX-RS. I'm not sure it makes sense
>>> to try to make the modeled objects themselves be
>>> the services though...
>>>>
>>>> Thanks for any help,
>>>>
>>>> Nigel
>>>
>>
>>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: EMF and REST (JAX-RS) [message #1021765 is a reply to message #1021748] |
Wed, 20 March 2013 16:28 |
Nigel Daniels Messages: 66 Registered: July 2009 |
Member |
|
|
On 20/03/2013 16:01, Ed Merks wrote:
> Nigel,
>
> Comments below.
>
> On 20/03/2013 4:57 PM, Nigel Daniels wrote:
>> Hi Ed,
>>
>> thanks for getting back to me, I've added some comments inline.
>>
>> Nigel
>>
>> On 20/03/2013 10:22, Ed Merks wrote:> Nigel,
>> >
>> > Comments below.
>> >
>> > On 20/03/2013 11:15 AM, Nigel Daniels wrote:
>> >> Hi,
>> >>
>> >> I've found lot's of reference to eclipse being RESTful
>> > I don't know about Eclipse as a whole...
>> Ooops, I should have typed EMF
> I see.
>> >> and indeed the use of URI's in Ecore and the state (mostly) living in
>> >> the model goes a long way towards that.
>> > Yes, EMF's resource framework is design around the principles of REST.
>> >>
>> >> However I can't generate a JAX-RS interface to my model out of the
>> box.
>> > Being RESTful isn't the same as generating some specific interfaces.
>> The
>> > Web itself is design around the principle of REST, but that has nothing
>> > directly to do with JAX-RS.
>> Agreed the interface != principle, however it would just seem to be a
>> natural fit/evolution, especially as, more often than not, people
>> request application as services. I like to use EMF as it lets me step
>> from the conceptual domain to the code. I used it in conjunction with
>> GMF a great deal, but the desktop application is not what people are
>> asking for anymore.
> It depends on the people. :-P
Well the people I'm dealing with, hence the interest in seeing if there
is a way of gearing EMF to fit with web based delivery. The EMF model is
not broken, if you'll pardon the phrase ;-) But I'm being asked to
deliver web facing products with the power of desktop products. From a
cost, reach, maintenance and management standpoint it makes a whole lot
of sense to provide a 'cloud' based service over a desktop delivery in
the application space.
>> >> Has any one attempted this or does any one have any advice on writing
>> >> such a layer on top of an EMF model?
>> > Sorry, I don't know anything of JAX-RS. I'm not sure it makes
>> sense to
>> > try to make the modeled objects themselves be the services though...
>> I'm relatively new to much of this myself (JAX-RS, JSON, Dojo, etc)
>> but I have found out that the JAX-RS interface is particularly suited
>> to CRUD interfaces, hence I though wrapping the underlying model may
>> be a good fit. If any one with JAX-RS knowledge can advise if I've got
>> the wrong end of the stick here I'd appreciate it.
> It's really the resources that are driven by REST, e.g., this MongoDB
> integration
>
> http://bryanhunt.wordpress.com/2011/03/15/mongo-emf/
>
Thanks for this, very interesting and looks like it will really help
with persistence. If I can use Mongo as a plugin replacement for XMI
that's a great result and in an MVC structure I can use these resources
directly in a control layer but this still leaves me looking for an way
to expose what's happening to a viewer.
>
>>
>> My next step is to experiment with a Dojo/JGraph front end to see if
>> that will get me GMF like results in a web environment.
>>
>> Again if there are better/simpler approaches I'd welcome the advice.
>> >>
>> >> Thanks for any help,
>> >>
>> >> Nigel
>> >
>>
>>
>>
>
|
|
| |
Goto Forum:
Current Time: Wed Sep 25 14:46:33 GMT 2024
Powered by FUDForum. Page generated in 0.12747 seconds
|