网站导航免费论文 原创论文 论文搜索 原创论文 网学软件 学术大家 资料中心 会员中心 问题解答 原创论文 大学论文导航 设计下载 最新论文 下载排行 原创论文
返回网学首页
网学联系
最新论文 推荐专题 热门论文 素材专题
当前位置: 网学 > 编程文档 > 其他类别 > 正文

Java代码框架自动生成技术的研究

来源:http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 16/02/12

鉴于大家对其他类别十分关注,我们编辑小组在此为大家搜集整理了“Java代码框架自动生成技术的研究”一文,供大家参考学习

论文字数:17008,页数:60  有开题报告,任务书

摘    要
    现代软件项目的规模日益扩大,要完成一个的软件项目通常需要数万行的代码量,这种现象造成的直接后果是程序员的编码量普遍增大.编码量增大的同时有许多重复的工作需要程序员来完成,比如根据关系数据库中表的字段来编写实体类,编写添加、修改、删除、查询数据库表的操作。这种重复性工作很容易导致编码错误,如果能够有一个自动化的生成工具来生成这些重复性代码,则不但能够降低程序员的工作强度,而且能够降低编码的错误率提高编码的规范性。
    本文描述一个应用程序的实现过程,该程序能直接将数据模型转化为Java代码,数据模型可来源于通用的设计工具所产生的设计结果如数据库模式,XML数据模式。同时,系统按照用户业务规则层以及数据访问层实现比较完整的O-R映射.数据库中的所有逻辑对象表,列,字段,主键,外键,Null,Default,唯一索引在类里得到了体现, 在生成的过程种可以灵活的定义生成参数。
    本设计结合经典案例Pet shop中工厂模式、反射机制等设计思想,实现从数据库的表或XML数据文件自动生成业务实体类以及基本数据访问操作等典型代码,包括生成属性,添加,修改,删除,查询,Model 类构造等基础代码片段。
    本设计使用VS2005,实现语言为C#,用户界面为Windows Form类型。设计支持数据库和XML文件两种类型的数据源,软件通过读取数据源在后台类中产生Java代码。
    本设计的最终成果为CodeFactory1.0软件,该软件能够生成从Model层到BLL层的Java代码,各层之间的关系以工厂设计模式进行组织。这种模式可以有效降低代码的编写量。

关键词 :工厂模式,工厂类,反射机制,Model类,业务实体类

Abstract
    Nowadays the software project is becoming larger and larger, and it need thousands lines of coding to accomplish. It directly result that programmer’s work is heavier, besides there are a lot of duplicated works taken by programmer, For example, make model class, make add, update, select and delete methods base on the fields in database tables. The duplicated works result in mistakes easily. So we can reduce programmer’s work, and pull down the rate of mistakes in coding through the improvement of regulation in coding if we get an automatic tool to generate these duplicated codes.     
    This graduate design will implement an application that is able to turn data model into Java program code directly, the data model may come from the design result that is produced by the general design tools such as database model, xml data model. Meantime, the application implements a digit O-R relationship with BLL layer and DAL layer. All the tables in database, columns, field, primary key, foreign key, Null, Default, and unique index in the tables, is displayed in the class, and it allows you to set parameters during the process of producing code.
    The design relies on the classic design of Pet shop which is a kind of factory design model and reflect model. It has the ability that produce Model class and basic DA Code according to tables from databases or xml data files, including producing properties, producing add, update, delete, select code.
    The design is implemented with VS2005, using C# language and windows form. It supports Sqlserver database and xml data file as data source, and the software produce Java code through the background class according to data source.
    The design finally results as CodeFactory1.0, the software can produce Java code from Model layer to BLL, and the relationships among all layers are conducted in factory design model, it can reduce the work intensity of programmer effectively.

Key Words :Factory Model, Factory Class, reflect model, Model Class, BLL Class
目   录

1.绪论 1
1.1 研究背景 1
1.2研究现状及发展趋势 2
1.3 开发方法 2
1.3.1 开发方法概述 2
1.3.2 本系统开发方法选择 4
1.4 本文结构 4
2 相关技术介绍 5
2.1 JAVA中的反射类机制 5
2.1.1 反射的概念 5
2.1.2 JAVA中的反射类 6
2.1.3 反射性能 8
2.2 简单工厂模式 9
3. 系统规划 11
3.1 系统初步调查 11
3.2 设计的可行性,有效性 11
3.2.1 系统可行性研究 11
3.2.2 系统有效性研究 11
3.3功能需求分析 12
3.4总体设计方案 13
3.4.1 各部分功能 13
3.4.2 安全性 14
3.4.3 稳定性 14
3.4.4 容错能力 14
3.5 系统的基本功能 14
3.6 设计过程 14
3.7 系统数据流分析 15
3.7.1 数据流图简介 15
3.7.2 CodeFactory1.0 数据流图 16
4. 系统设计 17
4.1 总体设计 17
4.1.1 系统模块结构图 17
4.1.2各模块功能简介 19
4.2 详细设计 22
4.2.1 数据源配置模块 22
4.2.2 数据源读取模块 23
4.2.3 参数收集模块 24
4.2.4 代码处理和生成模块 25
4.2.5 代码文件输出模块 28
5. 系统测试 34
总结 41
致谢 42
参考文献 43
附录 44

Java代码框架自动生成技术的研究......
  • 上一篇资讯: [其他类别]
  • 版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号