Announcement Announcement Module
No announcement yet.
Integrating GWT client/server RPC app with Spring Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    For people who are still looking for a solution for this problem, I recommend using the GiLead library. Previously called hibernate4gwt.

    It allows you to port those annotated classes to GWT and even includes lazy loading!


    • #17
      GWT with Spring

      Anyone have any insight into how we can make the most of Spring?

      One way of using GWT with Spring is building a menu-driven web application. My web site, , has an example of such an application. It is work in progress, soon it will describe how I use GWT and Spring Security together - in the meantime, the Proof Of Concept URL is:


      • #18
        Originally posted by dotbart View Post
        Oh, thanks a lot! Silly me for diagonally reading the Google manual, and therefore skipping The Module XML part.

        However, now I'm on track with the problem Christoph and behrooznobakht were facing.

        I use Hibernate Annotations for my mapping. When importing my entity's using the Module XML file, GWT can't file the javax.persistence.* paths.

        How can I handle that part? Putting all of my mapping in a hbm.xml file seems like the only 'pluggable' option (to make my domain model entirely independant from anything else). But it takes away the fun and speed of Hibernate Annotation development :-)
        Can you post your solution as I have the same issue, but it is not clear to me what you did to fix the first issue..


        • #19
          The approach @behrooznobakht suggests seems in line with the anti-corruption layer pattern. If you view the decoupling of the front end layer (in GWT) from the domain layer as important, then it seems logical to have the view model different from the domain entities allowing both sides to grow independently if possible.

          Moreover, in the case of GWT the model eventually resides on the client and not on the same server. The practice of using the domain entities across all layers works well when all layers are on the server (like the typical web applications).

          A couple of problems faced while moving the domain entities to the client are:
          1. Hibernate lazy collection references are not serializable automatically by GWT. A work around will be required for this.
          2. What if there is no need to move the entire domain entity object graph to the browser. It could easily result in too much network traffic over the wire. Also, at times there could be a data security/obscurity need to not send some attributes of the domain entity to the browser.

          Keeping the model objects focused on the GWT-server interaction and separate from domain service models seems like a good solution for applications that require the benefits.

          This discussion thread is a little old. The scenario discussed still has a lot of relevance.