软件代码生成之Codesmith模板.netTiers

          .netTiers模板到二〇〇六年就出生了,
到今日最后三回立异是12/17/2013, 援救.NET 4.5 and Visual Studio 2012 and
2013.
netTiers是根据微软公司库的模板项目.
在前几天种种PC端应用软件横行天下,
使用代码生成工具来增强开发效用是常事的事儿.  netTiers构架设计是那般的:

图片 1

运行codesmith时,是这么的:

图片 2

上图能够配备数据库与表,是或不是生成UnitTest,WebService, 数据证实的类库,
CRUD选项 ,基于微软公司库5.0, 如今协理SQL SERVER与Oracle

变迁完后,会生成report.html,  最后生成VS2013的化解方案与类型:

图片 3

地点有Service Layer, Web瑟维斯, UnitTest, WinForm, 还有老式WebSite,
可惜不是MVC的前端. 但实在稍加调整就足以了.

对此开发过N-Layer项目标你, 对那几个不难明白.

其中Data Layer的基类UML:

图片 4

 

类型中涉及的有关格局参考

ServiceLayer

http://martinfowler.com/eaaCatalog/serviceLayer.html
Processors
By default is a Pipeline:
http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html
but easily can be used with workflow management in:
http://www.enterpriseintegrationpatterns.com/ProcessManager.html
Each Individual Processor uses a:
Command
http://www.dofactory.com/Patterns/PatternCommand.aspx
Flexible enough to be used within a strategy passed into the ctor to
manage different behaviors in complex logic.
http://www.dofactory.com/Patterns/PatternStrategy.aspx
DomainModel + ActiveRecord
http://martinfowler.com/eaaCatalog/domainModel.html
http://martinfowler.com/eaaCatalog/activeRecord.html
Edit)/Edit.aspx?Page=Introduction&Section=12)

Data Access Layer

Singleton, Decorator
http://msdn2.microsoft.com/en-us/library/ms998426.aspx
http://www.dofactory.com/Patterns/PatternDecorator.aspx
Data Transfer Objects:
http://martinfowler.com/eaaCatalog/dataTransferObject.html
Repository Provider:
http://davidhayden.com/blog/dave/archive/2004/05/19/259.aspx
Edit)/Edit.aspx?Page=Introduction&Section=13)

Entity Layer

Each EntityMemento, State, DomainModel,
TableModule
http://www.dofactory.com/Patterns/PatternMemento.aspx
http://www.dofactory.com/Patterns/PatternState.aspx#_self2
http://martinfowler.com/eaaCatalog/domainModel.html
http://martinfowler.com/eaaCatalog/tableModule.html
Entity Factory
http://www.dofactory.com/Patterns/PatternFactory.aspx
WebService Client – Proxy
http://www.dofactory.com/Patterns/PatternProxy.aspx
Sql Expression – Builder
http://www.dofactory.com/Patterns/PatternBuilder.aspx

越来越多介绍参考)/Introduction.ashx),
官方网站,
源代码
由于篇幅有限,明日先介绍到那儿.

 

您或许感兴趣的篇章:

nettiers系列

Repository
Factory介绍

 

如有想打听愈多软件开发资讯,请关怀本身的微信订阅号:

图片 5

 

作者:Petter Liu
出处:http://www.cnblogs.com/wintersun/
正文版权归小编和天涯论坛共有,欢迎转发,但未经小编同意必须保留此段表明,且在小说页面显著地点给出原文连接,否则保留追究法律权利的职责。
该文章也同时宣布在我的单身博客中-Petter Liu
Blog

相关文章