I have a question about MVC architecture in an application based on Spring+Hibernate+IceFaces
. If we choose MVC pattern + ajax
, What kind of data should the model passed to the view hold in MVC?
Do I have to create domain objects pulling data from Hibernate? If I just use Hibernate DAO/pojo as model data, does it hurt?
On the front end, we have value objects for the view. But, we need to do a lot to make VO sync up with the Hibernate persistent entities. This is not good for AJAX calls. If we just use POJO
as view objects, the only thing I need to worry about is serialization. That looks simple. Not quite sure if this works. Pros and cons? Any suggestions?