文献翻译中英对照-MVC模式简介.doc
《文献翻译中英对照-MVC模式简介.doc》由会员分享,可在线阅读,更多相关《文献翻译中英对照-MVC模式简介.doc(10页珍藏版)》请在沃文网上搜索。
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
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
10 积分
下载 | 加入VIP,下载更划算! |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 文献 翻译 中英对照 MVC 模式 简介