《javaee简洁模式设计及其在网络游戏管理系统中应用》由会员分享,可在线阅读,更多相关《javaee简洁模式设计及其在网络游戏管理系统中应用(75页珍藏版)》请在金锄头文库上搜索。
1、国内图书分类号:TP393.4国际图书分类号:621.3工学硕士学位论文Java EE 简洁模式设计及其在网络游戏管理系统中应用硕士研究生: 导 师:申 请 学 位:学 科 、 专 业:所 在 单 位:答 辩 日 期:蒋伟 陈清财副教授工学硕士计算机科学与技术深圳研究生院2007 年 12 月授予学位单位: 哈尔滨工业大学哈尔滨工业大学工学硕士学位论文Classified Index: TP393.4U.D.C: 621.3Dissertation for the Master Degree of EngineeringJava EE CONCISE MODEL DESIGN ANDITSI
2、APPLICATION IN ONLINE GAMEMANAGEMENT SYSTEMCandidate: Supervisor:Academic Degree Applied for:Specialty:Affiliation:Date of Defence:Degree-Conferring-Institution:IIJiang Wei Associate Prof. Chen QingcaiMaster of EngineeringComputer ScienceShenzhen Graduate School December, 2007Harbin Institute of Tec
3、hnology哈尔滨工业大学工学硕士学位论文摘要B/S(Browser/Server)是随着 Internet 技术兴起的,是对 C/S(Client/Server)模型的一种改进。它有着开发、使用成本低,维护和升级简单的特点。B/S的 Java EE 框 架 的 特 点 非 常 适 合 开 发 大 规 模 的 工 程 。 本 文 以 MVC(Model-View-Controller)三层 结构 为核 心, 设计 出一 套从 表示 层 ,逻 辑层 到持久层的 Java EE 开发模式。本 文 首 先 对 两 种 流 行 的 Java EE 框 架 Servlet-JSP-EJB 和Struc
4、ts-Spring-Hibernate 优 点 和 缺 点 进 行 了 讨 论 , 经 过 比 较 设 计 出JSF-EJB3.0 的简洁开发模式。通过三种模式的对比可以看出 JSF-EJB3.0 是简洁快速的。JSF-EJB3.0 模式以 JSF 和 EJB3.0 为主干,并在表示层,逻辑层和持久层搭配以合适的技术和思想。在表示层,这个模式改变传统的页面提交方式,而采用异步的提交方式。实现方式为应用 Ajax(Asynchronous JavaScript and XML)技术。其次,采用SimpeTag 技术使表示层的开发更加简洁,并以此技术为基础实现权限系统的第一部分。最后,结合 JSP
5、(JavaServer Pages)中优秀的部分,如 JSTL(JSPStandard Tag Library)等,以此弥补 JSF 功能少的弱点。在逻辑层,使用 AOP(Aspect Oriented Programming)的方式实现权限系统的第二部分,结合在表示层设置的 SimpeTag 页面拦截共同组成一个完整的权限系统。这种权限系统实现简洁,逻辑清晰,维护方便。在远程调用方面,摒弃以往的 RMI,而改使用 Web Services,从而解决了跨语言平台的交互的问题。政府新出台的大型多人在线防沉迷系统就需要用这种远程调用方式。在持久层,提出使用数据库来分担逻辑层的部分功能。这样就改进了
6、传统 WEB 的 MVC 模型,也解决了传统模型面对海量数据时处理时出现的空间和时间紧张的问题。并充分利用数据库处理数据的能力,给整体性能带来极大的提升。最后介绍使用这种方法开发网络游戏管理系统,这套系统可以实现从以游戏开发 到游戏 运营 的管理的 各项功 能。 使用的开 发方法 就是 JSF-EJB3.0模式,使开发周期从预计的 1 年缩短到 8 个月。关键词 B/S;Java EE;MVC;JSF;AjaxI哈尔滨工业大学工学硕士学位论文AbstractB/S (Brower/Server) is booming with the Internet technology and is an
7、improved model for C/S (Client/Server). It has the properties of low cost ofdevelopment and use, simple maintenance and easy upgrade. Java EEframework of B/S is more suitable for large-scale development projects. In thispaper, based on MVC (Model-View-Controller) structure, the developmentmodel of J
8、ava EE which is from layer of view, logic and persistence is designed.In this paper, the two popular Java EE frameworks, Servlet -JSP-EJB andStructs-Spring-Hibernate are discussed; based on which, a simpler and fasterJSF-EJB3.0 development model is designed. Through contrast of these threemodels, it
9、 can be seen that JSF-EJB3.0 is relatively conciser and faster.JSF-EJB3.0 model is mainly made up of JSF and EJB3.0 with appropriatetechnologies and ideas in view layer, logic layer and persistence layer.In the view layer, the model changes the original submit mode into anasynchronous one. The imple
10、mentation is using Ajax (Asynchronous JavaScriptand XML). By using SimpleTag, the model makes the view layer simpler. Thefirst part of authority system is achieved with this technology. In this way, theexcellent part of JSP (JavaServer Pages), such as JSTL (JSP Standard TagLibrary), makes up the wea
11、kness in functions of JSF.The logic layer uses AOP (Aspect Oriented Programming) to achieve thesecond part of authority system. Combining with the blocking at the view layerby SimpleTag, the whole authority module is integrated. This kind of authoritysystem is concise to achieve, convient to maintai
12、n with a clear logic. Thismodel uses Web Services for remote calls instead of traditional mode RMI. Themode solves the problem of cross-language platform interaction. Thegovernment introduced massive multiplayer online game anti-obsession systemrecently based on this mode of remote call.In the persi
13、stence layer, this paper proposes to use database to share someof the logic functions, to improve the traditional WEB-MVC model, and tosolve the lack of space and time traditional model faces with a deluge of dataprocessing. Database data processing capabilities improves the overallII哈尔滨工业大学工学硕士学位论文
14、performance.Finally, the paper introduces the online game management system whichhas the function of game development and operation. Using the mode ofJSF-EJB3.0, the development cycle is shorted from one year to eight months.Keywords B/S, Java EE, MVC, JSF, AjaxIII哈尔滨工业大学工学硕士学位论文目录摘要 . IAbstract . II第 1 章绪论 .11.1 课题来源 .11.2 本课题研究的目的及意义.11.3 B/S 的开发模型 .21.4 JAVA EE 和.NET 的区别 .21.5 JAVA EE 的 MVC 三层技术 .