Home » Modeling » EMF » [Teneo] Is it ready for GWT?
| | | |
Re: (no subject) [message #718931 is a reply to message #718915] |
Thu, 25 August 2011 15:58 |
Giovanni Colasurdo Messages: 3 Registered: August 2011 |
Junior Member |
|
|
Tom / Martin / Ed, thanks for your quick answers.
The GWT choice has been made because of 2 factors:
1. is an advice I was given by people here in Italy is constantly monitoring the world Eclipse, and that should be very familiar
2. was one of the requirements set by my company, especially in terms of the potential of the widgets in the construction of interfaces
Between the two proposals the best solution seems to be to take Texo, because in the section on future implementations of the wikipage is intended to fully support GWT, I ask: but in this case could I have troubles?
I also did not understand what the role of Teneo in Texo is; I apologize in advance if I ask a stupid question, I have chosen initially Teneo because it supports Hibernate: does Texo works only with EclipseLink?
Finally, not to insist, but to provide greater clarity to my earlier questions, I tried to understand the reason for this apparent incompatibility between GWT and Teneo and, if I carefully followed all the code in debug, the problem lies solely in the proper treatment of teneo required annotations in the ecore model: the first record "modelElement" is properly evaluated, the second containing "transient" fails and here follows a stack section:
...
...
Caused by: java.lang.UnsupportedOperationException
at org.eclipse.emf.common.util.Reflect.isInstance(Reflect.java:70)
at org.eclipse.emf.ecore.impl.EClassifierImpl.isInstance(EClassifierImpl.java:222)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:122)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:73)
at org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbDataStore.java:1025)
at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel(HbSessionDataStore.java:192)
at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(HbSessionDataStore.java:98)
...
...
This only happens because the EMF porting on GWT hasn't the Teneo part, or for some other reason?
Thanks again.
|
|
|
Re: (no subject) [message #718948 is a reply to message #718931] |
Thu, 25 August 2011 16:11 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi,
Teneo and Texo are not related and do not share any code. Teneo adds logic to hibernate/eclipselink to make EMF
generated work with these ORM's.
Texo (server side) generates standard pojos (which work out of the box with any ORM, without runtime layer changes) and
a standard compliant orm.xml which should work with any JPA2 compliant ORM provider. The testcases are run against
EclipseLink but for a customer project I use the same generated orm.xml on hibernate and it works fine, other users also
use Texo on Hibernate, I know of one user who is using Texo in combination with Hibernate/Vaadin.
I am currently working on xml (de-)serialization with integration with the underlying ORM/JPA provider. See this page
which provides some info:
http://wiki.eclipse.org/Texo/ObjectStore
The next step is to make the xml serialization available as a set of CRUD web services. The main things have been done
(need to write testcases...).
And then I will use the same framework to implement json serialization which helps for web frameworks as extjs and
smartclient. The json (de-)serialization will use the same crud framework which I have done for xml. But this will be a
few months from now.
gr. Martin
On 08/25/2011 05:58 PM, Giovanni Colasurdo wrote:
> Tom / Martin / Ed, thanks for your quick answers.
>
> The GWT choice has been made because of 2 factors:
> 1. is an advice I was given by people here in Italy is constantly monitoring the world Eclipse, and that should be very
> familiar
> 2. was one of the requirements set by my company, especially in terms of the potential of the widgets in the
> construction of interfaces
>
> Between the two proposals the best solution seems to be to take Texo, because in the section on future implementations
> of the wikipage is intended to fully support GWT, I ask: but in this case could I have troubles?
> I also did not understand what the role of Teneo in Texo is; I apologize in advance if I ask a stupid question, I have
> chosen initially Teneo because it supports Hibernate: does Texo works only with EclipseLink?
> Finally, not to insist, but to provide greater clarity to my earlier questions, I tried to understand the reason for
> this apparent incompatibility between GWT and Teneo and, if I carefully followed all the code in debug, the problem lies
> solely in the proper treatment of teneo required annotations in the ecore model: the first record "modelElement" is
> properly evaluated, the second containing "transient" fails and here follows a stack section:
>
>
> ...
> ...
> Caused by: java.lang.UnsupportedOperationException
> at org.eclipse.emf.common.util.Reflect.isInstance(Reflect.java:70)
> at org.eclipse.emf.ecore.impl.EClassifierImpl.isInstance(EClassifierImpl.java:222)
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:122)
>
> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:73)
> at org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbDataStore.java:1025)
> at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel(HbSessionDataStore.java:192)
> at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(HbSessionDataStore.java:98)
> ...
> ...
>
>
> This only happens because the EMF porting on GWT hasn't the Teneo part, or for some other reason?
>
> Thanks again.
--
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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| |
Re: (no subject) [message #718957 is a reply to message #718931] |
Thu, 25 August 2011 16:32 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Giovanni,
Comments below.
On 25/08/2011 8:58 AM, Giovanni Colasurdo wrote:
> Tom / Martin / Ed, thanks for your quick answers.
>
> The GWT choice has been made because of 2 factors:
> 1. is an advice I was given by people here in Italy is constantly
> monitoring the world Eclipse, and that should be very familiar
> 2. was one of the requirements set by my company, especially in terms
> of the potential of the widgets in the construction of interfaces
>
> Between the two proposals the best solution seems to be to take Texo,
> because in the section on future implementations of the wikipage is
> intended to fully support GWT, I ask: but in this case could I have
> troubles?
> I also did not understand what the role of Teneo in Texo is; I
> apologize in advance if I ask a stupid question, I have chosen
> initially Teneo because it supports Hibernate: does Texo works only
> with EclipseLink?
> Finally, not to insist, but to provide greater clarity to my earlier
> questions, I tried to understand the reason for this apparent
> incompatibility between GWT and Teneo and, if I carefully followed all
> the code in debug, the problem lies solely in the proper treatment of
> teneo required annotations in the ecore model: the first record
> "modelElement" is properly evaluated, the second containing
> "transient" fails and here follows a stack section:
>
>
> ..
> ..
> Caused by: java.lang.UnsupportedOperationException
> at org.eclipse.emf.common.util.Reflect.isInstance(Reflect.java:70)
> at
> org.eclipse.emf.ecore.impl.EClassifierImpl.isInstance(EClassifierImpl.java:222)
Models need to be generated to support GWT. One of the things this does
is produce reflection helpers that would make this work properly.
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:122)
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:73)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbDataStore.java:1025)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel(HbSessionDataStore.java:192)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(HbSessionDataStore.java:98)
> ..
> ..
>
>
> This only happens because the EMF porting on GWT hasn't the Teneo
> part, or for some other reason?
Yes.
I think the only appropriate way to make this stuff work is to use a
standard EMF runtime on the server with Teneo and all that good stuff
and have the GWT runtime on the client. But that's not how the
out-of-the-box stuff is set up so you'll need to do quite a bit of work
to figure out how to make that work. Sorry... :-(
>
> Thanks again.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: (no subject) [message #718972 is a reply to message #718950] |
Thu, 25 August 2011 16:44 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
This is all server side code where CRUD/REST requests are received and responses consists of json. References in the
json will for example be something like this:
order.businessPartner: '5'
order.businessPartner_title: 'My great business partner'
order.businessPartner_uri: 'http://asda#BusinessPartner||5'
it makes sense to also pass back the title/identifier of a reference so that it can be displayed in a grid without
loading the reference.
This will work fine with Smartclient which I know very well. The reference can also be resolved against a client side
datasource which will take care of loading references. But my experience with a complete webified ERP system is that
when you also return the identifier/title of a reference to the client that it is most of the time not necessary to
actually load the reference.
I have not studied the extjs approach in detail yet, but afaik they have a proxy concept for the client side code.
gr. Martin
On 08/25/2011 06:13 PM, Tom Schindl wrote:
> Am 25.08.11 18:11, schrieb Martin Taal:
>> Hi,
>> Teneo and Texo are not related and do not share any code. Teneo adds
>> logic to hibernate/eclipselink to make EMF generated work with these ORM's.
>>
>> Texo (server side) generates standard pojos (which work out of the box
>> with any ORM, without runtime layer changes) and a standard compliant
>> orm.xml which should work with any JPA2 compliant ORM provider. The
>> testcases are run against EclipseLink but for a customer project I use
>> the same generated orm.xml on hibernate and it works fine, other users
>> also use Texo on Hibernate, I know of one user who is using Texo in
>> combination with Hibernate/Vaadin.
>>
>> I am currently working on xml (de-)serialization with integration with
>> the underlying ORM/JPA provider. See this page which provides some info:
>> http://wiki.eclipse.org/Texo/ObjectStore
>>
>> The next step is to make the xml serialization available as a set of
>> CRUD web services. The main things have been done (need to write
>> testcases...).
>>
>> And then I will use the same framework to implement json serialization
>> which helps for web frameworks as extjs and smartclient. The json
>> (de-)serialization will use the same crud framework which I have done
>> for xml. But this will be a few months from now.
>>
>
> How do you handle lazy-loading?
>
> Tom
--
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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Goto Forum:
Current Time: Fri Apr 19 20:14:48 GMT 2024
Powered by FUDForum. Page generated in 0.03019 seconds
|