我应该使用什么 MVVM 框架? [英] What framework for MVVM should I use?

查看:23
本文介绍了我应该使用什么 MVVM 框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 MVVM 模型开发应用程序,但我已经到了需要选择要使用的框架的地步.

I am developing an application with the MVVM model, but I have reached a point where I need to choose which framework to use.

可能的选项包括:

  • MVVM 工具包
  • MVVM 基金会
  • WPF 应用程序框架 (WAF)
  • 轻量级 MVVM
  • Caliburn
  • 收紧
  • 棱镜
  • 响应式界面

根据您的经验,哪个更好?

In your experience, which is better?

推荐答案

这实际上取决于您想要实现的目标,以及您想要的基础设施数量,以及您可以轻松找到对您有帮助的示例出去.我将在这里声明一个兴趣,因为我已经积极参与了至少一个 MVVM 框架,并且我已经通过 WPF Disciples 小组向其他人提供了意见,所以我有点偏见.话说回来:

It really depends on what you are trying to achieve, and how much infrastructure you want in place already, plus the ease with which you can find samples that help you out. I'm going to declare an interest here, because I've been actively involved in at least one MVVM framework, and I've had input into others through the WPF Disciples group, so I'm a little bit biased. Saying that, here goes:

Microsofts MVVM 工具包 - 这仍然在阿尔法阶段.它最初发布时,由于它没有做的事情,因此受到了门徒的一些猛烈抨击.话虽如此,MS 正在寻求加强这个框架,因此值得关注 - 它只是还没有准备好.

Microsofts MVVM Toolkit - this is still very much in the alpha stages. When it was originally released, it took a bit of a savaging from the Disciples because of what it didn't do. Saying that, MS is looking to beef this framework up so it's one to watch - it's just not ready yet.

MVVM Foundation - 啊 Josh Smith 的框架版本.Josh 是 MVVM 的父亲之一,并且一直是该模式的大力倡导者和老师.因此,您在其他框架中会发现的很多内容都带有 Josh 的指纹.该框架旨在提供 MVVM 的基础知识,而不是解决一些更深奥的问题.最初这仅适用于 WPF,但 Laurent Bugnion 和我自己等人添加了功能/项目,这意味着这也将是一个与 Silverlight 兼容的框架.

MVVM Foundation - ah Josh Smith's version of the framework. Josh is one of the daddies of MVVM, and has been a huge advocate and teacher of the pattern. As a result, a lot of what you'll find in other frameworks has Josh's fingerprints all over it. This framework is intended to provide the basics of MVVM, and not to address some of the more esoteric issues. Originally this was intended only for WPF, but people such as Laurent Bugnion and myself have added functionality/projects that mean this will be a Silverlight compatible framework as well.

WAF - 没有经验,所以恐怕我无法评论.

WAF - no experience of it, so I can't comment on it I'm afraid.

MVVM Light - Laurent Bugnion 对此的看法,并刚刚更新到第 2 版.这是一个非常好的框架,但同样,它并不打算涵盖 MVVM 应用程序的每一个方面.鉴于 Laurent 的背景,它具有非常强大的 Silverlight 和 Blendability 支持.

MVVM Light - Laurent Bugnion's take on it, and just updated to version 2. This is a very good framework, but again it's not intended to cover every single aspect of MVVM applications. Given Laurent's background, it has very strong Silverlight and Blendability support in it.

更新 Laurent 刚刚告诉我 .NET 3.5 和 .NET 4.0 版本功能兼容.Wau 去 Laurent.

Update Laurent has just informed me that the .NET 3.5 and .NET 4.0 versions are feature compatible. Wau to go Laurent.

Cinch - Sacha Barber 优秀的 WPF 唯一 MVVM 框架.这比我上面谈到的框架涵盖了更多的基础.这是一个出色的框架,并利用了 Bill Kempf 出色的 Onyx 项目中涵盖的概念.Onyx 旨在补充 MVVM 框架,并添加人们在 MVVM/WPF 中通常难以做到的功能.同样,最初打算仅用于 WPF,Onyx 已取得进展,包括 SL 兼容性 - 我参与的工作让我特别自豪.

Cinch - Sacha Barber's excellent WPF only MVVM framework. This covers more ground than the frameworks I've talked about above. It's an excellent framework, and takes advantage of concepts covered in Bill Kempf's excellent Onyx project. Onyx is intended to complement MVVM frameworks, and adds in functionality that's typically been hard for people to do in MVVM/WPF. Again, originally intended to be WPF only, Onyx has progressed to include SL compatibility - work I am particularly proud to have been involved in.

Prism - 同样,我从未使用过它,但我听说过很多好的关于它的事情.

Prism - Again, I've never used it, but I've heard a lot of good things about it.

海洋 - Karl Shifflett,Cider 团队的项目经理最近发布了一个功能齐全的 WPF MVVM 框架.同样,这是一个出色的框架,值得推荐.

Ocean - Karl Shifflett, Program Manager on the Cider team, recently released a fully featured WPF MVVM framework. Again, this is an excellent framework and has lots to recommend it.

最重要的是,下载不同的框架,查看它们并找出最符合您的思维方式和要求的最直观的框架.如果您认为您可能希望从相同的代码库支持 Silverlight,那么仅 WPF 的框架应该打折.

The bottom line is, download the different frameworks take a look at them and work out which one fits most intuitively with the way you think and with your requirements. If you think that you might want to support Silverlight from the same codebase then the WPF only frameworks should be discounted.

这篇关于我应该使用什么 MVVM 框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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