回到目录

模块化

这个问题是在做模块化设计时出现的,在Lind.DDD.Plugins模块里,需要对应的模块实体,模块管理者,模块标识接口等,开发时,如果你的功能点属于一个模块,需要实现IPlugins,而当实现了标识接口后,在应用程序启动时,会一次性将所有插件模块注册到你的系统里,在需要使用时,只要使用PluginManager管理者把对应的模块取出来即可,这个取出的过程是没有性能损耗的,它并不是反射!

更多Lind.DDD.Plugins的相关知识,请阅读大叔这篇文章《Lind.DDD.Plugins~插件模式的集成

模块化在UI层的体现

本文主要问题是在设计出多个模块是,在UI层如何根据选中的模块,渲染出不同的VIEW来,这个问题不是新技术,只需要使用Html.Partial这个扩展方法即可以实现,而大叔要说的是,我们设计模块时,应该把所有模块放在一个统一的目录,新来的模块View只要放到module即可,由于模块核心内容都写在对应的module中,controller/action变得更加轻薄,这时,我们很容易使用autofac这些IoC工具把需要的模块对象动态生产出来,这也是Lind.DDD.Plugins要做的事情,只不过,为了性能考虑,我们在程序启动时已经把所有模块注册了,对于核心业务的action,所有模块共用一个即可,如列表action使用Index,添加action使用Create,而controller我们使用比较公用的名称,如商品管理Product,订单管理Order,而具体的手机项目product和order及PC端的product和order完全在对应的module里去实现(逻辑上的实现),而它们的action只会路由的转发,即根据项目去选择渲染哪一个View。

WEB MVC下面Module的组成

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR8AAAC0CAIAAAAimb+DAAAIUklEQVR4nO3dv24bNxzA8TyJhgAeIm3OG9wrZLHnPIDfISg8eHBmzx6MTEbGePByk7cWEFAkeYEYKOC2AYgGLeAOQlWK/0Ty9COPd98PiEJWdbozqi9Olo7lC/Wfvu+Xy6VK1HXd709/BEbXdc4NF4uFcQMYs2/ffksaT09/vths2ff90dFRxgudujATmXVt00p6oXf7xNSl79F5APqd+ib6nVvxBw+kyqlLTyvpBXp2dhau6+7TXVJdgR/trjj1obCcuvS0kl6pNzc34bouL98H6lKuk5X9o3FgzuPkxIUCcupa7Irf2Xq9Dtd1cnKyt67wPb4HOI+TwCAq/1ON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t643H56//3g2RG6rEtdNtp8hUBelMSLHeOsaOFTKusnGts6Y+TiekTqmXFf8usnVj5YxyTHluuLXTa5+tIxJjinXFa/60TImOSZbF4NRfVAXgyE1cupKetMFzBZ1AVKoC5BCXYAU6gKkUNcO/StmxbrJGIa6dujZdKybjGHmXhfrJsdviFTUxbrJ7iMM7BeR5lsX6yYbO/I9BtnmW9cG6yYr6hJDXaybTF1S5l6XQf/AnXWTaWwg6gKkUBcghboAKdQFSKEuQAp1AVKoC5DScF3OFZCB8Wi1Lt8KyMB4NFOXcZryrYAMjEedutbrdeomXdwqkjbn9UFDfwHr+Q/4hJiMjLr+Bbnzo/XZOm0JAAAAAElFTkSuQmCC" alt="" />

程序启动时注册Module这个特殊的路由模块,让我们的mvc程序可以找个Module下面的Views,这个只对需要有具体Action时用,如果你的module只有view,action都有公用模块实现了,就不需要注册下面代码了!

 /// <summary>
/// 注册模块
/// </summary>
public class Module_routing : RazorViewEngine
{
public Module_routing()
{
//视图位置
ViewLocationFormats = new[]
{
"~/Views/{1}/{0}.cshtml",
"~/Views/Module/{1}/{0}.cshtml"
}; //分部视图位置
PartialViewLocationFormats = new[]
{
"~/Views/{1}/{0}.cshtml",
"~/Views/Shared/{0}.cshtml",
"~/Views/Module/Shared/{0}.cshtml",
"~/Views/Module/{1}/{0}.cshtml"
};
} public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
{
return base.FindView(controllerContext, viewName, masterName, useCache);
} public override ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache)
{
return base.FindPartialView(controllerContext, partialViewName, useCache);
}
}

在程序启动时,把它的实例注册进来

     protected void Application_Start()
{
AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
RegisterView_Custom_routing();
} protected void RegisterView_Custom_routing()
{
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new Module_routing());
}

而在公用的action里,一般来说,会接收一个moduleName或者ModuleId这种属性,然后生产对应的模块对象,把对象的结果传给对应的View即可。

       public ActionResult Index(string module)
{
var model=Plugins.PluginManager.Resolve<IShop>("module").GetModel();//这个地方不是反射,只是从容器里把对应的实例取出来
return View(model);
}

在主View上进行渲染对应项目的PartialView,同时把Model传给对应的View,一般代码如下

<ul>
<li>@Html.ActionLink("pc端", "index", new { module = "pc" })</li>
<li>@Html.ActionLink("h5端", "index", new { module = "h5" })</li>
<li>@Html.ActionLink("pad端", "index", new { module = "pad" })</li> </ul>
@Html.Partial("~/views/module/"+Request.QueryString["module"] + "/index.cshtml",Model) <!-- 渲染对应的模块下的页面,Model由公用action返回 -->

这样产生的好处就是,当你添加新的module时,只需要维护对应的Project即可,然后把主网站的Views/Module文件夹更新,同时在module数据表中添加新的模块,就实现的新模块对老项目的集成!这一切可以说与原项目是解耦合的,它们可以在不同的解决方案中完成,各自负责各位的业务逻辑!

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAP0AAADLCAIAAAAqdAIbAAAMEElEQVR4nO2cu2obWxtAp8kbpJGKvMEp1agP+AXU/I26KdyJ+BnUKASpCqcI6VIIgiCGKVz4J1XARLhLwMLpAiFgkQSTYHCYU8zMvs9Fvmnsby3EOdGePaO5rP3Nt/fMdpQCyCPa9g4AbAG8B4ngPUgE70Ei2vt/C9YFlFDyUEss79cAMtDeb3tPAO4OvAeJ4D1IhPweJIL3IBG8B4mQ34NE8B4kgvcgEfJ7kAjeg0TwHiRCfg8SwXuQCN6DRMjvQSJ4DxLBe5AI+T1IBO9BIvXez4eRQW+8rCl3F5lLluOeXTP4Y8N5edXluBdF0XA+H1ZvKKuXVcl2Zzj3FtfSGy/twyxnOG+wVf8sWXtVd04C5frHjZNTvif5DuSrNvjxh0p1fu+fvuzElZWv3ebgLF3Oh5mOY6dWcQXUNS42416a/NIOx71eYKlbr9T78HHWe5BXrGxytftjFgzny5JzpnZGnRPnrPt7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V5GuVs2oBDxDyod2hs3e1mmeSPko2p8i2zbFn2rFWhlSeOQj7RC2N++SCplk8eRzg28rlgboYqH6+pTecFUZqp0U/IzOSLbVPN8O+AsMsnP2/n8LKUxRhDiL2L0lK+coPxrx8s0C3TWAl0bJAi7YAhx2GBFwsAGZAPkAH5ABmQD5AB+QAZkA+QAfkAGZAPkAH5ABmQD5AB+QAZkA+Q8S9VW1cCEkpuqgAAAABJRU5ErkJggg==" alt="" />

感谢各位对大叔框架的支持!

同时希望大家多多支持咱们.Net跨平台社区,支持善友大牛!

回到目录

爱上MVC~一个Action多套View模版的设计的更多相关文章

  1. View模版的设计

    一个Action多套View模版的设计   回到目录 模块化 这个问题是在做模块化设计时出现的,在Lind.DDD.Plugins模块里,需要对应的模块实体,模块管理者,模块标识接口等,开发时,如果你 ...

  2. MVC一个action对应多个视图的写法

    一,如下代码 using System; using System.Collections.Generic; using System.Linq; using System.Web; using Sy ...

  3. .net mvc 一个Action的 HttpGet 和 HttpPost

    http://www.cnblogs.com/freeliver54/p/3747836.html 本文转自:http://stackoverflow.com/questions/11767911/m ...

  4. 爱上MVC~为Html.EditorForModel自定义模版

    回到目录 挺有意思的一件事 对于MVC视图渲染来说,大家应该不会陌生,但对于模型的渲染,不知道是否听说过,主要是说Model通过它属性的相关特性(DataType,UIHint)来将它们自动渲染到Vi ...

  5. ASP.NET MVC中Section、Partial View 和 Child Action(转载)

    概括的讲,View中的内容可以分为静态和动态两部分.静态内容一般是html元素,而动态内容指的是在应用程序运行的时候动态创建的内容.给View添加动态内容的方式可归纳为下面几种: Inline cod ...

  6. Spring MVC 中采用注解方式 Action中跳转到另一个Action的写法

    Spring MVC 中采用注解方式 Action中跳转到另一个Action的写法 在Action中方法的返回值都是字符串行,一般情况是返回某个JSP,如: return "xx" ...

  7. MVC:一个View显示多个Model(多个Model你可以使用ViewBag或ViewData , 或者:Model["myInfo"] as)

    MVC:一个View显示多个Model 多个Model你可以使用ViewBag或ViewData , 或者:Model["myInfo"] as. 比如: Tuple<str ...

  8. ASP.NET MVC 5 入门教程 (4) View和ViewBag

    文章来源: Slark.NET-博客园 http://www.cnblogs.com/slark/p/mvc-5-get-started-view.html 上一节:ASP.NET MVC 5 入门教 ...

  9. 白话学习MVC(八)Action的执行二

    一.概述 上篇博文<白话学习MVC(七)Action的执行一>介绍了ASP.NET MVC中Action的执行的简要流程,并且对TempData的运行机制进行了详细的分析,本篇来分析上一篇 ...

随机推荐

  1. 如何使用ajax将json传入后台数据

    首先采用jquery内部封装好的方法是比较简单的,我们只需做的就是修改里面的一些配置: 对$.ajax()的解析: $.ajax({ type: "POST", //提交方式 co ...

  2. 修改win7电脑中所有文件的默认查看方式

    怎么修改win7电脑中所有文件的默认查看方式   如何设置才可以得到如下的效果:比如说打开一个盘符或者一个文件夹,进行设置之后,这个盘符里或者这个文件夹下的所有子文件夹.所有子文件夹里的所有文件都以“ ...

  3. JS 获取FileUpload1控件地址

    function openList() { //判断浏览器类型 var isIE = (document.all) ? true : false; ); ); ); var path = " ...

  4. 设计模式可复用面向对象软件设计基础之对象创建型模式—ABSTRACT FACTORY( 抽象工厂)

    意图 提供一个创建一系列相关或相互依赖对象的接口,而无需指定它们具体的类. 适用性 在以下情况可以使用 Abstract Factory模式 • 一个系统要独立于它的产品的创建.组合和表示时. • 一 ...

  5. Cobbler学习之一--Fedora17下配置Cobbler安装环境

    1:Cobbler是什么 Cobbler是一大Linux装机利器,可以快速的建立网络安装环境. 2:安装Cobbler需要的组件 createrepo httpd (apache2 for Debia ...

  6. Inno setup中定制安装路径

    我的程序修改了安装界面,所以我的界面中提供了更改安装路径的方法. 用户修改后的路径会被传回inno setup脚本,脚本中需要做的事情如下: 1,写一个函数,来返回新的安装路径,如: function ...

  7. a questions

    1.2520 is the smallest nuber that can be diveded by each of the number from 1 to 10 without any rema ...

  8. Activity劫持实例与防护手段

    原文地址:Activity劫持实例与防护手段 作者:cjxqhhh (本文只用于学习技术,提高大家警觉,切勿用于非法用途!)   什么叫Activity劫持   这里举一个例子.用户打开安卓手机上的某 ...

  9. 屏幕适配1(Android 增强版百分比布局库 为了适配而扩展)

    转载请标明出处: http://blog.csdn.net/lmj623565791/article/details/46767825: 本文出自:[张鸿洋的博客] 这篇博文写得太好了,让我很激动,分 ...

  10. easyui的datagrid打印(转)

    在使用easyui插件的时候,使用最多的应该是datagrid插件.有时候根据客户需求,可能需要将datagrid内容进行打印,这时候如果直接调用window.print,可能由于easyui的dat ...