业务逻辑在MVVM中位于何处? [英] Where does business logic sit in MVVM?

查看:110
本文介绍了业务逻辑在MVVM中位于何处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯于使用N层架构进行开发,即数据访问层,业务逻辑层等

I am used to developing with N-Tier architecture, i.e. Data Access Layer, Business Logic Layer, etc

任何人都可以为我的业务逻辑提供有关最佳位置的任何建议或链接吗?

Can anyone provide any advice or links about the best location for my business logic?

是否将所有这些都放入Silverlight应用程序的Models文件夹内的类中?

Do I put all of this into classes within the Models folder of my Silverlight application?

保罗

推荐答案

业务逻辑以及数据通常是MVVM中模型层的一部分. View是视觉效果,而ViewModel是胶水",可让您使用业务特定的逻辑和数据.

Business logic, as well as the data, is typically part of the Model layer in MVVM. The View is the visuals, and the ViewModel is the "glue" that lets you work with the business specific logic and data.

域或业务所特有的任何内容都应使用其他体系结构,供其他应用程序重用.

Anything that's specific to the domain or business should be reusable by other applications, using other architectures.

这篇关于业务逻辑在MVVM中位于何处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆