LindAgile.Modules模块化的设计
在LindAgile中有一个比较主推的技术,就是模块化,一切组件都可以被抽象成一个小小的模块,而每个小模块的实现可能又有多种方式,如日志模块可以有LindLoger,Log4net等实现,而具体在程序中使用哪种方式,是否由模块的注册顺序决定的,在程序初始化时,一切会注册这些模块,一个日志模块,如果先注册了log4net,后注册了lindLogger,那种先注册的将会被覆盖。
日志模块-图示
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAboAAAB2CAIAAAAxyMGpAAAQTklEQVR4nO2c61MTWcLG50/pPyV+Y76lig9TtfjWvrVlCVtjEXMDZoZBZ9xkRFx0VIIuJMvFcBGEQYIEnSGLIrkAIUHmYo0KaiQdkmj5qmwN1FS/HzrEXDqkid10n9PPr54P7Um6czgP5zfdoPMJBwAAQASfKD0BAAAgA+gSAABEAV0CAIAooEvNEUu9nwy9aOpdbupd/qx1rtruQ6rtPn5B+mefrLNvla4IqBToUluMzG/UOQJN16Pt00+uzj53B9nRpa2by1rPYChxdfb59zNPm4fWah2B9omf3/13V+mugOqALrVCLPXe7FxsHnzYuxCfiKSmH6Zn1l4hBbkVSbmDrG380edXg49ib5QuDagL6FITrLNvj1/xX/Q+HQolbq++8j5ESmZ69dXI0lan7/nn14Jrz14rXR1QEdAl/ezs/mlyLl6+uzEWTk4/fIWIya1ouuvei9oOP57KQRbokn7c/3l6anhtKMTeXk0j4nMznLSNP2qf+FnpAoFagC4pJ5Z6X+cI9C5seqLKC4i4DATZE/8K4ZEc8ECXlDM0t948uDYWTk6tppGDZiKSOjP224WJX5SuEagC6JJymnqXL3qfTEbTnlWkkjjvx45dWlC6RqAKoEvKOXZpwXU/5ommZEyPlcmgt86kPDOdRxhrm6yfeIgZXkxU231K1whUAXRJOZ+1zg0E2cloSt7MdB5hrOeKj8nP6PIWdAl4oEvKqbb7hhYTtyIpeePt1DHW1uLjvDfw5L7kOcpkyY7vP5j3KWabnmGYoz0yfmmjy0noEvBAl5RTbfcNK6/LqPnTjNRcNj1T5ykYzDlF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OkytrfX19Ut6942xt502VvIjCuSAxocfzrU5/vzr70ybZ7vh1qHOxkp+RIFsI7wORWnr1z/+W3bb2jr1SfKProFs0/F8+WSzfYH9PdPOyUAi61DygwpkG+F1KEpb6+vrz+bZ060zMNfOpuP5cmWn655tMXOqyXDC63D6k+TnpCB7pFyHYrW1vr4+4V4uu229MfaWK5UAO4m7lmXVo4+nWhw0O4tLZB1KbnmQcbTi1mEa2lpfX//1j/9e0rsrO13XjL/ctfq13DMBecK9dncty/Xj7y90zZ1sZt74ftueUnIUrMOdxBbWYXra4vJ4zl/dOyd5lRPIFIo2h9G+ROF78MLBOtxhiF+HW9EWgiCIhIG2EASRWaAtBEFkFmgLQRCZBdpCEERmgbYQBJFZ/h98XRN7vODl2gAAAABJRU5ErkJggg==" alt="" />
模块化的入口
对于模块的扩展,大叔建议在具体项目添加扩展方法,事实上在lindAgile框架里也提供了一些标准的扩展方法,方便大家对模块进行注册!
#region 模块化
ModuleManager.Create()
.UseAutofac()
.UseLindLogger()
.UseEfRepository()
.UseDefaultMq()
.UseESBRedis()
.InitAllPlugins();
#endregion
而对于使用来说,直接可以使用Module的Resolve来生产指定接口的指定对象,非常方便!
var old = PluginManager.Resolve<IAopHelloTest>();
var result = old.GetLogger("bobo");
上面的代码中,我们使用的是LindAgile的面向切面的方法缓存,将方法的返回值进行缓存,一个缓存的失效由另一个方法来控制,而不是传统上的时间!
public interface IAopHelloTest : IAspectProxy
{
List<WebLoggers> GetLogger(string name);
void AddLogger(WebLoggers entity);
}
public class AopHelloTest : IAopHelloTest
{
[CachingAspect(CachingMethod.Get)]
public List<WebLoggers> GetLogger(string name)
{
return new Tsingda_Prizes_ManagerEntities().WebLoggers.Take().ToList();
}
[CachingAspect(CachingMethod.Remove, "GetLogger")]
public void AddLogger(WebLoggers entity)
{ }
}
这种设计在Lind框架中也有出现过,只是在LindAgile里把它完善了,再配合模块化,插件化等组件,能得数据集缓存达到了前所末有的高度!
我不要复杂的设计
我不要过重的设计
我只要简洁的,松耦合的实现!
LindAgile.Modules模块化的设计的更多相关文章
- Slickflow.NET 开源工作流引擎基础介绍(六)--模块化架构设计和实践
前言:在集成Slickflow.NET 引擎组件过程中,引擎组件需要将用户,角色等资源数据读取进来,供引擎内部调用:而企业客户都是有自己的组织架构模型,在引入模块化架构设计后,引擎组件的集成性更加友好 ...
- 12. 前后端联调 + ( proxy代理 ) + ( axios拦截器 ) + ( css Modules模块化方案 ) + ( css-loader ) + ( 非路由组件如何使用history ) + ( bodyParser,cookieParser中间件 ) + ( utility MD5加密库 ) + ( nodemon自动重启node ) + +
(1) proxy 前端的端口在:localhost:3000后端的端口在:localhost:1234所以要在webpack中配置proxy选项 (proxy是代理的意思) 在package.jso ...
- Lind.DDD.DynamicModules动态模块化的设计
回到目录 在Lind.DDD框架里有Module,主要用于全局自动添加的模块,它类似于ABP系统里的Module,但有时过于自动化了可能使系统太死板,而有时将需要的模块手动载入可能对我们更合适,所以大 ...
- YII的Modules模块化
转载来源: http://blog.csdn.net/mengxiangbaidu/article/details/7041296 http://blog.csdn.net/colzer/articl ...
- react antd样式按需加载配置以及与css modules模块化的冲突问题
通过create-react-app脚手架生成一个项目 然后运行npm run eject 把webpack的一些配置从react-scripts模块弹射出来, 方便自己手工增减,暴露出来的配置文件在 ...
- NuGet 本地服务器 公司组件库搭建 上传下载操作 模块化灵活设计
新年第一更,关于如何搭建NuGet的本地服务器,以及部署IIS,以此搭建公司自己的组件仓库,方便所有的组件更新,管理,测试等等操作. 关于如何在NuGet中下载指定的组件,参考这篇文章:http:// ...
- css模块化及CSS Modules使用详解
什么是css模块化? 为了理解css模块化思想,我们首先了解下,什么是模块化,在百度百科上的解释是,在系统的结构中,模块是可组合.分解和更换的单元.模块化是一种处理复杂系统分解成为更好的可管理模块的方 ...
- 【Nginx】模块化设计
高度模块化的设计是Nginx的架构基础.全部模块都是以ngx_module_t结构体表示,该结构体内部定义了7个回调方法.它们负责模块的初始化和退出.commands成员是一个包括有ngx_comma ...
- thinkphp 模块化设计
一个完整的ThinkPHP应用基于模块/控制器/操作设计,并且,如果有需要的话,可以支持多入口文件和多级控制器. ThinkPHP3.2采用模块化的架构设计思想,对目录结构规范做了调整,可以支持多模块 ...
随机推荐
- 结合ThreadLocal来看spring事务源码,感受下清泉般的洗涤!
在我的博客spring事务源码解析中,提到了一个很关键的点:将connection绑定到当前线程来保证这个线程中的数据库操作用的是同一个connection.但是没有细致的讲到如何绑定,以及为什么这么 ...
- 发散问题——Spring容器及加载
一.前言 发散问题系列,是围绕日常工作,发散思考,提取问题,并寻求答案的一个系列.总的来说,就是将遇到的问题发散来提出更多的问题,并通过解决发散问题,从而对问题有更深入的了解,对知识有更深刻的记忆,帮 ...
- Html 经典布局(三)
经典布局案例(三): <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...
- Divide Groups(分组)
题目链接 题目大意是说输入数字n 然后告诉你第i个人都认识谁? 让你把这些人分成两堆,使这每个堆里的人都互相认识. 做法:把不是互相认识的人建立一条边,则构建二分图,两堆的人肯定都互相认识,也就是说, ...
- 移动设备真机调试本地程序的Node.js【无需连wifi】
前提: 在某些场景下,我们需要调试我们的Node.js,这很简单,很多编辑器都集成了debug模式,但是某些场景下,我们想在移动设备上运行,在本地debug,这也行,只需要链接在同一个内网,通过ip ...
- php7 redis扩展编译安装
提示:php7版本不支持redis2点几的扩展 上正文: wget -c https://github.com/phpredis/phpredis/archive/php7.zip unzip php ...
- zabbix主动上报的python脚本
本代码linux.window平台通用. 不过我遇到一个Windows2008缺少运行库的提示,可能这个是Python3.6开发的.需要安装vc2015运行库吧.我没调试成功. linux平台还可以监 ...
- 10个漂亮的jQuery日历插件下载【转载】
10个漂亮的jQuery日历插件下载 2013-08-07 标签:jQuery日历插件jQuery日历jQuery插件 日期是非常重要的,随时随地.微薄或网站的日期选取器日历必须在那里.您可以使用 ...
- AspNetCore-MVC实战系列(二)之通过绑定邮箱找回密码
AspNetCore - MVC实战系列目录 . 爱留图网站诞生 . AspNetCore - MVC实战系列(一)之Sqlserver表映射实体模型 . AspNetCore-MVC实战系列(二)之 ...
- hdu5145 NPY and girls
人生中第一道莫队,本来以为是一道水题的.. 首先这题只有区间查询,没有修改操作,使用莫队比较明显,但统计答案有点麻烦.. 根据题意,在n个人里选m个不相同种类的人,设第i种人数量为ai,总方案为c(n ...