什么是WPF棱镜? [英] What is Prism for WPF?

查看:104
本文介绍了什么是WPF棱镜?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我碰到了一种叫做 Prism 的东西.运行该项目的Microsoft将其描述为

I've come across something called Prism a lot recently. Microsoft, who run the project, describe it as

WPF和Silverlight中复合应用程序的准则.

Guidelines for composite applications in WPF and Silverlight.

恐怕即使在阅读了更详细的说明之后,我也几乎不知道它的真正含义.

Even after reading the more detailed descriptions out there, I have next to no clue what it's actually about, I'm afraid.

我希望在这里有人可以给我一个清晰简洁的解释,关于棱镜实际上是什么以及为什么我应该学习它.我已经是WPF开发人员两年了,我使用了MVVM,最近遇到了使用Prism的人,但是我个人对此有点不了解.

I'm hoping here that someone could give me a clear succinct explanation of what Prism actually is and why I should learn it. I have been a WPF developer for a couple of years now, used MVVM my fair share, and have lately encountered people using Prism, but personally feel a bit out of the loop here.

我特别想知道以下几点:

In particular, I'm wondering about the following points:

  • Prism实际上只是(或主要是)一本小册子,如在MSDN网站上?它是否包括任何库(如果确实如此)?

  • Is Prism literally just (or mainly) a booklet, as given on the MSDN site? Does it include any libraries, if so for what exactly?

Prism是MVVM框架吗?我应该将它用作正式的Microsoft MVVM框架"而不是别人使用的还是我自己的?

Is Prism an MVVM framework? Should I be using it as the "official Microsoft MVVM framework" over others out there or my own?

它是否提供依赖项注入?这样是否与MEF相关?

Does it provide dependency injection? Does it relate to MEF at all in this way?

作为WPF/Silverlight开发人员,我还不应该知道Prism的功能.

Anything else I should know about what Prism does, as a WPF/Silverlight developer.

推荐答案

Prism是 Microsoft模式和实践团队在WPF和Silverlight中构建复合应用程序"的官方指南.

Prism is the Microsoft Patterns and Practices Team official guidance for building "composite applications" in WPF and Silverlight.

它旨在为构建大规模应用程序的最佳实践提供指导,这些最佳应用程序的开发和可维护性很灵活.

Its intended to provide guidance on the best practices for building large scale applications which are flexible in terms of development and maintainability.

这包括有关依赖项注入(通过Unity或MEF),布局(包括使用MVVM),复合事件处理等的指南.

This includes guidance on dependency injection (via Unity or MEF), layout (including using MVVM), composite event handling, etc.

如MSDN网站上所述,Prism真的只是(或主要是)一本小册子吗?它是否包括任何库(如果确实如此)?

Is Prism literally just (or mainly) a booklet, as given on the MSDN site? Does it include any libraries, if so for what exactly?

这是一本书,但也包含支持的库(在 GitHub 网站上). /p>

It is a book, but also includes the libraries for support (on the GitHub site).

Prism是MVVM框架吗?我应该将它用作正式的Microsoft MVVM框架"而不是别人使用的还是我自己的?

Is Prism an MVVM framework? Should I be using it as the "official Microsoft MVVM framework" over others out there or my own?

是,不是.它包括有关使用MVVM的指南,但远不止MVVM框架.实际上,它本身不是"MVVM框架",尽管它确实包含了MVVM指南.

Yes and no. It includes guidance for using MVVM, but is far more than an MVVM framework. It's really not, in and of itself, an "MVVM framework" - though it does include MVVM guidance.

它提供依赖注入吗?这样是否与MEF相关?

Does it provide dependency injection? Does it relate to MEF at all in this way?

是的.它最初包括Unity,但最新版本包括使用MEF for DI.

Yes. It originally included Unity, but the latest release includes using MEF for DI.

作为WPF/Silverlight开发人员,我还不应该知道Prism的功能.

Anything else I should know about what Prism does, as a WPF/Silverlight developer.

值得一看的是他们的做事方式.它们具有非常详细的区域"概念,并且具有良好的事件聚合支持.它还包括用于同时针对WPF,Silverlight和Windows Phone进行开发的良好实践.

It's worth taking a look at how they do things. They have a very elaborate "region" concept, as well as good event aggregation support. It also includes good practices for developing against WPF, Silverlight, and Windows Phone simulataneously.

这篇关于什么是WPF棱镜?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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