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

查看:27
本文介绍了业务逻辑在 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天全站免登陆