Combining MVVM and N-Tier Architecture -
it looks vm = business logic layer , model = entities/dto. in business logic doing validating of business rules if firstname empty, etc. , looks can job of viewmodel should business validation reside if need utilize mvvm design pattern in n-tier architected app? , model's dto there need model in n-tier app?
thanks!
according wikipedia, model represents "concepts , relationships between them". generally, in multi-tiered architecture notion of model local tier. why? because don't want pollute entire application information may relevant in 1 of tiers. example, concept of customer in ui layer may different beast concept of customer in data access layer (you may expect them expose different methods).
the m in mvvm therefore refers model in presentation layer - (say) object representing customer concept in world of ui. may entirely appropriate simple dto, or may want endow incoming dto object behaviour (maybe using adapter pattern) before considering represent element of model. love add diagram here clarification unfortunately reputation not allow me to!
Comments
Post a Comment