About MVC Grooming

Source: Internet
Author: User
Tags html form php language

Mvc

The full name is the Model view Controller, which is the abbreviation for the Models-view (Controller), a software design paradigm that organizes the code with a separate approach to business logic, data, and interface, and aggregates business logic into a single component , there is no need to rewrite business logic while improving and customizing the interface and user interaction. MVC is uniquely developed to map the traditional input, processing, and output functions in a logical graphical user interface structure

Framework ContentMVC is a framework pattern that makes it mandatory to separate the input, processing, and output of an application. Using an MVC application is divided into three core parts: model, view, controller. Each of them handles their own tasks. The most typical MVC is the JSP + servlet + JavaBean pattern. [5] Explanation of SplitViewA view is an interface that the user sees and interacts with. For older Web applications, views are an interface of HTML elements, and in modern Web applications, HTML still plays an important role in the view, but new technologies are emerging, including Adobe Flash and like xhtml,xml/xsl, Some identity languages and Web services, such as WML. The benefit of MVC is that it can handle many different views of the application. There is really no real processing happening in the view, whether the data is stored online or an employee list, as a view, it is simply a way to output data and allow the user to manipulate it. [6]ModelModels represent enterprise data and business rules. Of the three parts of MVC, the model has the most processing tasks. For example, it may use a Component object such as EJBS and ColdFusion to process the database, the data returned by the model is neutral, that is, the model is independent of the data format, so that a model can provide data for multiple views, Because the code applied to the model can be reused by multiple views only once, it reduces the repetition of the code. [6]ControllerThe controller accepts the user's input and invokes the model and view to complete the user's needs, so when you click a hyperlink in a Web page and send an HTML form, the controller itself does not export anything and do any processing. It simply receives the request and decides which model component is called to process the request, and then determines which view to use to display the returned data. [6]difference the difference between a frame and a design patternMany programmers often confuse frame patterns with design patterns, thinking that MVC is a design pattern. In fact, they are completely different concepts. [7] The two concepts of frame and design pattern are always confusing, but there are still differences between them. Frameworks are often code reuse, while design patterns are reuse, schemas are in between, part of code reuse, partial design reuse, and sometimes analysis can be reused. There are three levels of reuse in software production: internal reuse, an abstract block that can be used publicly in the same application, code reuse, the assembly of common modules into libraries or toolsets for use in multiple applications and domains, and the reuse of application frameworks that provide a common or off-the-shelf infrastructure for specialized areas For the highest level of reusability. Although the framework is similar to the design pattern, it is fundamentally different. The design pattern is a description of the recurring problems in an environment and the solution to the problem, which is more abstract than the framework, the framework can be expressed in code, can be directly executed or reused, and only instances of the schema can be represented in code; Design patterns are smaller elements than frames, and a framework often contains a One or more design patterns, the framework is always targeted at a particular application area, but the same pattern can be applied to a variety of applications. It can be said that the framework is software, while design patterns are software knowledge. What are the framework modes? MVC, MTV, MVP, CBD, ORM, etc., what are the frameworks? The C + + language of QT, MFC, Gtk,java language ssh, SSI, what are the design patterns of the PHP language Smarty (MVC mode), the Python language Django (MTV mode), and so on? Factory mode, adapter mode, policy mode, etc. in short: the framework is a great wisdom, used for the division of Software design; Design patterns are small tricks that propose solutions to specific problems to improve code reuse and reduce coupling links: http://baike.baidu.com/link?url =tn3mc-jd4bkuanmrovpm1hwaq91kvt3dxuyv6qdanb1s5amjgria4cmj9nsudk3eqsj3q4zjd3dwa75lfv86xxhubaolut32cwzp-h55m33u1tf87c4p-gmt Btibftye

About MVC Grooming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.