PHP framework, hurt not to hurt

Source: Internet
Author: User
Tags php language php framework
PHP frame, can't hurt, can't hurt

Since rails has blown a frame of wind, other languages have responded, java,python,scala,php, regardless of static dynamic language has appeared to mimic the framework of rails mode, in which the PHP language framework productivity is more first-class, the mainstream PHP framework has more than 5 kinds of With the not-so-famous framework, I estimate that there are at least 20 kinds of frameworks, horrible quantities!!

PHP framework of the road has been full of controversy, from PHP should not use the framework, to should not imitate rails, but not in the PHP framework of the blowout growth, all kinds of framework you sing my debut, online is only a list of some of the framework and profile can become a piece of article, called "the top ten most popular PHP framework rankings." PHP Framework is more well-known: CodeIgniter, cakephp and other small and medium-sized framework and Zend, Symfony and other large-scale framework. I've been wondering why the number of PHP frameworks is so large?
1. PHP Development Framework is too ' easy '
Don't scold me, to tell the Truth, PHP Development Web framework of the threshold than other languages, really low too much, PHP itself has a support for the web, to do a framework, Just write a single-entry index.php, then execute the corresponding controller class through the module and action parameters, and the view code, a very simple framework is good, the skilled programmer finished in a day or two. If it's too easy, just wrap it up a bit, wrap the $_request,$_session, encapsulate the database operation, and so on. A model-like PHP ' MVC framework ' is basically out here. Be skilled a programmer has done it in a week.
In contrast to other languages, with Ruby as an example, just the basic functions of request processing, parameter parsing, and so on, are much more than a week's work, plus the high flexibility and complexity of the ruby language, so that he needs to develop a framework that takes the effort to go beyond the general, The low threshold of the development framework is one of the elements of the PHP framework flooding.

?

2. PHP is weak in packaging, resulting in a lack of flexibility in the framework
This is also the fact that PHP is a lot of frameworks, but generally to evaluate the project to choose the appropriate framework, if it is a simple Web project, generally choose CodeIgniter, cakephp such framework, if it is a large-scale application, will also choose Zend, Symfony and other large framework, Because you'll find that using Zend and CodeIgniter is completely different.
Perhaps I say the abstract, then I give an example: in the default PHP environment, there is no AOP function, the existing methods of the class can not be functional enhancements, in the case of the need to implement similar functions, you need to display the modification of the outside of the code, it is very popular to use the Magic function of PHP, However, you still need to modify how the object is created.
Still in contrast to Ruby, it has almost built-in AOP support, which can be done with full external calls without changing the functionality.
This ability in the framework of the packaging of the difference is more significant, in PHP the complexity of the framework is also increased the user's difficulty, and not like Ruby, such as the full complexity of hiding inside the framework. (The same goes for JavaScript, which is supported by jquery).

?

3. PHP implementation mechanism, so that the performance of the framework has become a criticism
PHP running mode, each request end will completely release all resources, resulting in the framework of the load becomes a non-negligible performance burden, even if you do not mind the above mentioned large framework of high complexity, this also makes you not easy to use in small and medium-sized projects such as Zend and other large frameworks. It also limits the ability of the framework.

According to my analysis, it is these three reasons, so that the framework of PHP so much, but none of them become a true mainstream. This is not necessarily a good thing, in Ruby, Rails Unified, which makes the rails community more prosperous than ever before, and many Ruby gurus develop features that are enhanced by plugins. So that it has a very benign development. jquery also has the same experience in the JS framework.
In PHP, the master is to continue to contribute their new framework, frankly, I personally feel that the help is very limited, but also muddy this cylinder of water, in fact, many frameworks can be merged into a development, and with the emergence of 100 60 points of the framework, rather than the emergence of a good 100-point framework. PHP framework, a lot of so I can't hurt Ah hurt.

  • 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.