I have a question about strongly typed views.
I already have my business objects (based on the persistence framework xpo form dev express). These objects have some associations.
eg. an article can have some user comments
My question now is, should my strongly typed views directly base on this objects (even if these objects have many properties i never need to present)
or should i create additional classes containing only the properties of the objects which i like to present.
eg. articleViewModel and commentViewModel.
where a articleViewModel can have associations with multiple commentViewModel
The advantage which i see in the second example is, that i can easier validate the viewModels.
However it means a lot of extra work, because i need to create for all objects which i like to present a viewModel with the corresponding
associations and properties.
Thanks a lot!
View Complete Post