ImageVerifierCode 换一换
格式:DOC , 页数:10 ,大小:48.50KB ,
资源ID:823757      下载积分:10 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 微信支付   
验证码:   换一换

加入VIP,免费下载资源
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.wodocx.com/d-823757.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(文献翻译中英对照MVC模式简介.doc)为本站会员(精***)主动上传,沃文网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知沃文网(发送邮件至2622162128@qq.com或直接QQ联系客服),我们立即给予删除!

文献翻译中英对照MVC模式简介.doc

1、文献翻译资料题 目 MVC模式简介 英文题目 MVC Model Introduction MVC Model Introduction1. MVC Model IntroductionMVC (Model View Controller) model (model) - view(view) - Controller (controller), MVC was originally present in the Desktop program, M is the data model, M is the data model, V is the user interface, C is th

2、e controller. The purpose of using MVC is to separate the code of M and V, so that one program can use different forms. Such as the number of statistics were used to bar chart, pie chart to represent. C is to ensure that M and V sync, once M is changed, the V-sync. Model - View -Controller (MVC) is

3、the Xerox PARC in the 1980s invented for a programming language Smalltalk-80 software design patterns, and it has been widely used now. In recent years, it was recommended as a design patterns based on Oracles Suns Java EE platform, and welcomed by the increasing use of ColdFusion and PHP developers

4、. Model - View - Controller pattern is a useful toolbox, it has many benefits, but there are also some disadvantages.2. MVC how to workMVC is a design pattern, it is make the application of the input, processing and output separately. MVC application is divided into three core components: model, vie

5、w, controller. They deal with their own respective tasks and using the layering concept.ViewView is the users see and interact with the interface. For Web applications the old-fashioned view of the interface is composed by the HTML element, in the modern Web applications, HTML, still in view, play a

6、n important role, but new technology has been endless, and they include Macromedia Flash and like in XHTML, XML / XSL, WML, the markup language and Web services. How to deal with the applications interface is becoming increasingly challenging. MVC is a big advantage is that it can deal with many dif

7、ferent views for your application. In fact, in the view not the real deal, regardless of whether these data is the online store or an employee list, as the view is concerned, it is only as an output data and allows users to manipulate the way.ModelThe model represents enterprise data and business ru

8、les. The three components of the MVC, the model has the most processing tasks. For example, it may be used such as EJBs and ColdFusion Components, component object to handle the database. The data returned by the model is neutral, that is, the model has nothing to do with the data format, such a mod

9、el can provide data for multiple views. Applied to the model code just to writeonce and reuse can be multiple views, so a reduction of repetitive code.ControllerThe controllers accept user input and call the model and view to fulfill the needs of users. So when the hyperlink clicks the Web page and

10、sends an HTML form, the controller does not output anything and do any processing. It receives requests and decides which components of the model are called to handle the request, and then determine which view to display the returned data.3. Why you want to use MVCMost Web applications are used like

11、 ASP, PHP, or CFML such a process of (self-PHP5.0 version has full support for Object Model)-oriented language to create. Such as database queries data layer code such as HTML, the presentation layer code are mixed together. More experienced developers will be data from the presentation layer from,

12、but this is usually not very easy to do, it needs careful planning and constant attempts. MVC fundamentally mandatory to separate them. Although the construct MVC application requires some extra work, but it gives us the benefits is not in doubt. First of all, the most important point is that multip

13、le views to share a model, and now more and more ways to access your application. In this regard, one solution is to use the MVC, your users want Flash interface or WAP interface; using a model that can deal with them. Because you have the data and business rules separate from the presentation layer

14、, so you can maximize the reuse of your code. Model of the returned data is not formatted, so the same component can be a different interface. For example, a lot of data may use HTML to express, but they also may use the Adobe Flash and WAP to represent. The model also has a persistent state managem

15、ent and data processing functions, for example, be a Flash site or wireless networking applications that reuse the session-based shopping cart and e-commerce process. Because the model is self-contained, and phase separation with the controller and views, so it is easy to change your applications da

16、ta layer and business rules. If you want your database from MySQL to Oracle, or change your RDBMS data source to an LDAP simply change your model can be. Once you have the correct model, regardless of your data from a database or LDAP server, the view will display. Use three parts of MVC app is inde

17、pendent of each other, changing one does not affect the other two, so based on this design idea you can build loosely coupled components. For me, the controller also provides a benefit, is that you can use the controller to connect to different models and views to fulfill the needs of users, so that

18、 the controller can provide powerful means for structural applications. Given some reusable model and the view, the controller can select a model based on user requirements for processing, and then choose to view the results displayed to the user.4. The advantages of the MVCLow couplingThe view laye

19、r and business layer separation, which allows changing the view layer code without recompiling the model and controller code, and similarly, an applications business processes or business rules change only need to change the MVC model layer can be. Because the phase separation model and the controll

20、er and views, so it is easy to change the applications data layer and business rules. High reusability and applicability with the continuous advancement of technology, more and more ways to access the application. The MVC pattern allows you to use a variety of different styles of view to access the

21、same server-side code. It includes any Web (HTTP) browser or wireless browser (WAP), example, users can also be through the computer via mobile phone to order a product ordered is not the same, but it is the same order products. Model of the returned data is not formatted, so the same component can

22、be a different interface. For example, a lot of data may use HTML to express, but may use WAP, while those that need the command is to change the view layer, control layer and model layer without the need to make any changes. Lower life cycle costs MVC makes the development and maintenance of user i

23、nterface technology decreased.Rapid deploymentConsiderable reduction of development time using the MVC pattern, which allows the programmer (Java developers) to focus on business logic, interface programmers(HTML and JSP developers) to focus on the form of expression. Maintainability The separation

24、of the view layer and business logic layer also makes the WEB application easier to maintain and modify. Conducive to the software project management Due to the different layers perform their duties, each layer different applications some of the same features, code engineering, tools and management

25、procedures. 5. The disadvantage of MVCMVC, the drawback is it does not have a clear definition is not very easy to fully understand the MVC. MVC requires careful planning, due to its internal principle is more complex, so take some time to think.You will have to spend considerable time to consider h

26、ow the MVC to apply it to your application to be a strict separation of model and view, so also to debug your application has brought some difficulties. Each component is thoroughly tested before use. Once the components have been tested, you can freely reuse them.Experience of developers, applicati

27、on developers will be divided into three parts, so using the MVC also means that you will want to manage more files than ever before, and this is obvious. Such as our workload has increased, but please remember than it can bring us the benefits are worth mentioning.MVC is not suitable for small or m

28、edium-sized applications; spend a lot of time to MVC application size is not a lot of applications normally would be wasted.The MVC design pattern is a good way creates software, it advocates the principle of separation may better understand each other like the content and display. But if you want t

29、o isolate the components of the model, view and controller, you may need to rethink your application, especially in the framework of the application. If you are willing to accept the MVC, and the ability to cope with the extra work and complexity it brings, the MVC will make your software to a new l

30、evel of robustness, code reuse, and structural.MVC模式简介1. MVC模式简介MVC(Model view Controller)模型(model)-视图(view)-控制器(controller)MVC本来是存在于Desktop程序中的,M是指数据模型,V是指用户界面,C则是控制器。使用MVC的目的是将M和V的实现代码分离,从而使同一个程序可以使用不同的表现形式。比如一批统计数据你可以分别用柱状图、饼图来表示。C存在的目的则是确保M和V的同步,一旦M改变,V应该同步更新。模型视图控制器(MVC)是Xerox PARC在八十年代为编程语言Sma

31、lltalk80发明的一种软件设计模式,至今已被广泛使用。最近几年被推荐为Oracle旗下Sun公司Java EE平台的设计模式,并且受到越来越多的使用 ColdFusion 和 PHP 的开发者的欢迎。模型视图控制器模式是一个有用的工具箱,它有很多好处,但也有一些缺点。2. MVC如何工作MVC是一个设计模式,它强制性的使应用程序的输入、处理和输出分开。使用MVC应用程序被分成三个核心部件:模型、视图、控制器。它们各自处理自己的任务。分层概念 视图视图是用户看到并与之交互的界面。对老式的Web应用程序来说,视图就是由HTML元素组成的界面,在新式的Web应用程序中,HTML依旧在视图中扮演着

32、重要的角色,但一些新的技术已层出不穷,它们包括Macromedia Flash和象XHTML,XML/XSL,WML等一些标识语言和Web services. 如何处理应用程序的界面变得越来越有挑战性。MVC一个大的好处是它能为你的应用程序处理很多不同的视图。在视图中其实没有真正的处理发生,不管这些数据是联机存储的还是一个雇员列表,作为视图来讲,它只是作为一种输出数据并允许用户操纵的方式。模型模型表示企业数据和业务规则。在MVC的三个部件中,模型拥有最多的处理任务。例如它可能用象EJBs和ColdFusion Components这样的构件对象来处理数据库。被模型返回的数据是中立的,就是说模型

33、与数据格式无关,这样一个模型能为多个视图提供数据。由于应用于模型的代码只需写一次就可以被多个视图重用,所以减少了代码的重复性。控制器控制器接受用户的输入并调用模型和视图去完成用户的需求。所以当单击Web页面中的超链接和发送HTML表单时,控制器本身不输出任何东西和做任何处理。它只是接收请求并决定调用哪个模型构件去处理请求,然后再确定用哪个视图来显示返回的数据。3. 为什么要使用 MVC大部分Web应用程序都是用像ASP,PHP,或者CFML这样的过程化(自PHP5.0版本后已全面支持面向对象模型)语言来创建的。它们将像数据库查询语句这样的数据层代码和像HTML这样的表示层代码混在一起。经验比较

34、丰富的开发者会将数据从表示层分离开来,但这通常不是很容易做到的,它需要精心的计划和不断的尝试。MVC从根本上强制性的将它们分开。尽管构造MVC应用程序需要一些额外的工作,但是它给我们带来的好处是毋庸置疑的。 首先,最重要的一点是多个视图能共享一个模型,现在需要用越来越多的方式来访问你的应用程序。对此,其中一个解决之道是使用MVC,无论你的用户想要Flash界面或是 WAP 界面;用一个模型就能处理它们。由于你已经将数据和业务规则从表示层分开,所以你可以最大化的重用你的代码了。 由于模型返回的数据没有进行格式化,所以同样的构件能被不同界面使用。例如,很多数据可能用HTML来表示,但是它们也有可能

35、要用Adobe Flash和WAP来表示。模型也有状态管理和数据持久性处理的功能,例如,基于会话的购物车和电子商务过程也能被Flash网站或者无线联网的应用程序所重用。 因为模型是自包含的,并且与控制器和视图相分离,所以很容易改变你的应用程序的数据层和业务规则。如果你想把你的数据库从MySQL移植到Oracle,或者改变你的基于RDBMS数据源到LDAP,只需改变你的模型即可。一旦你正确的实现了模型,不管你的数据来自数据库或是LDAP服务器,视图将会正确的显示它们。由于运用MVC的应用程序的三个部件是相互独立,改变其中一个不会影响其它两个,所以依据这种设计思想你能构造良好的松耦合的构件。 对我

36、来说,控制器也提供了一个好处,就是可以使用控制器来联接不同的模型和视图去完成用户的需求,这样控制器可以为构造应用程序提供强有力的手段。给定一些可重用的模型和视图,控制器可以根据用户的需求选择模型进行处理,然后选择视图将处理结果显示给用户。4. MVC的优点低耦合性视图层和业务层分离,这样就允许更改视图层代码而不用重新编译模型和控制器代码,同样,一个应用的业务流程或者业务规则的改变只需要改动MVC的模型层即可。因为模型与控制器和视图相分离,所以很容易改变应用程序的数据层和业务规则。 高重用性和可适用性随着技术的不断进步,现在需要用越来越多的方式来访问应用程序。MVC模式允许你使用各种不同样式的视

37、图来访问同一个服务器端的代码。它包括任何WEB(HTTP)浏览器或者无线浏览器(wap),比如,用户可以通过电脑也可通过手机来订购某样产品,虽然订购的方式不一样,但处理订购产品的方式是一样的。由于模型返回的数据没有进行格式化,所以同样的构件能被不同的界面使用。例如,很多数据可能用HTML来表示,但是也有可能用WAP来表示,而这些表示所需要的命令是改变视图层的实现方式,而控制层和模型层无需做任何改变。 较低的生命周期成本MVC使开发和维护用户接口的技术含量降低。 快速的部署使用MVC模式使开发时间得到相当大的缩减,它使程序员(Java开发人员)集中精力于业务逻辑,界面程序员(HTML和JSP开发

38、人员)集中精力于表现形式上。 可维护性分离视图层和业务逻辑层也使得WEB应用更易于维护和修改。 有利于软件工程化管理由于不同的层各司其职,每一层不同的应用具有某些相同的特征,有利于通过工程化、工具化管理程序代码。MVC的缺点MVC的缺点是由于它没有明确的定义,所以完全理解MVC并不是很容易。使用MVC需要精心的计划,由于它的内部原理比较复杂,所以需要花费一些时间去思考。 你将不得不花费相当可观的时间去考虑如何将MVC运用到你的应用程序,同时由于模型和视图要严格的分离,这样也给调试应用程序带来了一定的困难。每个构件在使用之前都需要经过彻底的测试。一旦你的构件经过了测试,你就可以毫无顾忌的重用它们

39、了。 根据开发者经验,由于开发者将一个应用程序分成了三个部件,所以使用MVC同时也意味着你将要管理比以前更多的文件,这一点是显而易见的。这样好像我们的工作量增加了,但是请记住这比起它所能带给我们的好处是不值一提。 MVC并不适合小型甚至中等规模的应用程序,花费大量时间将MVC应用到规模并不是很大的应用程序通常会得不偿失。 MVC设计模式是一个很好创建软件的途径,它所提倡的一些原则,像内容和显示互相分离可能比较好理解。但是如果你要隔离模型、视图和控制器的构件,你可能需要重新思考你的应用程序,尤其是应用程序的构架方面。如果你肯接受MVC,并且有能力应付它所带来的额外的工作和复杂性,MVC将会使你的软件在健壮性,代码重用和结构方面上一个新的台阶。10

版权声明:以上文章中所选用的图片及文字来源于网络以及用户投稿,由于未联系到知识产权人或未发现有关知识产权的登记,如有知识产权人并不愿意我们使用,如有侵权请立即联系:2622162128@qq.com ,我们立即下架或删除。

Copyright© 2022-2024 www.wodocx.com ,All Rights Reserved |陕ICP备19002583号-1 

陕公网安备 61072602000132号     违法和不良信息举报:0916-4228922