MVC设计模式介绍毕业论文外文翻译_第1页
MVC设计模式介绍毕业论文外文翻译_第2页
MVC设计模式介绍毕业论文外文翻译_第3页
MVC设计模式介绍毕业论文外文翻译_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、技术简介1. mvc设计模式介绍mvc模式是“model-view-controller”的缩写,中文翻译为“模式-试图-控制器”。mvc应用程序总是由这三个部分组成。event导致controller改变model或view,或者同时改变两者。只要controller改变了models的数据或者属性,所有依赖的view都会自动更新。类似的,重要controller改变了view,view会从潜在的model中获取数据来刷新自己。mvc模式最早是smalltalk语言研究团提出的,应用于交互应用程序中。java语言是面向对象语言,很自然的sun在应用程序事例中就推荐mvc模式作为开发web应用

2、的架构模式。mvc模式是一种架构模式,其实需要其他模式协作完成。在j2ee模式目录中,通常采用service to worker模式是新,而service to worker模式可由集中控制器模式,派遣器模式和page helper模式组成。2. struts2简介虽然struts2号称是一个全新的框架,但这仅仅是相对struts1而言。struts2与struts1相比,确实有很多革命性的改进,但它并不是新发布的新框架。从某种程度上来讲,struts2没有继承struts1的血统,而是继承webwork的血统。struts2是webwork的升级,而不是一个全新的框架,因此稳定性、性能等各方

3、面都有很好的保证:而且吸收了struts1和webwork两者的优势。struts2 action类可以实现一个action接口,也可实现其他接口,使可选和定制的服务成为可能。struts2提供一个actionsupport基类去实现 常用的接口。action接口不是必须的,任何有execute标识的pojo对象都可以用作struts2的action对象。struts2 action对象为每一个请求产生一个实例,因此没有线程安全问题。实际上,servlet容器给每个请求产生许多可丢弃的对象,并且不会导致性能和垃圾回收问题。struts2 action可以通过初始化、设置属性、调用方法来测试,“

4、依赖注入”支持也使测试更容易。struts2直接使用action属性作为输入属性,消除了对第二个输入对象的需求。输入属性可能是有自己(子)属性的rich对象类型。action属性能够通过web页面上的taglibs访问。struts2也支持actionform模式。rich对象类型,包括业务对象,能够用作输入/输出对象。这种modeldriven特性简化了taglib对pojo输入对象的引用。struts2可以使用jstl,但是也支持一个更强大和灵活的表达式语言“object graph notation language”(ognl)。struts2使用 “valuestack”技术,使ta

5、glib能够访问值而不需要把你的页面(view)和对象绑定起来。valuestack策略允许通过一系列名称相同但类型不同的属性重用页面(view)。struts2使用ognl进行类型转换。提供基本和常用对象的转换器。附录2technical overview1. mvc design pattern description待添加的隐藏文字内容3mvc pattern is model-view-controller of the acronym, the chinese translation for mode - trying to - controller. mvc application

6、s are always by these three components. event (events) result in model or controller to change the view, or to change both at the same time. models change as long as the controller of the data or attributes, all depend on view is updated automatically. similarly, the important controller changed the

7、 view, view of the model from the potential to obtain data to refresh themselves. mvc pattern was first made smalltalk language research group applied to interactive applications. java language is object-oriented language, it is natural that in the application instances sun recommending mvc model as

8、 a framework for developing web application model. mvc model is an architectural pattern, in fact, other models need to be completed in collaboration. in the j2ee pattern catalog are commonly used service to worker pattern is new, and the service to worker pattern may be focused on control mode, sen

9、ding mode and the page helper pattern.2. struts2 introductionalthough the claims is a new struts2 framework, but it is only in terms of relative struts1. struts2 with struts1 than there are indeed many revolutionary improvements, but it is not a new release of the new framework, but in another promi

10、nent framework: webwork developed on the basis of the. to some extent, struts2 does not inherit struts1s ancestry, but the succession webwork lineage. struts2 is the webwork upgrade, rather than an entirely new framework, therefore the stability, performance and other areas have a very good assuranc

11、e: it absorbed the advantages of both struts1 and webwork, therefore, is a very worth the wait framework.struts2 action class can implement an action interface and other interfaces can also be achieved to enable optional and custom services possible. struts2 provides a actionsupport to achieve commo

12、n base class interface. action interface is not necessary, any pojo object execute identity can be used as an object struts2 in action. struts2 action object for each instance of a request to generate a, there is no thread-safety problems. (in fact, servlet containers generate many for each request

13、can be discarded objects, and will not lead to performance and garbage collection issues). struts2 action does not depend on the container, allowing action out of the container to be tested separately. if necessary, struts2 action can still access the original request and response, however, other el

14、ements to reduce or eliminate direct access to httpservetrequest and httpservletresponse necessary. struts2 action can be initialized, set properties, call methods to test, dependency injection support also makes testing easier. struts2 using the action attribute directly as input properties, eliminating the need for the second input object needs. input properties may have their own (sub) attribute the rich object type. action properties able to access web pages on

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论