期刊文献+

基于模板的.Net三层架构的代码自动生成 被引量:10

Automatic Code Generation Based on Template on.Net Framework of Three Layers Architecture
下载PDF
导出
摘要 三层架构是数据库开发中最常用的分层架构。三层结构能够提高代码重用率,降低项目开发难度。为了解决手工编写三层架构的代码工作量大且容易出错的问题,使用.Net平台提供的动态编译和反射技术,设计并实现了基于可定制模板的自动代码生成器。该代码生成器利用三层架构的代码依赖数据库的架构信息这一特点,以数据库架构信息、Xml配置文件和模板文件作为输入,输出三层架构的各层代码。用户可以修改Xml配置文件的内容和使用该代码生成器提供的模板语言定制、修改自己的模板文件,方便、灵活地控制输出的目标代码。代码生成器的使用在实际的项目开发中具有重要的意义。 Three layers architecture is the most commonly used layered structure in database development. Three layers structure can im- prove code reuse rate and reduce the difficulty of project development. In order to solve the problem that manual programming code of three layers architecture is a big workload and easy to make mistake, using dynamic compile and reflecting technique provided by the. Net platform designs and realizes the automatic code generator that based on the customizable template. The code generator uses this feature that the code of three layers structure relies on the structure of the database information. Taking database schema information,Xml config- uration flies and template files as input, the code generator produces the code of three layers architecture as output. Users can change the content of the Xml configuration files, and can customize, modify their own template files by using template language provided by the code generator,conveniently and flexibly controlling the output of the object code. In practical project development the use of code gener- ator is of great significance.
出处 《计算机技术与发展》 2012年第8期13-16,共4页 Computer Technology and Development
基金 贵阳市2010年重大科技专项项目([2010]筑科工合同字第6-01号)
关键词 自动代码生成 三层架构 可定制模板 元数据 内置模板 automatic code generation three layers architecture customizable template metadata built-in template
  • 相关文献

参考文献13

二级参考文献40

共引文献37

同被引文献64

引证文献10

二级引证文献26

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部