我的 Silverlight 项目应该使用 MEF 还是 Prism?
我的团队(3 名开发人员)将构建 Silverlight LOB 应用程序。 这是我们的第一个 Silverlight 项目。我们主要做Winforms。 我们将使用 Silverlight4 / VS2010 / 可能使用 WCF RIA 服务和 ASP.NET Web 应用程序来处理身份验证并托管 silverlight 页面。
我们需要一种方法来..
- 模块化 silverlight 项目,以便我们可以在应用程序的不同部分工作,然后集成它们。
- 动态加载应用程序的不同部分,因此 xap 文件的初始下载大小不会太大。
经过一些研究,我发现 Prism 和 MEF 是实现这些目标的可能解决方案。 您能给我关于使用哪个框架的建议吗?或者可能是另一种解决方案? 我们在Silverlight上没有太多经验,项目需要在3个月内完成,所以应该考虑框架的学习曲线。我读过一些比较它们的文章,例如 http://codebetter.com/blogs/glenn.block/archive/2009/12/02/mef-and-prism-to-be-or-not- to-be.aspx,但我不太清楚。(我只有4个月的编程经验)
感谢您的阅读!任何意见将不胜感激。
My team (3 developers) will be building a Silverlight LOB application.
This is the first Silverlight project for us. We've been doing mostly Winforms.
We'll be using Silverlight4 / VS2010 / possibly WCF RIA Services, and ASP.NET Web application to handle authentication and host the silverlight pages.
We need a way to..
- Modularize the silverlight project so we can work in different parts of the application, then integrate them.
- Dynamically load different parts of the application, so the initial download size of the xap file wouldn't be too large.
After some research, I found out that Prism and MEF are possible solutions to these goals.
Can you give me advice on which framework to use? or possibly another solution?
We don't have much experience on Silverlight and the project needs to be finished in 3 months, so the learning curves for frameworks should be considered. I've read some articles comparing them such as http://codebetter.com/blogs/glenn.block/archive/2009/12/02/mef-and-prism-to-be-or-not-to-be.aspx, but it's not clear to me.(I have only 4 months of experience in programming)
Thank you for reading! Any inputs will be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
两者实际上并没有提供相同的功能集。您本质上是在问“我应该使用发动机还是汽车”。然而,有一些信息有望使这一说法更加清晰,并为您提供一条混合两个世界的道路。
最新版本的 Prism 指南包括使用 MEF 而不是 Unity 的控制反转的实现。您可以在这里查看更多信息:
http://www.softinsight.com/bnoyes/2010/06/ 03/Prism40FirstDropIsOnCodePlex.aspx
The two don't really provide the same set of functionality. You are essentially asking "Should I use engines or cars". However, there is a bit of information that will hopefully make this statement clearer AND provide you with a path that gives you a mix of both worlds.
The newest version of the Prism guidance includes an implementation of the inversion of control that utilizes MEF instead of Unity. You can check out some more information here:
http://www.softinsight.com/bnoyes/2010/06/03/Prism40FirstDropIsOnCodePlex.aspx
我会选择 Prism,因为它是专门为构建复杂的模块化应用程序而设计的。 MEF 更适合插件应用程序,而无需对 WPF 提供太多明确支持。
您所陈述的目标与 Prism 非常吻合,并且有一个 关于如何实现动态 XAP 加载的教程很少。
I would go with Prism as it is specifically designed for building complex modular applications. MEF is more suitable for a plugin application without as much explicit support for WPF.
Your stated goals fit very well with Prism and there are a few tutorials out there on how to implement dynamic XAP loading.