wpf - Should I use DTOs as my data models in MVVM? -
i'm working on first real foray using mvvm , have been reading various articles on how best implement it.
my current thoughts use data models data transfer objects, make them serializable , have them exist on both client , server sides. seems logical step given both object types collections of property getters , setters , layer in between seems complete overkill.
obviously there issues inotifypropertychanged not working correctly on server side there no viewmodel communicate, long careful constructing our proper domain model objects data models in service layer , not dealing the data models on server side don't think should big issue.
i haven't found info approach in reading, know if pretty standard thing, assumed de facto way of doing mvvm in multi-tier environment? if i've got wrong idea things thoughts on other approaches appreciated too.
i'm no expert on this. had same scenario. agree that quite overkill. i've been using solution quite time , haven't encountered issues. inotifypropertychanged isn't big problem me since nothing on server-side subscribe propertychanged event. if use inheritance on data models, must serializable. in scenario, have 2 base classes data models: 1 used data transfer, , other not.
Comments
Post a Comment