Step by step build your own lightweight mvcphp frame-(a) What is PHP framework and MVC design pattern

Source: Internet
Author: User
Tags php framework

PHP Framework

PHP framework for many novice may find it difficult to climb, in fact, as long as you know a framework of the process, understand the principle, basic similar framework can be understood, the real development of PHP framework from the PHP5 began, actually PHP4 times there are some framework, But because the framework does not bring you more convenient and feel very complex, speed is not pure PHP good, so has been to the PHP5 has a big development, PHP5 object-oriented model of the development of the framework has played a great role.

The framework is to provide a basic framework for developing web programs, and the PHP development Framework puts Phpweb program development on the pipeline. In other words, the PHP development framework helps facilitate rapid software development (RAD), which saves you time, helps create more stable programs, and reduces the effort of developers to write code repeatedly. These frameworks also help beginners create stable programs by ensuring proper database operation and programming only in the presentation layer. The PHP development framework allows you to spend more time creating real web programs rather than writing repetitive code.

PHP frameworks have been widely used, mostly based on MVC architecture patterns, and event-driven patterns.

MVC design Pattern

The full name of MVC is the model View Controller, which is the abbreviation for the models-view-controller, a software design paradigm that organizes the code with a method of business logic, data, and interface display separation. Aggregating business logic into a single component does not require rewriting business logic while improving and personalizing 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.

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.

Step by step build your own lightweight mvcphp frame-(a) What is PHP framework and MVC design 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.