在ASP.NET MVC实现MEF? [英] Implementing MEF with ASP.NET MVC?

查看:126
本文介绍了在ASP.NET MVC实现MEF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出是否任何人有任何经验或使用MEF(托管扩展框架(微软新的插件框架)的ASP.NET MVC的想法。我需要创建一个标准的ASP.NET MVC,我有。但是,我需要提供即视图和控制器等,这取决于如果我添加一个插件的附加功能。它并不需要动态编译即源$ C ​​$ C ...但我把进入系统的DLL。

I am trying to find out if anyone has any experience or ideas of using MEF (Managed Extensible Framework (Microsoft's new plugin framework) with ASP.NET MVC. I need to create a standard ASP.NET MVC, which I have. But I need to offer additional functionality i.e. Views and Controllers, etc, depending on if I add a plugin. It doesn't need to be dynamically compiled i.e. source code... but a DLL that i put into the system..

有什么办法应用程序启动时动态地加载DLL,然后合并一个视图和控制器与主系统?我不知道如果我在这里在正确的轨道上。

Is there any way to dynamically load a DLL when the app starts, and then MERGE a VIEWS and CONTROLLERS with the main system? I don't know if i am on the right track here.

然后,我在来与应用标准的观点想,我可以使用的if then,以找出是否一个插件被加载并在用户控件合并。

Then, I suppose in the "STANDARD" views that come with the app, I can use an "IF THEN" to find out if a plugin is loaded and MERGE in a user control.

好吧,我大声谈论这里,但我想你明白我在得到。

Well, I'm talking out loud here, but I think you understand what I am getting at.

任何想法?

推荐答案

任何与运气?我读<一个href=\"http://blog.maartenballiauw.be/post/2009/04/21/ASPNET-MVC-and-the-Managed-Extensibility-Framework-%28MEF%29.aspx\"相对=nofollow>这个并认为这是你在找什么。结果
我有MEF恰好为零XP,但它看起来很有希望。我希望我可以在家里凑的空闲时间几个小时一起与实验。这将是超有用创造某种模块化MVC框架的方式。

any luck with that? I was reading this and think that's what you're looking for.
I have exactly zero xp with MEF, but it looks promising. I hope I can scrape some hours of free time together at home to experiment with that. It would be ultra usefull to create some kind of modularized MVC "framework" that way.

对于当前的项目我的工作,我有以下问题:
多个网站使用相同的看法,唯一的其他CSS文件。目前,我有重复导致maintaince问题的看法。结果
我希望我可以把这些意见在使用MEF一个集中的地方。

As for the current project I'm working on, I have the following problem: Multiple sites with the same views, only other CSS files. Currently I have to duplicate the views resulting in a maintaince problem.
I'm hoping I can put these views in a central place using MEF.

这篇关于在ASP.NET MVC实现MEF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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