View模版的设计
一个Action多套View模版的设计
模块化
这个问题是在做模块化设计时出现的,在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/trjj1obCcuvS0kl6pNzc34bouL98H6lKuk5X9o3FgzuPkxIUCcupa7Irf2Xq9Dtd1cnKyt67w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Kqitp3WT7GaiLMXyMt643H56//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/NIOx71eYKlbr9T78HHWe5BXrGxytftjFgzny5J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WK5TxYrcVHtL5V5GuVs2oBDxDyod2hs3e1mmeSPko2p8i2zbFn2rFWhlSeOQj7RC2N++SCplk8eRzg28rlgboYqH6+pTecFUZqp0U/IzOSLbVPN8O+AsMsnP2/n8LKUxRhDiL2L0lK+coPxrx8s0C3TWAl0bJAi7YAhx2GBFwsAGZAPkAH5ABmQD5AB+QAZkA+QAfkAGZAPkAH5ABmQD5AB+QAZkA+Q8S9VW1cCEkpuqgAAAABJRU5ErkJggg==" alt="" />
感谢各位对大叔框架的支持!
同时希望大家多多支持咱们.Net跨平台社区,支持善友大牛!
View模版的设计的更多相关文章
- 爱上MVC~一个Action多套View模版的设计
回到目录 模块化 这个问题是在做模块化设计时出现的,在Lind.DDD.Plugins模块里,需要对应的模块实体,模块管理者,模块标识接口等,开发时,如果你的功能点属于一个模块,需要实现IPlugin ...
- 52. 模版和设计元素——Lotus Notes的代码重用
不论是理论上还是实用上,代码重用都是编程的一个重要议题.可以从两个角度来讨论代码重用. 一是逻辑上代码以怎样的方式被重用.既可以通过面向对象的思想普及以来耳熟能详的继承的方式.比如先建了一个车的基类, ...
- 转载《浅析MVC框架中View层的优雅设计及实例》
在基于B/S的应用程序开发中,从基本的技术分工上来说就是两大块,一是软件显示界面,另一个是程序逻辑.在N年前的脚本语言时代,无论是asp.php还是jsp,我们基本是都是把这两者柔和在一起的.尽管我们 ...
- iOS UIKit:CollectionView之设计 (1)
collection view(UICollectionView对象)使用灵活和可扩展的布局来描述有序的数据项,其一般情况下以网格的形式来展示内容,但并非一定如此. 1 基础 为了将数据展示在屏幕中, ...
- # Writing your first Django app--part 3 about view
添加更多的view 写actually有用的view 使用模版来设计view 使用模版设计view的捷径:render() 抛出异常404 抛出异常404-快捷方法: get_object_or_40 ...
- Power BI for Office 365(四)Power View第一部分
Power View是一种可以创建动态的交互式报表的工具,并且支持丰富多样的图表类型,在Power View中创建的报表可以很容易地进行分享,以及供查看报表的用户对Power View报表进行交互.从 ...
- [原] Android 自定义View步骤
例子如下:Android 自定义View 密码框 例子 1 良好的自定义View 易用,标准,开放. 一个设计良好的自定义view和其他设计良好的类很像.封装了某个具有易用性接口的功能组合,这些功能能 ...
- Android App的架构设计:从VM、MVC、MVP到MVVM
随着Android应用开发规模的扩大,客户端业务逻辑也越来越复杂,已然不是简单的数据展示了.如同后端开发遇到瓶颈时采用的组件拆分思想,客户端也需要进行架构设计,拆分视图和数据,解除模块之间的耦合,提高 ...
- Yii2的view需要链接跳转
添加 use yii\helpers\Url; view中的连接 <?= Url::toRoute('post/index');?>//post为你的当前控制器名,index为view模版
随机推荐
- git之添加ssh
1.ssh-keygen 2.cat ~/.ssh/id_rsa.pub 3.git config user.email "huangsy13@gmail.com" 4.git c ...
- javascript进阶-原型prototype
一.javascript原型认识 很多编程语言都有类的概念,我们可以拿原型和类进行比较,看看它们之间的区别以及相同点在哪里. 1.类:类是一个具体事物的抽象所以类是一个抽象的东西,在面向对象中类可以用 ...
- 关于Css选择器优先级
今天练习css的时候,重叠后的style发现不起作用,原来css选择器优先级大有文章. 声明: yi下内容选自 51cto.com --加以自己的理解 以备日后参照使用,毕竟自己理解的才是自己的. ...
- SQLSERVER 启用跨库查询脚本
启用Ad Hoc Distributed Queries的方法,执行下面的查询语句就可以了: exec sp_configure 'show advanced options',1reconfigur ...
- chromium浏览器开发系列第二篇:如何编译最新chromium源码
说一下为什么这么晚才发第二篇,上周和这周department的工作太多了,晚上都是十点半从公司出发,回家以后实在没有多余的精力去摸键盘了.所以请大家包涵! 上期回顾: chromium源码下载: 1. ...
- C#DateTime的用法
本文较详细地介绍了C#的DateTime对象的使用方法.DateTime.Now.ToShortTimeString() DateTime dt = DateTime.Now; dt.ToString ...
- 安装Apache(httpd服务)
安装Apache(httpd服务) ① 移动所有压缩包到root文件夹下(root的家) ② 解压httpd压缩包(.tar.gz) 使用tar指令解压.tar.gz压缩包 tar 指令 -zxf : ...
- 判断Featureclass的类型
一个Featureclass可以是Shapefile Feature Class.Personal Geodatabase Feature Class.File Geodatabase Feature ...
- Data Mining Resources
韩家炜 http://www.cs.uiuc.edu/~hanj/ 著名数据挖掘书籍,<数据挖掘概念和技术>作者,在DM界久负盛名.他的个人主页里面有很多他的papers,都非常经典:还有 ...
- C++ Bitsets
C++ Bitsets给程序员提供一种位集合的数据结构.Bitsets使用许多二元操作符,比如逻辑和,或等. Constructors 创建新bitsets Operators 比较和赋值bitset ...