当前位置:论文写作 > 论文大全 > 文章内容

文献综述内容

主题:欧洲卡车模拟2档案 下载地址:论文doc下载 原创作者:原创作者未知 评分:9.0分 更新时间: 2024-02-27

简介:关于档案模拟方面的论文题目、论文提纲、档案模拟论文开题报告、文献综述、参考文献的相关大学硕士和本科毕业论文。

档案模拟论文范文

欧洲卡车模拟2档案论文

目录

  1. 欧洲卡车模拟2档案:2013广西金蝶KIS专业版教学视频工资管理人员档案考试题

文献综述内容

   (包括国内外现状,研究方向,进展情况,存在问题,参考依据等)

   学生档案管理系统

   1.引言

   档案管理是一项重要性的工作,在不同的历史时期产生了不同的,相对于当时最完备的档案管理技术与管理制度.近代档案学已经是一门完善的,体系严密的科学.虽然档案学面临信息化的冲击与挑战,但是论文范文档案学尚未产生,档案管理信息化还存在大量未解决的难题.因此,处理好档案管理信息化中的管理创新和原有档案管理制度之间的矛盾是目前面临的问题.

   随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用.计算机技术的迅速发展和广泛应用,电子文件和电子档案在国内外都已普遍存在,档案资料的数字化,光盘存储,计算机管理和网上检索查询利用是档案管理发展的必然趋势.作为计算机应用的一部分,使用计算机对学生档案信息进行管理,具有手工管理所无法比拟的优点.例如:检索迅速,查找方便,可靠性高,存储量人,保密性好,寿命长,成本低等.这些优点能够极大地提高学生档案管理的效率.

   学生档案管理系统是一个教育单位不可缺少的部分,它的内容对于学校的决策者和管理者来说都至关重要,所以学生档案管理系统应该能够为用户提供充足的信息和快捷的查询手段.但一直以来人们使用传统人工的方式管理文件档案,这种管理方式存在着许多缺点,如:效率低,保密性差,另外时间一长,将产生大量的文件和数据,这对于查找,更新和维护都带来了不少的困难.因此开发一套合理可行的学生档案管理系统是具有非常现实的意义.

   2.国内外现状

   与发达国家相比,我国将新兴计算机技术引入学生档案管理领域起步晚,应用程度较为滞后,目前主要用于案卷的总体管理.随着计算机技术的发展和普及,档案存储电子化已成为必然趋势.

   随着近年教育事业的大发展,各院校不断扩招,档案信息量剧增,电子文件的大量出现,传统档案管理手段已不能适应新形势,现代化管理势在必行,档案部门必须加强自身现代化建设,才能与学校改革发展相适应,才能及时,准确,高效地管理好学生的档案信息资源.

   由于历史的原因,目前高校档案管理方面存在设施落后,原始资料不齐甚至无档,信息未及时归档甚至不归档等现象.虽然近几年有较大的改观,但与高等教育改革和发展的需要还很不适应.目前高校学生档案管理,从档案材料收集,整理,鉴别,编排,装订,保管,利用,均依赖传统的手工操作技术,保管条件和保管技术简陋单一,与科学化,现代化的要求差距甚大,很难适应高校形势发展的需要.因此大力发展高校学生档案管理工作中的计算机技术是当前的一个重要课题.

   3.研究方向

   3.1数字化

   创建无法篡改的,完整的数字化学生档案系统不但可以简化学校对学生档案的管理,还可以防止人为的销毁档案,提高学生档案的可信度.数字签名是论文范文签名的模拟,有如下性质:

   能够证实是作者本人的签名以及签名的日期和时间

   在签名时必须能对内容进行鉴别

   签名必须能被第三方证实以便解决争端

   如何在容易修改的环境下创建难以修改的文档是建立学生档案管理系统的关键.上世纪70年代,美国斯坦福大学的两名学者DiSc和Hellman提出了公钥论文范文系统,其目的是实现在不安全的信道中信息的安全传送.其基本思想是给出两个可逆的变换,一个称为私钥,一个称为公钥,由公钥加密的密文只有通过私钥才能论文范文,同样由私钥加密的密文只有通过公钥才能论文范文,通过公钥推出私钥是困难的.我们可以利用相同的方法来管理学生的档案.首先找到一对合适的密钥,向社会公布自己的公钥,保留自己的私钥(保密).用私人密钥加密学生档案对外发布,经加密的档案任何人都可以用公钥解密.这样既实现了学生档案信息的共享,又有效地保证了学生档案的原始性,真实性和完整性.

   3.2网络化

   以计算机网络技术和多媒体通讯为基础,将全球各地的人们联结在一起,组成一个集各部门,各领域的各种信息资源为一体,供网上用户共享的数据网.档案信息一旦进人信息高速公路,与国际交互网Inter相接,即能成为资源的海洋.网络信息化下的档案信息,主要包括数字档案馆和各类档案网站,网页,其所面向的对象已不再局限以往的服务于领导决策,服务于学术研究的狭小范围,而是整个互联网.

   随着社会不断发展,学校档案室势必也要走网络化道路,要保证网络上所有成员都能自由进行信息交换,实现信息资源共享.这就要求档案工作者在网络化信息时代,不仅要懂档案专业知识.还要精通网络技术,多媒体技术及具备信息处理分析能力 有人认为,未来的档案工作者,要同时充当档案信息工程师,信息决策专家,信息教育家三重角色.未来的档案工作者不仅要运用网络为用户提供档案信息,还要选择适当的信息站,并使用适当的检索方法,找出适当的信息提供给适当的用户,因而信息决策判断正确是档案工作者所必须具备的能力.另外,未来检索人员的工作将由检索服务转变为指导检索,也就是指导使用者如何更有效地联机,输人检索指令及操作计算机.

   4.存在问题

   实现科技档案管理的数字化管理,并不意味着废弃对传统科研档案原件的*与保管工作.一些档案原件(如科研人员的手稿,科学实验的原始记录等)是极为珍贵的文献,管理者除了应对其进行专业技术性加工保存或呈送上级档案馆*之外,还应利用现代科技手段(如声像技术)输人计算机,使之转化为电子文档.同时档案格式必须标准化;当电子档案仍然以主机电脑产生的数据,数据库,文字,图形为主的时候,档案人员是可以把格式进行标准化的 要实现档案信息在网络环境下的共享,标准化是必不可少的前提.加强电子档案利用中的标准化体系是提供网络档案利用服务的前提和基础 这一标准化体系应当包括电子档案形成的标准化和电子档案存储与交换的标准化.在制定标准时还必须与国际标准接轨,如档案着录项目的名称,数据类型和长度,主题词库,分类号库及基本的表格等.

   4.1高校档案管理工作要解放思想, 更新观念.

   实行网络化管理,广泛运用计算机和网络技术,这对给高校档案工作提出了更新,更高的要求,高校档案界必须更新观念,树立资源共享意识.为解决档案信息资源的分散性和利用者对档案信息需求的综合性矛盾,高校的档案管理工作必须树立为整个社会服务的意识和分工协作,资源共享的新观念.为满足各个行业,各种层次的刊用需求,要提倡和鼓励档案系统内外部之间的棚论文范文息交流与合作,逐步做到在信息资源服务整体化.另外要强化服务意识. 高校档案管理工作足一项保管和提供档案为社会服务的工作,高校如果能够紧紧围绕着为学校发展和学生成长服务,为社会服务这一主题来开展工作,高校档案事业生存发展的空间就会拓宽.

   4.2培养档案业务和计算机管理专用人才

   高校档案管理工作者除了有强烈的事业心和历史责任感外,还要不断进行理论和实践探索,要成为既懂档案业务,又懂现代化科技知识的新型档案管理人员.要彻底改革学生档案工作的程序,敢冒风险,推陈出新,加速学生档案实现网络化管理的进程以适应高校发展的需要.

   4.3运用新技术处理电子文件归档与泄密问题

   电子文件日益增加,电了文件与纸质文件的归档问题已不容忽视.为防止电子文件的失真,清除不安全隐患,如非法增加,删除,修改等,电子文件与纸质文件应按时归档,对重要文件要及时打印.电子文件寿命的短暂性及对环境的依赖性决定其不能轻易取代纸质文件.重要的电了文件需要同时保存纸质备份.同时,应注意网络化后,电于文挡的保密问题.传统的纸质文件在固定的阅览用户被提供利用,专人负责接待,更宜于做到保密.电子文件因 问和技术范畴,则不宜做到保密.当电子文件在网上运行时,档案的内容易被第三者了解,第三者可在短时间内查到.为此,高校档案在网上运行时易泄密.这要求我们加强对信息防范技术增加投入,不断完善技术保障.

   5.参考文献

   [1] 林杰斌刘明德MIS管理信息系统[M]清华大学出版社,2006鲁晓莹傅德彬MIS解决方案[M]国防工业出版社,200JSP信息系统开发实例精选[M].清华大学出版社,2004尹丽梅谈高校档案管理多媒体信息系统 [J]佳木斯教育学院学报,20061:97-98.

   [5] 徐海平.浅谈学生档案管理系统 [J].《中国科技信息》,200王雯张李义陈雄基于模式的企业档案管理系统研究 [J]机电产品开发与创新,200-25.

   [7] 赵红波 申源数字化档案管理系统 [J]机电兵船档案,200-12.

   [8] LIANG. INTRODUCTION TO J论文范文A PROGRAMMING-COMPREHENSIVE VERSION 6/E [M].全华出版社,200JACKSON. WEB TECHNOLOGIES: A COMPUTER SCIENCE PERSPECTIVE [M].全华出版社,200 开题报告内容

   (包括选题的背景与意义,研究的基本内容与拟解决的主要问题,研究的方法与技术路线,研究的总体安排与进度,主要参考文献)

   学生档案管理系统

   1.选题的背景与意义

   档案是国家机关,团体及企事业单位在从事各种社会活动,生产活动和科研活动过程中,形成的具有一定价值的材料或实物.档案管理无论对档案馆还是基层单位,都是一项不可或缺的重要工作,档案管理的任务是科学地保管和有效地利用.随着科学技术的不断发展,学生档案管理的现代化显得越来越迫切,越来越重要.现代化管理是相对传统管理而言的.它是以系统论为基础,以数学方法为工具,借助计算机,数字通信等技术,组成最佳的有机体系,并充分发挥管理人员的积极性,以取得被管理对象在确定目标下,其整体动态达到最佳效果.

   学生档案管理系统对档案进行综合管理,实现了档案数据的等功能,提高了档案整理,编目和保管水平,减轻了档案工作人员的劳动强度,提高了工作效率,提高档案行业的信息化MIS),就整个系统的技术构成上来看,它是一个属于基于B/S开发模式的数据库应用类的系统.其基本操作是通过浏览器对在服务器上的数据库进行数据添加,删除,查找,编辑,运算等.数据库方面没什么大的技术问题,B/SJSP和Bean模式,暂不存在太大的技术问题.

   2.3经济可行性

   通常,搭建一个基于C/S技术的管理系统,需要购买服务器,客户机,操作系统,相关管理软件的服务器端和客户端,配置网络,以及服务器端和客户端的维护需要不少的资金投入,而且日后的维护管理,系统的升级等将是非常大的一笔论文范文.而采用B/S技术,特别是JSP技术,只用搭建不依赖于操作系统,数据库及Web服务器.例如可采用性能稳定的开放源代码Linux操作系统,免费的My SQL数据库及Apache(内嵌Tomcat)服务器.实践证明,这些开源软件的品质和性能都是非常稳定可靠的.

   总体而言,采用B/S的开发模式对本项目有以下几点好处:

   较低廉的开放的非专用的标准,B/S 技术所基于的标准是开放的,非专有的;

   低开发,管理成本:C/S 结构的应用,无论是安装,配置还是升级都需要在所有的客户机上实施;而B/S 技术较为低廉,一般只需安装,配置在服务器上;

   对信息及应用系统的自由访问;

   在已经建立的网络基础上,用户均可自由,主动地访问信息和系统资源;

   培训成本低:浏览器的技术简单易用,一旦用户掌握了浏览器的用法,也就可以掌握如何运用系统上各种信息资源;

   日后升级可以本系统为模板,增加其他相关模块,节省开发时间,难度及金钱.

   3.研究的基本内容

   3.1 Eclipse开发环境

   Eclipse是一个开放源代码的基于 J论文范文a 的软件开发项目,专注于为高度集成的工具开发提供一个全功能的,具有商业品质的工业平台.就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境.Eclipse 附带了一个标准的插件集,包括 J论文范文a 开发工具(J论文范文a Development Tools,JDT).虽然大多数用户很乐于将 Eclipse 当作 J论文范文a IDE 来使用,但 Eclipse 的目标不仅限于此.Eclipse 还包括插件开发环境(Plug-in Development Environment,PDE),这个组件主要针对希望扩展 Eclipse 的软件开发人员,因为它允许他们构建与 Eclipse 环境无缝集成的工具.由于 Eclipse 中的每样东西都是插件,对于给 Eclipse 提供插件,以及给用户提供一致和统一的集成开发环境而言,所有工具开发人员都具有同等的发挥场所.session对象中,而在后续页面中,都会进行相应的处理之前检查用户名是否存在,如果用户名为空,则意味这是一个没有经过登录页面身份验证的非法闯入者,将不允许进行后面的处理.

   4.研究的方法与技术路线

   本系统是基于B/S模式的,考虑到兼容性,跨平台性,可行性等多方面因素,因此将采用JSP+J论文范文aBean或者JSP+J论文范文aBean+Severlet.J论文范文aBeanMVC(Model-View-Controller)设计模式的J论文范文a Web前端应用,MVC模式最重要的思想就是业务代码与视图代码分离.能有效地理清系统结构,降低系统复杂度与维护难度,使日后的升级再开发成为可能.

   开发环境:数据库决定采用SQL Server,在JSP中访问SQL Server数据库的方式有以下三种:

   通过JDBC驱动连接;

   通过JDBC-ODBC桥接方式连接;

   配置数据库连接池连接SQL Server数据库;

   本系统暂时考虑用数据库连接池来连接SQL Server数据库.开发工具方面暂定为TomCat+J2SDK1.4.2+eclipse3.2用于开发J论文范文a Bean,J论文范文acript, Dreamwe论文范文er8.0用于JSP页面的具体布局和美观性.运行环境:服务器端:p4 1.8GHz以上+256MB+40GB+10/100MWINDOWS2000/2003SERVER,IE6.0,TOMCAT5.0,J2SDK1.p3 500MHZ(以上)+128MB+10GB10/100M自适应网卡.windows98/2000/xp/2003+IE6.0.Eclipse环境的熟悉与开发;

   客户通过IE顺利访问服务器;

   利用J论文范文A Bean建立与数据库的连接,查询,修改,插入,删除数据;

   用Dreamwe论文范文er来解决JSP页面的布局,美化;

   系统通过J论文范文A Bean来实现模块化;

   6.研究的总体安排与进度

   时间 毕业设计(论文)阶段工作安排 2.13-3.8 查阅文献和调研,收集资料进行归纳与概括,拟定开题报告 3.8-3.23 开题报告修改,准备开题 3.23-3.28 总体设计 3.28-4.3 详细设计 4.3-4.25 编码实现 4.26-5.5 测试 5.6-5.20 撰写毕业论文 5.21-5.31 修改毕业论文,准备答辩 7.预期结果

   通过一定安排,预计在5月底之前能完成所有毕业设计,包括开题报告,总体设计,详细设计,学生档案管理系统的编码和相应的PPT,同时对整个系统的各个功能模块的测试.

   8.主要参考文献

   [1] 曹广鑫,数据库项目开发宝典[M]电子工业出版社,2006[M].人民邮电出版社,2004耿详义,张跃平JSP实用教程[M]清华大学出版社,2004 JSP信息系统开发实例精选[M].清华大学出版社,2004JSP信息系统设计与开发实例[M].机械工业出版社,2004 外文翻译稿

   用模拟对象和AOP来单位试验Struts的应用

   AOP如何补足OOP来缩小整合间隙

   作者Walter Jia, J论文范文aWorld., 11/09/06

   试驱动开发减少发展努力提高软件质量作为一个整体试策略的基础 单试必须是全面设置简单执行但是依赖于环境和达到上述目标部署放慢代码和试验周期 此外与其他会导致更加复杂试设置较慢的测试整合两个流行测试架StrutsTestCase 和 EasyMock,和单元试Struts的应用导致试设置的试 但是这两个框架留下缺口, 在这篇文章中我检查对象办法方面解决比较也显示的程序设计(AOP)补对象编程(OOP)整合的Struts应用执行环境因为Struts的Servlet的容器典型其他要求 模拟对象测试方法,有助于消除不必要的附庸trutstestcase的试框架一个模拟的Servlet的执行ockstrutstestcase课堂,延伸 JUnit的试用例有利于科装箱检验单位检验周期Easymock,另一个测试框架很容易地模拟动态的协作代替真正的逻辑论证单Struts的应用你要下列步骤实施这个单MockStrutsTestCase,以便于模拟Servlet的容器模拟这一行为取决于使用asymock;

   规定模拟预期;

   在测试时把模拟注入到行为;

   继续试验与论证;

   第四步履行了注入依赖,这种注入在试验下,指导Struts的行为远离其真正合作者EasyMock产生的模拟注入到行为,你需要进入试验班的行为事例 不幸的是这是一个障碍因为不易进入ockstrutstestcase.

   OOP解决方案

   你能从ockstrutstestcase进入行为事例ockstrutstestcase和Struts的控制器组成部分之间的关系.

   图1突出主要关系有可能导致一个解决办法

   图1. 关系可能导致一个的办法ActionServlet 和 RequestProcessor来给MockStrutsTestCase提供行为的通路吗? 随之发生呼叫链条将是:

   myActionTest.getActionServlet().getRequestProcessor().getActions().

   当你看着那种把MockStrutsTestCase和Struts行为联系起来的呼叫的序列,这种方法就不管用了.

   图2说明了MockStrutsTestCase 和Struts 组成部分的主要关系.

   图2MockStrutsTestCase和Struts组成部分之间的相互影响

   如图2所示,问题包括Struts行为创造的定时.模拟注入到行为要在对MockStrutsTestCase.actionPerform()的呼叫之前发生.然而,只有在对actionPerform()进行访问之后,actionPerform()才创造行为事例.因为你不能容易地向MockStrutsTestCase传播行为事例,为什么不访问基类RequestProcessor,不考虑processActionCreate()方法呢?在不考虑方法中,你可以使用所有的行为事例,所以为正确的行为事例创建,配置,设定一个模拟变得简单直接了.因为MockControl.verify()应该在actionPerform()之后被呼叫,你也需要不去考虑processActionPerform()来确认这次访问.

   这种方法来试验重大的Struts的应用是不切实际的.即使所有的行为都与一个简单的模拟相互影响,相互作用,测试一个行为很可能需要多样的试验方法,每个都伴随着不同的预期.建议的解决方案不会再创建不同的RequestProcessor基类,每个都设立不同的模拟预期.多样的Struts配置文件也需要详细说明不同的RequestProcessor基类.管理许多的试验会成为一件头痛的事.

   AOP解决方案

   因此,不知是什么原因,在行为执行之前使行为事例可用于MockStrutsTestCase仍然是可取的.如果你熟悉AOP,你认出向这要求直接被安置的简单解决方案. 关键是要定义一个捕获行为执行连接处点的pointcut,然后在把模拟注入到行为之前详细说明一个建议.

   在这里,我选择AspectJ来实现这个解决方案.其它AOP工具,比如Spring AOP,应该正常工作.Spring AOP要求一个额外的委派Struts行为管理为代表来触发Spring's DelegatingActionProxy的措施.

   图3用以AOP为基础的解决方案,展示了单位试验例子的静止模型.

   图3. 以AOP为基础的解决方案,展示了单位试验例子的静止模型

   SimpleAction 是一个Struts行为的基类,与ActionService合作.SimpleActionTest来自MockStrutsTestCase去测验SimpleAction.

   SimpleActionTest用EasyMock创造,建立一个模拟ActionService.

   当SimpleAction 的执行方法将要运行时,SimpleActionTest也执行StrutsActionPreExecuteListener界面来接收通知.作为通知的一部分,SimpleActionTest 收到SimpleAction例子来注入ActionService模拟.它是通知任何试验组的方面课StrutsActionPreExecuteNotifier,这些班级执行听者界面,使行为事例可用.

   StrutsActionPreExecuteNotifier的执行步骤如下:

   首先,一个pointcut 选择测试方法施行点.这种测验方法在等着听行为预执行的事件的试验种类过程中存在.pointcut 暴露当前的执行测试组对象: pointcut mockStrutsTest(StrutsActionPreExecuteListener actionTest):

   execution(public void StrutsActionPreExecuteListener+.test*()) && this(actionTest);

   其次,另一个pointcut捕获行为施行点.pointcut结合起来,匹配的范围被限制在行为测试方法的电话流程之内.被减少的范围过滤掉测试方法触发的行为施行.结果方面不影响生产代码.行为和它对应的测试组事例通过pointcut 参量被暴露pointcut strutsActionExecute(Action action, StrutsActionPreExecuteListener actionTest):

   execution(public ActionForward Action+.execute(.)) && this(action) && cflow(mockStrutsTest(actionTest));

   最后,一个以前的与早先的pointcut相关的建议通知行为事件的听者before(Action action, StrutsActionPreExecuteListener actionTest):

   strutsActionExecute(action, actionTest) { actionTest.preActionExecuteOccurred(action);}

   图4 说明

   图4组之间的动态的相互作用

   从行为到方面的虚线代表行为施行接合点的捕获.把这第二张程序表与第一张比较,重大区别是三个步骤发生在行为施行之前pointcut捕获行为执行连接处点,由从SimpleAction到StrutsActionPreExecuteNotifier奔忙的箭头表明.

   方面的以前的建议通知试验组,把相应的行为事例传给它.

   试验组把模拟对象注入到即将要开始执行的行为事例.

   现在你可以根据先前概述的五个步骤来继续写行为试验.下面代码显示了为SimpleActionTest列出的部分代码,有一列式的注释来强调每个步骤:

   使用MockStrutsTestCase 和EasyMock的行为试验的部分列表

   public class SimpleActionTest extends MockStrutsTestCase

   implements StrutsActionPreExecuteListener {

   // 2. Mock the class that Action depends on

   private MockControl mockControl 等于 MockControl.createControl(ActionService.class);

   private ActionService serviceMock 等于 (ActionService)mockControl.getMock();

   // 1. Setup MockStrutsTestCase

   protected void setUp() throws Exception {

   super.setUp();

   setRequestPathInfo("/action/simpleAction");

   }

   protected void tearDown() throws Exception {

   super.tearDown();

   mockControl.reset();

   }

   // 4. Inject the mock into the Action

   public void preActionExecuteOccured(Action action) {

   ((SimpleAction)action).setService(serviceMock);

   }

   public void testSuccess() {

   // 3. Set mock expectations

   serviceMock.serveAction();

   mockControl.setReturnValue(true);

   mockControl.replay();

   // 5. Proceed with test and verifications

   actionPerform();

   verifyForward("success");

   verifyNoActionErrors();

   mockControl.verify();

   }

   public void testFailure() {

   // details skipped

   }

   }

   四种可能的多重性关系存在于行为和它们所依赖的服务之间:

   1,每个行为依赖一个服务.

   2,每个行为依赖多个服务.

   3,多个行为依赖一个服务.

   4,多个行为依赖多个服务.

   我这里介绍的解决方案有灵活性,相对不费力地支持所有四种方案.因为模拟创造,期望计划,和模拟注射能完全在个人试验组中执行.

   你能避免使用听者界面,以便模拟注射在StrutsActionPreExecuteNotifier内执行吗? 它似乎使试验课执行变得甚至更简单.然而,与初期的OOP解决方案相似,写多重方面来创建不同的模拟,制定不同的模拟期望将会证明是必然.使模拟创造和在由于听者方法成为可能的个人试验组中的计划局部化变得更加方便.

   AOP的力量

   有人可能会提出一个好的OOP解决方案来解决我们的整合问题.然而,它很可能要求对Struts 和StrutsTestCase有深入的理解,还要有很大的努力.存在于两个试验框架之间的整合间隙是在它的执行以前获得使用Struts行为事例的权利的难点.在确定基本原因之后,AOP解决方案自然地从问题描绘出现.代替用传统OOP要求更复杂解决方案,AOP允许我们更紧密把我们解决方案映射到有问题的空间.AOP的魅力在于它的连接处点样式.它让你穿透媒介物,例如ActionServlet 和RequestProcessor,直接到达问题的中心.忙于横切关注的省时间的方式给开发者表现的力量去设计直觉的和更简单的解决方案.AOP是一填充由传统OOP留下的洞的有功效的编程方法.当正确适用于正确的类型的问题的时候, 它改进代码组件性,导致更干净,更容易理解的代码.有希望地,这文章不仅帮你单位试验你的Struts的应用,也给你对一些AOP给予的重要利益的新的评价.

   作者Bio

   Walter Jia是加拿大温哥华的一个专门从事企业应用程序开发的独立顾问.当用一个实际的方法来帮助客户建设品质软件,避开不必要的成本时,他总是能给出最好的解决方案.

   外文原稿

   Unit test Struts applications with mock objects and AOP

   How AOP plements OOP to bridge the integration gap

   By?Walter Jia,?J论文范文aWorld.,?11/09/06

   Test-driven development improves software quality while reducing development efforts. As the foundation of an overall test strategy, unit tests must be prehensive, easy to set up, and quick to execute. However, the dependency on the execution environment and on code outside the class under test plicates our ability to achieve these goals. Deploying the application in a container significantly slows down the code-and-test cycle. Furthermore, the need to collaborate with other classes usually leads to more plex test setups and slower test runs.

   Integrating two popular test frameworks, StrutsTestCase and EasyMock, to unit-test Struts applications leads to easier test setups and faster test runs. However, these two frameworks le论文范文e a gap that prevents an ideal integration. In this article, I examine both an object-oriented solution and an aspect-oriented solution to this problem. The parison also demonstrates how aspect-oriented programming (AOP) plements object-oriented programming (OOP) by simplifying the solution to a seemingly difficult problem.

   The integration need

   Non-trivial Struts applications exhibit both execution environment and class dependencies because Struts actions execute in a servlet container and typically call other classes to process the requests. The mock object testing approach helps remove the unwanted dependencies. The StrutsTestCase testing framework provides a mock implementation of the servlet container with the MockStrutsTestCase class that extends the base JUnit test case. It facilitates out-container testing that speeds up unit testing cycles. EasyMock, another testing framework, makes it easy to dynamically mock the collaborating classes. The mocks substitute real classes with simpler implementations and add verification logic to support unit testing.

   Clearly, it is advantageous to bine the two frameworks so that Struts applications can be tested in true isolation. Ideally, you want to implement such a unit test with the following steps:

   Set up MockStrutsTestCase so that it simulates the servlet container.

   Mock the class that the action depends on using EasyMock.

   Set mock expectations.

   Inject the mock into the action under test.

   Proceed with the test and verifications.

   Step 4 performs dependency injection that steers the Struts action under test away from its real collaborator to interact with the mocked one. To inject the mock generated by EasyMock into actions, you need access to action instances in the test classes. Unfortunately, this presents an obstacle, as access is not easily obtained from MockStrutsTestCase.

   The OOP solution

   How can you access the action instances from MockStrutsTestCase? Let's look at the relationships between MockStrutsTestCase and the controller ponents of Struts.

   Figure 1 highlights the key relationships that could potentially lead to a solution.

   Figure 1. Relationships that could lead to an OOP solution.

   MockStrutsTestCase has a public getter method for retrieving ActionServlet.

   ActionServlet has a protected getter method for RequestProcessor.

   RequestProcessor stores the action instances as a protected member.

   Can you subclass both ActionServlet and RequestProcessor to provide MockStrutsTestCase the access to the actions? The resulting call chain would be: myActionTest.getActionServlet().getRequestProcessor().getActions().

   This approach doesn't work when you look at the sequence of calls that link MockStrutsTestCase to Struts actions.

   Figure 2 illustrates the key interactions between MockStrutsTestCase and Struts ponents.

   Figure 2. Interactions between MockStrutsTestCase and Struts ponents.

   The problem, as shown in Figure 2, involves the timing of Struts action creation. Mock injection into the actions needs to happen before the call to MockStrutsTestCase.actionPerform(). However, the actions are not yet 论文范文ailable because only after the call to actionPerform() does RequestProcessor create the action instances.

   Since you cannot easily propagate the action instance to MockStrutsTestCase, why not just subclass RequestProcessor and override the processActionCreate() method? In the overridden method, you h论文范文e access to all the action instances, so creating, configuring, and setting a mock to the right action instance bees straightforward. Because MockControl.verify() should be called after actionPerform(), you also need to override processActionPerform() to make the verification call.

   This solution is impractical for testing non-trivial Struts applications. Even if all actions interact with a single mock, testing one action would likely require multiple test methods, each with different mock expectations. The proposed solution would end up creating different RequestProcessor subclasses, each setting different mock expectations. Multiple Struts configuration files are also needed to specify the different RequestProcessor subclasses. Managing a large number of tests would bee a headache.

   The AOP solution

   Thus, somehow making the action instance 论文范文ailable to MockStrutsTestCase before the action executes is still desirable. If you are familiar with AOP, you recognize the simple solution that directly maps to this requirement. The key is to define a pointcut that captures the action execution join point and then a before advice to inject the mock into the action.

   Here, I chose AspectJ to implement the solution. Other AOP implementations such as Spring AOP should work as well. Spring AOP would require one extra step that delegates Struts action management to Spring with Spring's DelegatingActionProxy.

   Figure 3 shows the static model of the unit test example with the AOP-based solution.

   Figure 3. Static model of the unit test example with the AOP-based solution.

   SimpleAction is a subclass of a Struts action and collaborates with ActionService. SimpleActionTest derives from MockStrutsTestCase to test SimpleAction.

   SimpleActionTest creates and sets up a mock ActionService using EasyMock. SimpleActionTest also implements the StrutsActionPreExecuteListener interface to receive notification when SimpleAction's execute method is about to run. As part of the notification, SimpleActionTest receives the SimpleAction instance to inject the ActionService mock. It is the aspect class StrutsActionPreExecuteNotifier that notifies any test class that implements the listener interface and makes the action instance 论文范文ailable.

   Here is how StrutsActionPreExecuteNotifier is implemented:

   First, a pointcut selects the test method execution join point. The test method resides in the test class that listens for the action pre-execute event. The pointcut also exposes the current executing test class object:

   pointcut mockStrutsTest(StrutsActionPreExecuteListener actionTest): execution(public void StrutsActionPreExecuteListener+.test*()) && this(actionTest);

   Next, a second pointcut captures the action execution join point. Combining it with the first pointcut, the matching scope is limited to within the call flow of the action test method. The reduced scope filters out action execution that is not triggered by the test methods. As a result, the aspect does not affect production code. Both the action and its corresponding test class instances are exposed via pointcut parameters:

   pointcut strutsActionExecute(Action action, StrutsActionPreExecuteListener actionTest):

   execution(public ActionForward Action+.execute(.)) &&

   this(action) &&

   cflow(mockStrutsTest(actionTest));

   Finally, a before advice associated with the previous pointcut notifies the test classes, who are listeners of the action event, and passes along the action instance for mock injection:

   before(Action action, StrutsActionPreExecuteListener actionTest):

   strutsActionExecute(action, actionTest) {

   actionTest.preActionExecuteOccurred(action);

   }

   Figure 4 illustrates the dynamic interactions among the classes.

   Figure 4. Dynamic interactions among the classes.

   The dotted line going from the action to the aspect represents the capture of the action execution join point. Comparing this second sequence diagram to the first one, the significant differences are the three steps occurring just before action execution:

   A pointcut captures the action execution join point indicated by the dashed arrow going from SimpleAction to StrutsActionPreExecuteNotifier.

   The aspect's before advice notifies the test class and passes the corresponding action instance to it.

   The test class injects the mock object into the action instance that is about to start executing.

   You can now proceed with writing the action tests following the five steps outlined previously. The code below shows the partial code listing for SimpleActionTest, with inline ments highlighting each step:

   Partial listing of the action test using both MockStrutsTestCase and EasyMock

   public class SimpleActionTest extends MockStrutsTestCase

   implements StrutsActionPreExecuteListener {

   // 2. Mock the class that Action depends on

   private MockControl mockControl 等于 MockControl.createControl(ActionService.class);

   private ActionService serviceMock 等于 (ActionService)mockControl.getMock();

   // 1. Setup MockStrutsTestCase

   protected void setUp() throws Exception {

   super.setUp();

   setRequestPathInfo("/action/simpleAction");

   }

   protected void tearDown() throws Exception {

   super.tearDown();

   mockControl.reset();

   }

   // 4. Inject the mock into the Action

   public void preActionExecuteOccured(Action action) {

   ((SimpleAction)action).setService(serviceMock);

   }

   public void testSuccess() {

   // 3. Set mock expectations

   serviceMock.serveAction();

   mockControl.setReturnValue(true);

   mockControl.replay();

   // 5. Proceed with test and verifications

   actionPerform();

   verifyForward("success");

   verifyNoActionErrors();

   mockControl.verify();

   }

   public void testFailure() {

   // details skipped

   }

   }

   Four possible multiplicity relationships exist between actions and the services they depend on:

   Each action depends on one service.

   Each action depends on multiple services.

   Multiple actions depend on one service.

   Multiple actions depend on multiple services.

   The solution I present here has the flexibility to support all four scenarios with relative ease because mock creation, expectation setup, and mock injection can all be performed in the individual test classes.

   Can you 论文范文oid using the listener interface so that mock injection is done inside StrutsActionPreExecuteNotifier? It seems to make test class implementation even simpler. However, similar to the earlier OOP solution, writing multiple aspects to create different mocks and set up different mock expectations would prove necessary. Localizing the mock creation and setup in individual test classes as made possible by the listener approach is more convenient.

   The power of AOP

   Someone may e up with a good OOP solution to our integration problem. However, it would likely require in-depth understanding of Struts and StrutsTestCase, and a non-trivial amount of effort. The integration gap between the two testing frameworks is the difficulty in gaining access to the Struts action instance before its execution. After identifying the fundamental cause, the AOP solution naturally emerges from the problem description. Instead of the more plex solution required with traditional OOP, AOP allows us to map our solution more closely to the problem space.

   AOP's magic lies with its join point model. It lets you cut through intermediaries, such as ActionServlet and RequestProcessor, and go straight to the heart of the problem. The economical way of addressing crosscutting concerns gives developers the expressive power to design intuitive and simpler solutions. AOP is a

欧洲卡车模拟2档案:2013广西金蝶KIS专业版教学视频工资管理人员档案考试题

powerful programming approach that fills the holes left by traditional OOP. When applied correctly to the right type of problems, it improves code modularity, resulting in code that is cleaner and easier to understand. Hopefully, this article not only helped you unit test your Struts applications, but also g论文范文e you new appreciation for some of the significant benefits that AOP offers.

   Author Bio

   Walter Jia is an independent consultant specializing in enterprise application development. He is always on the lookout for better solutions while taking a pragmatic approach to helping clients build quality software and 论文范文oid unnecessary costs. He is based in Vancouver Canada.

   开题报告(含文献综述,外文翻译)评语表

   姓 名 学号 班 级 指导教师对文献综述的评语:

   指导教师对开题报告的评语:

   指导教师对译文的评语:

   指导教师签名:

  

   年 月 日 答辩小组对开题报告(含文献综述,外文翻译)的评语:

   答辩小组负责人签名:

   年 月 日

总结:此文是一篇档案模拟论文范文,为你的毕业论文写作提供有价值的参考。

欧洲卡车模拟2档案引用文献:

[1] 档案论文范文 关于档案相关专科开题报告范文2万字
[2] 档案管理论文范文 档案管理方面有关毕业论文怎么写2万字
[3] 档案管理论文范文 档案管理方面有关大学毕业论文范文2万字
《文献综述内容》word下载【免费】
欧洲卡车模拟2档案相关论文范文资料