I would like to hear some advice on best practices.
Which one would you recommend:
- Hibernate integration with a OpenSessionInViewFilter?
- Or a GWT remote service which actually creates DTO's - meaning model
objects for a certain widget - out of multiple Hibernate instrumented
domain objects?
I prefer the second one because:
- there is a cleaner separation between the different layers
- no hibernate dependency on the view layer, which makes it easier to
switch to jdbc or something else. Because with option one you gotta
deal with the LazyInitException
- less traffic, you only send to the client exactly what he needs, in
the correct format
- ...
I would like to hear your thoughts...