Re: Client/Server communication. GWT-RPC ? GIlead ? Dozer ? RequestFactory ?
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 <lifeoflust@gmail.com> 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 google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscribe@googlegroups.com.
> 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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home