Hello Daniel Let me be explain (maybe some of my assumptions are wrong, so don't hesitate to correct me :-) ):
- The extra plumbing is pretty heavy, one extra interface for each entity you want to pass - No compile-time checking between properties in the enity and in the client interfaces (but maybe the GWT plugins in Eclipse emit some warnings ?) - You cannot return from the same call "normal" POJO objects and RequestFcatory Serialized Ones - It makes the whole RPC stacks in GWT feel unclear. Too many ways to achieve the same goal. Ideally I would have a prefer a single way (the legacy GWT-RPC) that coud have been customized through parameter annotations to alter the way serialization occurs by default. I think the GWT team has made great efforts to solve commonly encountered issues with GWT-RPC but they have lost the magic and beauty of their initial design in the process. Le dimanche 8 avril 2012 06:55:22 UTC+2, Daniel Mauricio Patino León a écrit : > > RF awkward ? I dont think so, finally the rpc aproach with dto's and other > stuff are sent to the client side in some like JSON (GWT Serialization), > RequestFactory uses JSON to pass from server to the client and it just > works well. In my opinion (i did two projects with the DTO thing) the > RequestFactory its the best way to build Enterprise Applications with JPA > (Hibernate). I recommend to you read careful the documentation about the > RF. > Just my opinion. > > El 7 de abril de 2012 17:20, Jeff Schnitzer <[email protected]>escribió: > >> Just to clarify: Objectify isn't a serialization framework. It's a >> persistence API - "Hibernate for the GAE datastore" makes me cringe >> but it gives you the right idea. Using Objectify you still have to >> decide whether to use your entity domain objects or DTOs for the >> GWT-RPC boundaries. I tend to use DTOs, although I'll use the entity >> objects themselves if they are simple enough. They usually aren't. >> >> Jeff (creator of Objectify) >> >> On Sat, Apr 7, 2012 at 1:09 PM, Joseph Lust <[email protected]> wrote: >> > fabio, >> > >> > While mechanisms like Objectify exist to pass the same entity to the UI >> from >> > Hibernate, I have found that DTO objects are still the most robust >> solution. >> > Obviously you don't want to send the secret Hibernate goodness to the >> UI, >> > you don't want LazyLoading exceptions, and chances are the entity has >> way >> > more information than you need in the UI. Since we often have to move a >> lot >> > of information to the UI (i.e. 10K plus records) it makes sense to use >> the >> > Entity in the DAO layer and pack up the data into the DTO's in the >> service >> > layer in an efficient manner. Keep in mind too that if you pass your >> entity >> > bean to the UI, you're telling prying eyes a lot about your DB design. >> > >> > Also, we usually use a DtoContainer object for many pages. For example, >> if >> > WidgetX needs 10 fooDTO's and 3 barDTO's, then you pack them up in a >> > WidgetXContainer. This is especially useful because if you decide later >> that >> > WidgetX needs 4 wombatDTO's, you whole RPC setup from interfaces, to >> > services, to async handlers don't need to be touched. You just add >> another >> > property to the container and then just put in and take out the new >> object. >> > >> > Others might push for a framework like Objectify, but my experience with >> > such frameworks is that you lose in the long term if you plan to do >> anything >> > beyond the purview of their limited use cases. >> > >> > Sincerely, >> > Joseph >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Google Web Toolkit" group. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msg/google-web-toolkit/-/odd9_XG1AHAJ. >> > >> > To post to this group, send email to >> [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/google-web-toolkit?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> >> > > > -- > ISC. Daniel Mauricio Patiño León. > Liondev S.A. de C.V. > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/AAuVV59-66YJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
