外文翻译 中小型企业员工工作信息管理系统.doc

上传人:文库蛋蛋多 文档编号:3740675 上传时间:2023-03-18 格式:DOC 页数:5 大小:32KB
返回 下载 相关 举报
外文翻译 中小型企业员工工作信息管理系统.doc_第1页
第1页 / 共5页
外文翻译 中小型企业员工工作信息管理系统.doc_第2页
第2页 / 共5页
外文翻译 中小型企业员工工作信息管理系统.doc_第3页
第3页 / 共5页
外文翻译 中小型企业员工工作信息管理系统.doc_第4页
第4页 / 共5页
外文翻译 中小型企业员工工作信息管理系统.doc_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《外文翻译 中小型企业员工工作信息管理系统.doc》由会员分享,可在线阅读,更多相关《外文翻译 中小型企业员工工作信息管理系统.doc(5页珍藏版)》请在三一办公上搜索。

1、杭州电子科技大学毕业设计(论文)外文文献翻译 业 计 论 ) 目毕 设 ( 文 题 中小型企业员工工作信息管理系统翻译(1)题目 一种新的网络应用程序开发框架MVC翻译(2)题目 网站建设技术 学 院 计算机学院 专 业 软件工程 姓 名 黄品瑾 班 级 07052713 学 号 07057314 指导教师 闫飞译文一: 一种新的网络应用程序开发框架MVC摘要 MVCModel/View/Controller的设计模式出现在在Smalltalk-80并在软件的设计中广泛应用。本文介绍一种基于MVC框架的的新网络应用程序。这种框架把实施逻辑与表现形式独立开来。它也提高了系统的可维护性可扩展性以及

2、使用模块数据库备案、模板数据库通讯对象和缓冲队列的性能。关键词:MVC、设计模式、网络应用程序1.简介 网络应用系统是一个基于Browser/ Server模型应用系统。它利用多种动态网页开发技术。目前软件设计的主题之一是网络应用开发模式和工具的。它们直接影响系统的几个关键因素比如可维护性、可扩展性、稳定性和安全性。本文中,基于MVC1的网络应用程序的设计模式是为解决这两类因素扩展性和可维护性这些不易处理的问题。把MVC设计模式引入网络应用程序开发,执行逻辑可以独立于系统的表现形式。 MVC由三种对象组成。1模型:是应用对象,2视图:是它的屏幕的显示3控制器:定义用户界面并对输入的信息做出响应

3、。在出现MVC之前用户界面的设计倾向于把这些东西做在一起。然而MVC独立了它们,增加系统的灵活性和可重用性。MVC把视图和模型独立开来在它们之间建立了“subscribe/notify”协议。一个视图必须确保其正确反映模型的状态。每当模型的数据发生改变视图会得到相应的通知。作为回应每个视图都会有更新自身的机会。这个方法可以让你附上一个模型的多个视图以便提供不同的报告。你也可以不改变原模型同时创建新的视图。2.背景和存在的问题 虽然MVC的设计模式已经在smalltalk-80中提出了并广泛应用于软件设计介绍它到网页应用程序开发却仍很困难的。主要由于以下两个因素:1首先很难独立 来自HTML的编

4、程语言。早期的CGI程序使用字符串输出创造了HTML内容。默认的将HTML文本分成几份然后把他们嵌入到CGI程序中。脚本语言出现后变成了脚本语言编写的程序嵌入到HTML文本中。然而这两种方法有一个共同的不足使他们不能完全独立于HTML文本。因此这两种方法使采用MVC分离三层模式十分难以实现。2第二 Luo Guangchun the Ph.D. of UEST of China Wang Yanhua the Master of the UEST of China Lu Xianliang theprofessor of UEST of China advisor of Ph.D. Han H

5、ong the Ph.D. of UEST Of China脚本语言的功能太弱。他们缺乏一些必要的技术支持来采用MVC的设计模式如消息机制和事件回应机制。直到JSP Model2版这种情况并没有受到任何改善。依靠强大的Java语言功能JSP Model24某种程度上实行MVC设计理念。图 1显示了MVC的机制:模型数据层:它是封装到企业JavaBean。视图表示层:JSP负责的网页方式如报告的格式分页等。控制器控制层:Servlet受到网页上的用户的输入并执行有关的操作呼叫相应的EJB组件给出了相关视图所以JSP会呈现这些结果。 JSP Model2 机制主要 满足了开发商对要求 Web 应用

6、逻辑和用户界面独立 的需求。但制仍然存在某 些 限 , 例 如 尽 管 JSP Model2 已经实施采用 MVC 设计模式的基本理念,三 个层次之间的相互关系ServletJava Bean/ EJB 和 JSP仍然封闭。特别是就 Servlet 当控制器不仅控制选择同时响应模型的模块还负责对处理 JSP 转移数据提供模块。因为这一过程Servlet 本身已实现非常复杂的执行逻辑,对于体系的发展和维护这是正是一个棘手的问题。因此在下面的网络应用系统框架我们会进一步划分出功能的控制器。3.解决方案 图2中显示这一系统框架包含三个内核控制对象/类SYSController ModelCenter

7、 and LPMLogical Page Module Center 和 它 们 的 核 心 数 据 库 systemdescription database model database and LPM database。这三个控制对象/类根据原始的控制器划分。通过这些控制对象/类和数据库下文将解释部分的设计思想和该系统框架的实现机制。 首先我们考虑SYSController和系统的描述数据库。他们负责接收用户的要求和根据这些请求搜索有关的执行逻辑。系统描述数据库可以是一个XML2文件或一套XML文件。这个数据库描述了不同的执行逻辑与不同的用户请求。执行逻辑主要包括互动模式、数据来源与异常处

8、理等,这些组织在一个树形结构中。而SYSController可以搜索系统描述数据库。它结合了用户的要求和来自数据的执行逻辑然后把它们交给传输器来封装。SYSController有两种方法搜索数据库。 其一是使用DOM对象Document Object Model3。当应用程序系统开机这样需要DOM解析器分析整个数据库备案后载入内存。数据库将保留在内存中的DOM树结构。另一种是使用SAXSimpleAPI for XML接口。两者有各自的优缺点。使用DOM可以实现结构搜索。它可以在大型数据库上使用但是会暂用更多的系统资源。而SAX接口以高效率和更少的系统资源占用率著称。唯一的缺点是它获得信息比D

9、OM难。 其次我们考虑模型中心和模型数据库。该层通过调用给定模块完成定义执行逻辑。模型数据库包括大量的对象和模块。这些对象和模块根据特定的执行逻辑封装响应方法。当模式中心接收到的执行消息它根据封装在信息里的执行逻辑选择合适的对象或模块。然后按照给定的数据格式封装模块冰传输给LPM中心。此外每个对象或模块只需要关心如何实现给定的事务的逻辑以及如何获得必要的数据而不提交这些数据。 最后我们研究一下LPM中心和LPM数据库。LPM是实施描述的某一种数据类型的项目集合,它可以当成是一个或一组磁盘文件。在另一方面有一个网页可有一个逻辑页或多条逻辑页。一个LPM的功能是很简单的:它只需要在没有被得到执行逻

10、辑和原数据内容的情况下给定数据类型。因此事实上LPM是作为标签库JSP或数据捆绑.net而开发的。此外这种类型的服务器脚本可以很容易由客户开发人员在UIuserinterface设计阶段理解,what-you-see-is-what-you-get所见即所得工具也很容易开发。在这部分LPM中心从模型中心收到数据。它根据给定数据类型和执行逻辑选择适当的逻辑页模块然后封装逻辑页的输出模块到HTTP响应并将发布到客户端。注意到这3个控制对象除了SYSController另外两个不是直接进入自己的核心数据库。例如模式中心不直接从模型数据库调用对象或模块。它实现了通过ModelFactory的存取。(过

11、程见图2) 通过分析系统框架可以看出整个系统完全符合MVC设计模式。在在系统的开发时期各部分的开发者三者冰不具有相互的干涉。当系统框架已确定,各部分惊人的发现开发的相似。在过去这对网络应用程序的开发来说是不可能的。因为我们已经把控制器分为3个部分,MVC三层模型/视图/控制器的联系变得更加宽松。所以它可以明显提高整个系统的可扩充性。在下一节我们将向你展示一个简单的例子去解释如何在三层MVC模式的过程通过增加中间执行步骤扩大系统框架。4.相关问题 检查目前的网络应用程序设计模式如CGIJSP Model2等等,我们可以获得初步结果:MVC模式是一个优于其他系统逻辑框架的网站应用系统开发模式,它平

12、衡了合作开发、系统的可扩展性和可维护性。这主要由于旧设计模式对系统逻辑框架的独立性的不足之处。例如,在通过CGI开发的网页系统中,CGI程序不仅需要处理执行逻辑同时也负责系统报告的格式。因此,它要求开发者有很强的编程能力他们必须非常熟悉执行规划和界面设计。此外,它甚至会使系统的逻辑层次混乱。最后混沌编码会带来一系列的问题。使用服务器脚本语言如ASPPHP等等实现的网页应用系统也不符合要求。其原因是这些脚本语言都有天生的缺陷例如他们却没有有好的对象支持和事件响应机制等;他们不能令人满意地缩短网络应用系统的执行逻辑。由此JSP Model2的不足已在上文描述过了所以没有这个必要在这赘述了。5.结论

13、 从上述对系统框图的分析我们可以做一个结论。改进后的MVC设计模式框架比传统方法有更清楚的结构,每个模块间的联系甚少。框架解决是一个大问题曾困惑很多网络开发者。它将执行逻辑从表现模式独立出来,实施并行进行发展。此外利用模型数据库和LPM数据库,这个更系统的灵活性、可维护性和可扩充性得到了显著提高 。 本 篇 讨 论 的 框 架 已 经 在 UEST 网 络 应 用 系 统 上 得 以 实 施。参考文献1 Erich Gamma. Design Patterns. U.S. Addison-Wesley Pub Co.2 Didier Martin. Professional XML. U.K.

14、 Wrox Press.3 Stephen T. Mohr. Designing Distributed Applications with XML ASP IE5LDAP amp MSMQ. U.K. Wrox Press.4 Sun Microsystems Inc. JavaTM Servlet 2.3 and JavaServer PagesTM 1.2 Specfications.5 Sun Microsystems Inc. JavaServer PagesTM Standard Tag Library Specification原文一: A Novel Web Applicati

15、on Frame Developed by MVC Luo GuangChun WangYanhua Lu Xianliang Hanhong Information Center of UEST of China ChengDu China 610054AbstractThe MVC Model/View/Controller design pattern was developed in Smalltalk-80 andwidely used in software design. This paper introduces a novel Web application frame ba

16、sedon MVC. This frame separates the transaction logic from the presentation format. It alsoimproves the system maintainability scalability and performance by using the moduledatabase template database messaging object and buffer queue.Key words: MVC Design Pattern Web Application1. Introduction Web

17、application system is a transaction system based on B rowser/Server model. Itexploits many kinds of dynamic Web developing technologies. At present Web applicationdeveloping patterns and tools are one of the topics of the software design. They directlyinfluence several key factors such as maintainab

18、ility scalability stability and the security.In this paper the purpose of MVC1-based Web application design pattern is to resolvethe two factors maintainability and scalability which are the stubborn problems in theWeb application development. By introducing the MVC design pattern into the Webapplic

19、ation development the implementation of system transaction logic can be separatedfrom the system presentation. MVC consists of three kinds of objects. 1 the Model: is the application object 2 theView: is its screen presentation 3 the Controller: defines the way the user interface reactsto user input

20、. Before MVC user interface designs tended to lump these objects together.However MVC decouples them to increase the flexibility and reuse. MVC decouplesviews and models by establishing a “subscribe/notify” protocol between them. A viewmust ensure that its appearance reflects the state of the model

21、correctly. Whenever themodels data changes the model notifies views that depend on it. In response each viewgets an opportunity to update itself. This approach lets you attach multiple views to a Luo Guangchun the Ph.D. of UEST of China Wang Yanhua the Master of the UEST of China Lu Xianliang thepro

22、fessor of UEST of China advisor of Ph.D. Han Hong the Ph.D. of UEST Of Chinamodel to provide different presentations. You can also create new views for a modelwithout rewriting it.2. Background and Problems Even though the MVC design pattern was already put forward in smalltalk-80 andwidely used in

23、software design it is difficult to introduce it into the Web applicationdevelopment. It was mainly due to the following two factors: 1 First it was difficult toseparate the programming language from HTML. Early CGI programs created the HTMLcontent by using character string output. In nature it divid

24、ed the HTML content intoseveral portions and then inserted them into the CGI programs. After the appearance ofScript languages the way changed to insert the programs written by script languages intoHTML content. However these two ways had a common deficiency that they could notseparate the programs

25、from the HTML content absolutely. Therefore it is very difficult toimplement the MVC detached three-layer pattern based on these two ways. 2 Secondfunctions of the script languages are less weak. They lack some necessary technologies tosupport the MVC design pattern such as message mechanism and eve

26、nt responsemechanism. This situation did not get any improvement until the release of the JSP Model24. Depending on the powerful functions of Java language the JSP Model 2 implementsthe MVC design idea to some extent. Figure 1 shows the mechanism: Model the data layer: it is encapsulated into the En

27、terprise JavaBean. View the presentation layer: JSP is responsible for the presentation of pages such as the presentation format paging etc. Controller the control layer: Servlet receives the user input in pages and executes the relevant transaction calling the corresponding EJB modules then gives t

28、heresults to the relevant View so JSP can present these results. This mechanism of JSP Model 2 basically meets the developers requirements todetach the Web application transaction logic from the user interface. But some limits stillexist. For example although JSP Model 2 has implemented the basic id

29、ea of the MVCdesign pattern the relationship of these three layers Servlet JavaBean/EJB and JSP isstill close. Especially the Servlet which acts as the Controller not only controls theselection and call of Models modules but also is responsible for transferring data providedby modules to the corresp

30、onding JSP to handle. Because of this process Servlet has toimplement very complicated transaction logic by itself which is a tough problem for thesystem development and maintenance. Thus in the following Web application systemframe we will further divide the functions of the Controller.3. Solution

31、As show in Figure 2 this system frame contains three kernel control objects/classesSYSController Model Center and LPM Logical Page Module Center and their ownkernel database system description database model database and LPM database. Thesethree control objects/classes are divided from the raw Contr

32、oller. Using these controlobjects/classes and databases the following parts of this paper will explain the design ideaand implementation mechanism of this system frame. Firstly we consider the SYSController and the System Description Database. Theyare responsible for receiving the user requests and

33、searching the relevant transaction logicaccording to these requests. The System Description Database can be a XML2 file or aset of XML files. This database describes the different transaction logic related to differentuser requests one by one. The transaction logics mainly include the interactive mo

34、de datasources and error handling etc. They are organized in a tree structure. The SYSControllersearches the System Description Database. It combines the user requests and thetransaction logic searched out from the database and then delivers them to Messenger toencapsulate. There are two ways for SY

35、SController to search the database. One uses theDOM Document Object Model object3. When the application system boots this wayrequires the whole database to be loaded into RAM after analyzed by the DOM Parser. Thedatabase resides in the RAM in a DOM tree structure. The other one uses SAX SimpleAPI fo

36、r XML interface. Both of them have their own advantages and disadvantages.Using DOM can implement structural search. It can achieve the efficiency in the case oflarger database but it also costs more system resources. The SAX interface is famous forits high efficiency and less system resources requi

37、rements. The only disadvantage is that itobtains some information less conveniently than the DOM does. Secondly we consider the Model Center and Model Database.This layer completesthe defined transaction logic by calling the given module. Model Database contains a massof objects and modules. These o

38、bjects and modules encapsulate the responding methodsrelative to specific transaction logic. When Model Center receives the transaction messagesfrom Messenger it selects suitable objects or modules according to the differenttransaction logic encapsulated in the message. Then it encapsulated the handled data ingiven format and delivers them to the LPM Center. Furthermore each object or moduleonly needs to concern.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教育教学 > 成人教育


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号