JPA for GWT

174 views
Skip to first unread message

Ltearno

unread,
Nov 27, 2013, 10:56:05 AM11/27/13
to google-we...@googlegroups.com
Hi everybody,

I am planning to implement a fully compliant JPA library for GWT. But before i do so, i need to first know whether people would be interested by such a project.

So here is a survey that i ask you to fill, it will help me to focus on most important features first.

http://www.lteconsulting.fr/jpa-for-gwt.html

Thank you all !
Arnaud Tournier
http://www.lteconsulting.fr

Subhrajyoti Moitra

unread,
Nov 27, 2013, 11:25:36 AM11/27/13
to google-we...@googlegroups.com
try Errai framework. 


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Arnaud TOURNIER

unread,
Nov 27, 2013, 11:34:36 AM11/27/13
to google-we...@googlegroups.com
Yes i know ERRAI but :

  • You can only execute very simple queries,
  • You cannot use any joins or nested attribute retrieval,
  • All queries should be parsable at compile time. That means you cannot generate dynamic queries during your application run,
  • Transactions are not possible,
  • You can have only one persistence context,
  • The GROUP BY clause is not supported...
That's why a REAL JPA implementation is missing...

Thanks !
Arnaud


2013/11/27 Subhrajyoti Moitra <subhra...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/8k_pqIciRHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.

Alain Ekambi

unread,
Nov 27, 2013, 11:53:34 AM11/27/13
to google-we...@googlegroups.com
ERRAI is open source. Why not extend or contribuate to it instead of rolling with a  yet a new library ? 
Sounds good though :)


2013/11/27 Arnaud TOURNIER <lte...@gmail.com>

Jens

unread,
Nov 27, 2013, 11:57:47 AM11/27/13
to google-we...@googlegroups.com
  • You can only execute very simple queries,
  • You cannot use any joins or nested attribute retrieval,
  • All queries should be parsable at compile time. That means you cannot generate dynamic queries during your application run,
  • Transactions are not possible,
  • You can have only one persistence context,
  • The GROUP BY clause is not supported...
That's why a REAL JPA implementation is missing...


Maybe you should reach out to Errai and check if there were good reasons to have these restrictions. My feeling is that a "real jpa" implementation would result in too much overhead from a code size point of view as well as runtime overhead. If a real JPA implementation will cause the browser to hang every now and then if things get a bit more complicated then no one will use it. A browser that feels sluggish because of a library is a no-go.


-- J.

Arnaud TOURNIER

unread,
Nov 27, 2013, 11:59:43 AM11/27/13
to google-web-toolkit
The problem is that Errai is not supported by an underlying powerful SQL implementation. That's why they say those features will never be implemented, because that's not possible with their underlying data storage management (i guess but i am not 100% sure, that they use the LocalStorage which is just a key/value map, and they then build a minimal subset of JPA on top of it)

So anyway, that would mean rewriting a lot of code in the Errai project, which is great by the way.

Thanks
Arnaud


2013/11/27 Alain Ekambi <jazzma...@gmail.com>

Arnaud TOURNIER

unread,
Nov 27, 2013, 12:01:56 PM11/27/13
to google-we...@googlegroups.com
I completely agree with this point ! It should be fast enough so that browser doesn't seem sluggish.

Arnaud


2013/11/27 Jens <jens.ne...@gmail.com>

--

Ed

unread,
Nov 30, 2013, 2:38:04 PM11/30/13
to google-we...@googlegroups.com
Sounds nice, but if you want people to really use it, make sure it's "carried" by a company that will ensure future maintenance....
Example: maybe you make an awesome tool, but if you next year decide to changes jobs or not maintain it anymore, people are stuck with it and can't upgrade to newer gwt versions for example... (See many of the current gwt lib's out there).
So, for me: I would never use it until I have confidence in this.
Secondly: you should post this in the gwt contributor forum.

Jonathan Fuerth

unread,
Dec 2, 2013, 5:09:09 PM12/2/13
to google-we...@googlegroups.com
Hi Arnaud,

As a member of the Errai team at JBoss, I just wanted to jump in and correct a few of your assertions here before any bad rumours get started.

There is no part of JPA that we ever claimed was unsupportable. We've started with a useful subset and we're working with the community to add new features as people find use cases for them on the client side. Most recently, we added support for abstract entity classes based on a request in our forum. Also, there's currently a community member who's thinking about contributing support for @Embeddable types.

From our reference guide, here's the list of stuff we said we "probably will" support eventually and "may never" support because of realities of the browser environment: https://docs.jboss.org/author/display/ERRAI/Errai+JPA#ErraiJPA-JPAFeaturesNotImplementedinErrai2.1

As far as needing to rewrite to add a feature, the errai-jpa code base is very clean, has plenty of API docs, and is thoroughly covered by JUnit tests. You can undertake a significant refactoring without fear of accidentally breaking an existing feature.

The errai-jpa code is also modular: the EntityManager implementation is fully separated from the underlying Window.localStorage backend by a StorageBackend interface. The idea is that one day our community might find a need for IndexDB (or even WebSQLDB) support and implement it. Thanks to the robust test suite, the exact contract of StorageBackend is negotiable.

Also, there's one incorrect item on your list of things we haven't implemented yet: we do support multiple persistence contexts. This feature is used by our errai-jpa-data-sync module for tracking the latest known state of entities on the server, but of course you can create additional persistence contexts for your own purposes.

Finally, I have to say everyone on the Errai team has a great track record of merging in pull requests from the community. We give pull requests our utmost attention and work with contributors to make sure their features and fixes are merged ASAP. See for yourself at https://github.com/errai/errai/pulls?direction=desc&page=1&sort=created&state=closed

Why not join us? Pick an aspect of our JPA implementation that's missing and you can't live without, then work with us to add it to what's already there. We're very friendly and always available to help contributors get their bearings on the errai-dev mailing list, #errai on FreeNode, and our web forum.

Best regards,
Jonathan


2013/11/27 Alain Ekambi <jazzma...@gmail.com>


2013/11/27 Arnaud TOURNIER <lte...@gmail.com>


2013/11/27 Subhrajyoti Moitra <subhra...@gmail.com>
try Errai framework. 


To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/8k_pqIciRHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/8k_pqIciRHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages