Views on PHP large-scale development frameworks-PHP Tutorial

Source: Internet
Author: User
Tags zend framework
Views on PHP large-scale development frameworks. Since its birth, PHP has been liked by many programmers. it has become a good helper for small and medium-sized webmasters and has trained a large number of PHP programmers. However, with the increasing application of PHP, many times, PHP has been liked by programmers since its birth. it has become a good helper for small and medium-sized webmasters and has trained a large number of PHP programmers. However, as PHP is widely used, in many cases, it is not limited to applications for small and medium-sized websites. it is not uncommon for some large PHP projects.

When we select PHP to develop large projects, we have to consider issues such as development efficiency, development specifications, and post-maintenance. at this time, we often choose a development framework that people recognize, the popular Zend Framework, Yii, Symfony, CodeIgniter, and CakePHP all claim to be capable of developing large applications.

New frameworks are emerging, but when we apply these frameworks to implement products, there will always be various problems:

I. large frameworks often have deep structural theories. The most familiar ones are the well-known theoretical terms such as MVC and ORM, and there is also a lot of in-depth object-oriented knowledge, however, there are only a few people who really know this, which makes the application threshold rise sharply. In addition, the application details in large frameworks are even more complex and the learning cost is relatively high, this is especially embarrassing for PHP, which was originally used to locate small and medium-sized applications.

2. as a scripting language, PHP runs based on host processes (such as apache and php-fpm ), in a single request, the system has gone through a series of processes, including process creation, environment initialization, script compilation, engine running, output, resource recycling, and process destruction, at the programming language level, the overall operation efficiency is two to three orders of magnitude slower than that of compiled languages, with the consumption of a large amount of system resources, on this basis, we need to build and load a complex development framework, which increases the operating costs. In large applications, there is no special demand. sometimes the efficiency of using PHP to add large frameworks is fatal.

3. there are too many factors to consider for large frameworks. developers need to pay extra attention to the details beyond the code when using applications, such: non-standard conventions, lengthy manuals, trivial configurations, complex file directory structures, difficult-to-limit rational constraints, and various class libraries make the development process of most programmers messy, it is also empty to improve development efficiency.

4. the most deadly point is that the framework author constantly looks for silver bullets and tries to create a monster that meets all needs. Large applications have high requirements on system loose coupling. generally, data cannot be operated directly at the development level. see a simple SOA model (as shown in the figure below ), the data layer and the business layer are physically isolated, while the development of the business layer only accesses the service interfaces provided by the data layer. From the current PHP Development Framework (especially the MVC model), ORM is usually used to abstract database tables and perform CRUD operations directly, reliable large-scale applications won't do this (maybe suitable for VPS, but large applications will choose VPS ??).

To sum up, PHP large frameworks are still very embarrassing, but on the other hand, a good PHP large framework is really a good example worth learning, it contains a large number of knowledge systems, such as design concepts, design patterns, code optimization, language features, software engineering, and so on. it integrates the essence of php, but far exceeds PHP itself.

In the end, we still need to say first-class gossip to these large PHP frameworks, "the learners are born, and the users are dead ".

From: RedEye technology blog

...

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.