自定义组件和 ASP.NET MVC

Custom components and ASP.NET MVC(自定义组件和 ASP.NET MVC)
本文介绍了自定义组件和 ASP.NET MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇如何在典型的 ASP.NET MVC 心态中建立其他人可以为其开发插件的平台.我的意思是,这些插件会是什么样子?

I was curious how in the typical ASP.NET MVC mentality one could build a platform that others could develop plugins for. I mean, how would those plugins look like?

比如退出 WebForms 的用户控件,将所有层封装在它们自身中,或者代表模型、视图和控制器的三个不同文件.我应该开发 CMS 的核心,我希望其他人为以后构建插件在.经典的 Web Forms 或 ASP.NET MVC 哪种心态更好?

Like exiting user controls for WebForms, encapsulating all layers in themselves, or three different files representing the model the view and the controller. I should develop the core of a CMS, that I'd like others to build plugins for later on. Which mentality is better for that, classic Web Forms or ASP.NET MVC?

我需要开发人员能够为此单独构建组件.是否可以将 MVC 目录结构封装在组件 DLL 文件中,然后当我引用该 DLL 文件时,能够直接访问组件的模型、视图或控制器作为通用 MVC 结构的一部分?

I need developers to be able to separately build components for that. Is it possible to encapsulate the MVC directory structure in a component DLL file and then when I reference the DLL file, to be able to directly access the component's model, view, or controller as part of the general MVC structure?

推荐答案

最有前途的组件技术来自lostechies.com 和Mvccontrib 上的那些人 便携式区域.可移植区域允许将整个 MVC 应用程序附加到现有应用程序上.所以它不仅仅是一个 UI 组件,还提供了所有的工作流程和屏幕集成.

The most promising component techniques have come from the guys over at lostechies.com and Mvccontrib in the form of Portable Areas. Portable Areas allows an entire MVC app to be appended onto an existing application. So its not just a UI component but also provides all the work flow and screen integration as well.

开放论坛 也有类似的功能.我不知道如何,但它非常即插即用.

Open Forum does something like this as well. I don't know how, but it is very plug and play.

对于直接的插件架构,Rob Connery 的 链接文本有一个有趣的截屏视频和源代码.他利用 App-Code 目录将新插件滑入到位,而无需编辑主站点.

For straight up plugin architecture there is an interesting screencast and source code for Rob Connery's link text. He takes advantage of the App-Code directory to slide new plugins into place without having to edit the main site.

这篇关于自定义组件和 ASP.NET MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)