-
Lessons learned using GWT, Axis and JPA simulateously (12 messages)
- Posted by: Santiago Rodriguez
- Posted on: December 29 2008 08:09 EST
In my experience with the three technologies which appear in the name of this article, I had to face a number of problems, actually quite easy to solve once you know what is all about. So I decided to publish this, for others not to have to face these same problems again. Here you have some lessons learned that should be taken into account when working at the same time with the Google Web Toolkit, Axis and any of the JPA implementations out there. http://terrazadearavaca.blogspot.com/2008/12/lessons-learned-using-gwt-axis-and-jpa.htmlThreaded Messages (12)
- Re: Lessons learned using GWT, Axis and JPA simulateously by guddu sk on December 29 2008 08:15 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by Santiago Rodriguez on December 29 2008 08:50 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by alberto gori on December 29 2008 10:06 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by David Small on December 29 2008 13:40 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by Vitaliy Semochkin on December 29 2008 13:57 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by Mileta Cekovic on December 29 2008 17:17 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by Francisco A Lozano on December 29 2008 18:37 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by huc muc on December 30 2008 12:16 EST
- Re: Real lesson should be: by Santiago Rodriguez on December 30 2008 06:25 EST
- Re: Lessons learned using GWT, Axis and JPA simulateously by Jeff Segal on December 31 2008 10:49 EST
- I agree by Eugene George on April 21 2009 07:11 EDT
- Re: Lessons learned using GWT, Axis and JPA simulateously by Francisco A Lozano on December 29 2008 18:37 EST
- where & how to use GWT is key by NN NN on December 30 2008 21:16 EST
-
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: guddu sk
- Posted on: December 29 2008 08:15 EST
- in response to Santiago Rodriguez
Hi, Can I see some lessens learnt using Axis and Hibernate ? Thanks, Ishtiak http://hibernate-questions.weebly.com -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: Santiago Rodriguez
- Posted on: December 29 2008 08:50 EST
- in response to guddu sk
Hi. The Hibernate implementation of JPA and some others were actually used for the different tests that resulted in the article. Don't know if you mean pure Hibernate (not the EntityManager). ___________________________________ http://terrazadearavaca.blogspot.com/ -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: alberto gori
- Posted on: December 29 2008 10:06 EST
- in response to Santiago Rodriguez
Sorry, but nowadays also stones know that an EntityManager must be re-created on every request (if you don't need an extended persistence context). Why posting this obvious thing?? -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: David Small
- Posted on: December 29 2008 13:40 EST
- in response to Santiago Rodriguez
One overriding lesson could be to use the fuller JEE spec with session beans. Session beans will hide all these threading problems with the EntityManager, plus the containers throw in object pooling free of charge. -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: Vitaliy Semochkin
- Posted on: December 29 2008 13:57 EST
- in response to David Small
One overriding lesson could be to use the fuller JEE spec with session beans. Session beans will hide all these threading problems with the EntityManager, plus the containers throw in object pooling free of charge.
I think the overriding lesson should be read the spring reference manual and get rid of private static EntityManagerFactory emf = Persistence.createEntityManagerFactory("NombreServicioJPA"); I thought Service Locator is in past already -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: Mileta Cekovic
- Posted on: December 29 2008 17:17 EST
- in response to Santiago Rodriguez
Real lesson should be: When to use and when NOT to use GWT, Axis and JPA :) All three have quite limited area of applicability so combining all three in the same project should be very, very rare occasion. GWT: useful only in 'Google' type of applications (where it really shines). 'Google' type of applications are: web applications that demand rich and responsive UI, number of concurrent users and scalability are of utmost importance and Flex/Java FX/Silverrigth are not the option. Pretty slim chances are that the ordinary web app would satisfy this criteria. My experience is that GWT eats a lot of development time compared to say JSF (due to too long compile/run/debug cycle, introduced by GWT compiler), so another criteria for GWT usefulness are is that development cost and time to market are not critical for your project. Axis: Do not have much experience with Axis in particular, but generally, some advice for using web services would be: use them only if you need too, i.e. if you need standards-based interoperability with third parties. Definitely avoid Web Services if you can if you need only intra-company interoperability. As for using Axis in particular, do not know any reason to use it over JAX-WS on Sun JDK. If you use IBM JDK, you could consider Axis. JPA: First, consider if your project is complex enough to need a domain model. Then check your performance requirements to see if ORM is applicable to your solution. If performance is of utmost importance either skip ORM at all or develop partial in-house solution (you definitely do now want to build full ORM layer in-house). Finally, check what benefits will you get using standard Java ORM API (JPA) over more feature rich proprietary APIs like Hibernate. Moving well-designed mid-sized project code from JPA to Hibernate or vice-versa should be a less then a man-week job, so benefit of using JPA (possibility to switch JPA providers) is less in that particular case (single mid-sized project). So, only very strange and rare stream of circumstances on a well thought-out project could lead to combining GWT, Axis and JPA! -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: Francisco A Lozano
- Posted on: December 29 2008 18:37 EST
- in response to Mileta Cekovic
...
I think GWT shines in web *applications*. Its development model encourages component reuse and, if you use rich toolkits like GXT, you can be really productive and the result is awesome. GWT provides massive scalability for free (server-based load is just a stateless RPC server, all the rendering is done in client), but for me the most important feature of GWT is that it's really Object-oriented and component-oriented, instead of text-manipulation stuff. Of course, trying to make the average blog with it will be painful. I slightly agree with the compile-time complaints, but I can't imagine why on earth could anyone say it's faster to develop with JSF than with GWT.
GWT: useful only in 'Google' type of applications (where it really shines). 'Google' type of applications are: web applications that demand rich and responsive UI, number of concurrent users and scalability are of utmost importance and Flex/Java FX/Silverrigth are not the option. Pretty slim chances are that the ordinary web app would satisfy this criteria.
My experience is that GWT eats a lot of development time compared to say JSF (due to too long compile/run/debug cycle, introduced by GWT compiler), so another criteria for GWT usefulness are is that development cost and time to market are not critical for your project. -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: huc muc
- Posted on: December 30 2008 12:16 EST
- in response to Francisco A Lozano
I agree here. JSF is definitely not faster than GWT development. Actually, in hosted mode you don't need to compile at all. If you are really smart you would separate the web side so you can hot deploy the server side independent of the client. However, compiling the system into javascript is pretty slow. Just got to know on how to develop efficently and understand the architecture of GWT....
GWT: useful only in 'Google' type of applications (where it really shines). 'Google' type of applications are: web applications that demand rich and responsive UI, number of concurrent users and scalability are of utmost importance and Flex/Java FX/Silverrigth are not the option. Pretty slim chances are that the ordinary web app would satisfy this criteria.
My experience is that GWT eats a lot of development time compared to say JSF (due to too long compile/run/debug cycle, introduced by GWT compiler), so another criteria for GWT usefulness are is that development cost and time to market are not critical for your project.
I think GWT shines in web *applications*. Its development model encourages component reuse and, if you use rich toolkits like GXT, you can be really productive and the result is awesome.
GWT provides massive scalability for free (server-based load is just a stateless RPC server, all the rendering is done in client), but for me the most important feature of GWT is that it's really Object-oriented and component-oriented, instead of text-manipulation stuff. Of course, trying to make the average blog with it will be painful.
I slightly agree with the compile-time complaints, but I can't imagine why on earth could anyone say it's faster to develop with JSF than with GWT. -
Re: Real lesson should be:[ Go to top ]
- Posted by: Santiago Rodriguez
- Posted on: December 30 2008 06:25 EST
- in response to Mileta Cekovic
I don't quite agree with you, Mileta. GWT development can be really quick, as far as you follow the recommendations the people from Google give. You talk about compile time, but actually you should only compile the java code to javascript once you've tested the client side enough in hosted mode and you've checked everything is all right. The compilation from java to javascript is what really takes time. In the case of the project used for this article, a web service was exposed for different applications that use different technologies (.NET, java and even pure .asp), so the use of web services was clearly justified. The fact that we used Axis is because Eclipse has a really simple mechanism to generate web services that really saved a lot of time to us. I don't really know many other ways to generate web services but this one is really simple. Finally, the GWT is used only to show some screens with statistics that get updated every minute. That means ajax, which GWT supports greatly. So I don't think that it is so difficult to find a project or application where these three technologies find their place all together. -
Re: Lessons learned using GWT, Axis and JPA simulateously[ Go to top ]
- Posted by: Jeff Segal
- Posted on: December 31 2008 10:49 EST
- in response to Mileta Cekovic
...
Axis: Do not have much experience with Axis in particular, but generally, some advice for using web services would be: use them only if you need too, i.e. if you need standards-based interoperability with third parties. Definitely avoid Web Services if you can if you need only intra-company interoperability. As for using Axis in particular, do not know any reason to use it over JAX-WS on Sun JDK. If you use IBM JDK, you could consider Axis.
Agree 100% as far as understanding which use cases Web Services are a good fit for and which ones aren't. Way too often Web Services are used in situations where they yield very little benefit over other options. -
I agree[ Go to top ]
- Posted by: Eugene George
- Posted on: April 21 2009 07:11 EDT
- in response to Jeff Segal
-
where & how to use GWT is key[ Go to top ]
- Posted by: NN NN
- Posted on: December 30 2008 21:16 EST
- in response to Santiago Rodriguez
Development is not faster using GWT (after doing 2 projects) and matter of fact no sliver bullet for rapid application development exist. It is somewhat like Flex which can be used for rich UI. In fact I prefer Flex over GWT (only difference is you pay for Flex builder apart from that both are open source)