Discussions

News: Lessons learned using GWT, Axis and JPA simulateously

  1. 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.html
  2. Hi, Can I see some lessens learnt using Axis and Hibernate ? Thanks, Ishtiak http://hibernate-questions.weebly.com
  3. 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/
  4. 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??
  5. 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.
  6. 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
  7. 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!
  8. ...

    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.
  9. ...

    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.
    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.
  10. Re: Real lesson should be:[ Go to top ]

    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.

  11. ...
    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.
  12. I agree[ Go to top ]

    thanks for taking time to discuss this http://genuinepath.com/computinginternet/38-internet-marketing/56-stock-assault-20-pros-and-cons-is-srockassault-scam http://genuinepath.com/computinginternet/38-internet-marketing/58-forexsupremacy
  13. where & how to use GWT is key[ Go to top ]

    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)