MVC schema Pattern

Source: Internet
Author: User
Tags php language zend zend framework

MVC schema Pattern

Reference:

MVC Framework _ Baidu Encyclopedia
Https://baike.baidu.com/item/MVC%E6%A1%86%E6%9E%B6/9241230?fr=aladdin

The MVC framework MVC full name is the model View Controller, which is model-Views-Controllers (Controller)Abbreviation, a software design paradigm that organizes code with a separate approach to business logic, data, and interfaces, and aggregates business logic into a single component, without the 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. Introduction MVC is the beginning of the desktop program, M refers to the business model, v refers to the user interface, C is the controller, the purpose of using MVC is to separate m and v implementation code, so that the same program can use different representations. For example, a batch of statistical data can be represented by histogram, pie chart. C exists to ensure the synchronization of M and V, and once M is changed, V should be updated synchronously. [1-2] Model-View-Controller (MVC) is a software design pattern invented by Xerox PARC in the the 1980s for programming language Smalltalk-80, which has been widely used. It was later recommended as a design model for Oracle's Sun Company's Java EE platform and was welcomed by a growing number of developers using ColdFusion and PHP. Model-View-controller mode is a useful toolbox that has many benefits, but also has some drawbacks. MVC Programming PatternsEditMVC is a pattern of creating WEB applications using MVC (Model View Controller-View-Controller) Design: [1]
    • Model (models) represent the core of the application (such as a list of database records).
    • View displays data (database records).
    • The controller (Director) processes the input (writes to the database record).
The MVC pattern also provides complete control over HTML, CSS, and JavaScript. Model is the part of your application that handles application data logic.
Typically, model objects are responsible for accessing data in the database. View is the part of the application that handles the display of data.
Typically views are created from model data. A controller is a part of an application that handles user interaction.
Usually the controller is responsible for reading data from the view, controlling user input, and sending data to the model. MVC layering helps you manage complex applications because you can focus on one aspect at a time. For example, you can focus on view design without relying on business logic. It also makes testing of applications easier. The MVC hierarchy also simplifies group development. Different developers can develop views, controller logic, and business logic at the same time. Framework content MVC refers to some kind of framework of the MVC pattern, which makes it mandatory to separate the input, processing, and output of the 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.

Differences between framework and design patterns many 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. A framework often contains one or more design patterns, and 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 and so on;What are the frameworks? C + + language qt, MFC, Gtk,java language ssh, ssi,php language smarty (MVC mode), Python language Django (MTV mode), etc. What are the design patterns? Factory mode , adapter mode, policy mode, etc. in short: The framework is a great wisdom for the division of Software design, design pattern is a small skill, the specific problems proposed solutions to improve code reuse rate, reduce coupling. Common Frameworks StrutsStruts is part of the Jakarta Project under the Apache Software Foundation. The main architectural design and developer of the Struts framework is Craig R.mcclanahan. Struts is the undisputed king in the Java WEB MVC framework. After more than nine years of development, struts has grown into a stable, mature framework, and occupies the largest market share in the MVC framework. But some of struts's technical features have lagged behind the emerging MVC framework. With spring MVC, Webwork2 these more sophisticated, more scalable frameworks, struts has been challenged as never before. But in terms of product development, struts is still the surest choice. Struts consists of a set of mutually collaborative classes (components), Servlets, and JSP tag lib. The Web application based on struts architecture basically conforms to the design standard of JSP Model2, which can be said to be a type of change of MVC design pattern. Based on the description of the framework, it is easy to understand why struts is a web framework, not just a combination of some tag libraries. But Struts also contains a wealth of tag libraries and utility classes that work independently of the framework. Struts has its own controller, and incorporates other technologies to implement the model and view layers (views). At the model level, struts can be easily combined with data access techniques, including EJB,JDBC and object Relation Bridge. In the view layer, struts can be combined with these presentation layer components, such as JSP, Velocity templates,xsl, and so on. [8 SpringSpring is actually a concrete implementation of the design ideas described in the expert one-on-one, the development. In one-on-one, Rod Johnson advocates the design of the Java EE Pragmatism and provides a preliminary development framework implementation (INTERFACE21 development package) with the book. Spring is a more comprehensive and concrete embodiment of this idea. On the basis of the INTERFACE21 development package, Rod Johnson has been further transformed and expanded to become a more open, clear, comprehensive and efficient development framework. Spring is an open-source framework that was created by Rod Johnson and described in his book, "The Java EE Design Development Programming Guide". It is created to address the complexities of enterprise application development. Spring makes it possible to use basic javabeans to accomplish things that were previously only possible by EJBS. However, the use of spring is not limited to server-side development. From the standpoint of simplicity, testability, and loose coupling, any Java application can benefit from spring. In simple terms, Spring is a lightweight control reversal and face-oriented capacitive framework. Of course, this description is a little too simple. But it does outline what spring does. [8] ZFThe Zend framework is a fully PHP5-based, open-source PHP development Framework supported by Zend, which can be used to develop WEB programs and services, and ZF uses MVC (Model–view-controller) Schema mode to detach different parts of the application to facilitate program development and maintenance. (The detailed use of the MVC framework and its related specific operations can be read in reference materials: [8] or expand reading second, three, four.) ) . NET. NET mvc[9] is the official Microsoft-provided, MVC-based,. NET Web application (Web application) framework that comes from the monorail of Castle (Castle Monorail is from Java), and the latest version is . N 4.5. [10]

MVC schema Pattern

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.