puremvc
|
|
« Reply #1 on: January 04, 2009, 11:54:11 » |
|
Certainly do expose value objects to your view components. The primary benefit of a value object is to act as a data carrier to shuttle data across the tiers of your app.
The VO represents the domain model at its purest, client-side form. And the view has no other purpose than to expose this data to the user, and allow them to interact with and somtimes update it.
But while the view needs to know about the data, we are still trying to separate out our responsibilities into M,V & C tiers, each of which needs to understand the data without knowing too much about each other. So the VO can be thought of as the extend of their shared knowledge about the domain.
That said, obviously its a good thing to work out your domain model first, since constant churn in VO definition can cause you to be changing code all over the app across all tiers. The domain model is a cross-cutting dependency that is impossible to minimize.
Hope this helps, -=Cliff>
|