My views on laravel thinkphp Yii symfony2 CI cakephp

Source: Internet
Author: User
Tags i18n drupal yii

This is my sincere experience in trying to use Laravel, thinkphp, Yii, Symfony2, CI, cakephp, Yii2 after the real Idea (

1) thinkphp (version number 3.1.3)

I started with the thinkphp 3.1.3, the entry threshold is the URL and method corresponding to this point. When I first approached ThinkPHP3.1.3, the fact that the 3.2 version number was just out of date, 3.2 was partially refactored compared to 3.1.x, with the latest namespaces , considering that the purchased virtual host might not support namespaces (namespaces must be PHP 5.3.3+ Support), but also considering that most of the domestic enterprise assumptions have been used thinkphp, certainly may not be the latest version, so a start to choose is ThinkPHP3.1.3, with him to do a site. The overall feeling is very good, he did everything possible for you. And Thinkphp is a company in support, so do not say suddenly collapsed dissolved, assuming that the enterprise wants to use PHP to make a platform, very good choice, long-term stability.

2) Yii (version number Yii 1.1.14)

After I learned the thinkphp, I thought of learning a more framework, so that later to find a better job, talk about it. Then one time I went to a financial company to interview PHP, they use Yii. Back online search for YII related data, see a lot of people on the introduction of Yii praise,AR, delay loading, DAO, l10n, i18n, feel that Yii must be very promising . The study was started on Yii (Yii 1.1.x). Look at the manual, all in English, accidentally saw a post that Yii author is Chinese. It was later confirmed that Yii was really just written by the Chinese. Look at the introduction, I downloaded the installation, feel very difficult to their own level today, very much to remember the zii widgets, and coupling is very high, ( I just started contact with Yii when writing a view /390807796) The HTML template has a higher degree of coupling and gives up.

3) cakephp (version number 2.5.1)

At this time, the mind is to choose a easy-point framework, think of the very many years have heard of the framework CakePHP (the latest version of CakePHP 2.5.1). Download down to install, see The document does not support namespaces, not the latest functional methods of PHP . Read a part of the document in English, very convenient feeling, control Yii, and thinkphp as there is a special picture verification code, SESSION, cookie operation, very similar to thinkphp, very much for you to do. Then I download to do one of my own site, I started as the administrator part, the results found that, according to CakePHP's thinking, the administrator and the foreground should actually be in a file in the face . For example, you have a post table, then your administrator and foreground of the post-oriented operations are all in Postcontroller, and I expect that must be separated from front and back , no coupling .

4) Symfony2 (Symfony 2.5)

Assuming it's not a book to introduce to Symfony, and he has a lot of very good reviews, I think I would definitely not know and focus on symfony2. Started to contact Symfony2, found that his installation method and I have been exposed to the PHP completely different, composer installation, very novel, which completely overturned I have some knowledge of PHP . Symfony2 must be in PHP 5.3.3 above the version number, in fact, now go to see, it is necessary to PHP 5.4+ above version number, because some of his components component requirements is the latest version number, because I wrote this article, my contact with these frames is a few weeks ago , and this period of time to see too many frameworks, may be a bit confusing, assuming there is a mistake, or explore the ability to send e-mail After the installation of Symfony2, carefully read the contents of Symfony2, his greatest feature is the implementation of a complete set of procedures against computer computer input+output+cpu. The Request resonse and the PHP Processing section ( in fact this idea later in the other framework Yii Laravel CakePHP 3.x all borrowed from it ). I continue to read Symfony2 's documents, he will not be like thinkphp the same as the picture verification code, IP, IP attribution to how to query, pictures how to upload processing and so on, search very much related information, feel Symfony2 is an HTTP framework, but not the MVC framework, Instead, it is an HTTP framework. He has C and V, but no M. Thinking and Yii thinkphp completely different, modular component thought, with Ror whatever is the idea of the object is not the same, he is no matter what are components, low coupling .

5) Laravel (Laravel4.2)

I continue to search the PHP MVC framework of the post, looking for a very long time, see an article with a picture (the above one), said by the end of 2013, Laravel share is the highest! Then go to understand Laravel, Baidu search Laravel, already have a lot of sites, such as, introduce laravel framework, documents, introduced to restful function, is enterprise-level framework.

In fact, I have always wanted to find a framework, long-term, stable, will not be dissolved in a sudden not support, will not say today a change tomorrow. And there are several features of the newest namespaces that can be omitted later often to refactor trouble. Download Install Laravel, also composer mode installation. Then began to use, found that his official has been very respected routing features, use is very cumbersome. A route is written for each request URL. Think of here that dare not imagine, a site URL is very many, and not the same rules, including the administrator backstage, suppose so each URL to write a route , and all are some to routes.php this file in the face, you imagine, How much resources will be spent on loading??? and descriptive description of the document is rich, but see really very little, not complete (control Symfony cakephp, his documents really few).

6) Back to Yii (Yii 2.0)

Actually, I've been looking for this for a while. An MVC framework supporting namespaces, support for AR, easy to use, self-generated image verification code, image upload processing, watermark processing, support i18n, multi-language, there are very many people in use, mature documents, stable long-term, suitable for enterprise-class . The final comparison with so many frameworks or back to the most thought of the framework, once again back to Yii. Think of why you start to think that Yii is not suitable, but to contrast with other frameworks, only to find that Yii is almost the best, the pursuit of efficiency, speed (of course, relative).

Compared with so many frameworks, found a phenomenon, Chinese program and foreign program ape thinking different points , China's program Ape is to look at the wallet order, foreign program ape completely is to see their preferences to order. In the second argument, China's procedural ape is trying to adapt to the environment, while the foreign program ape is trying to change the environment. How to say, the same demand project, Chinese program Ape first of all to consider is server support? Does the version number support? How many interviews have you got? Configuration restrictions how, how to do the fastest, more than 90% of the domestic PHP program is executed on the virtual host, a server hundreds of or even thousands of sites. and foreign program apes do not have to consider these at all, they follow their own ideas, regardless of the configuration, he should think how an architectural idea, rather than care about how the machine executes the fastest, people to decide the architecture, not the machine configuration decision Architecture , a very literary feeling .

For example Laravel, he inside each URL must write a route, this is completely regardless of server performance, if the entire site has 3000 different forms of the URL, that one-time load is how much cost?? There are more popular abroad procedures Drupal, but also completely disregard the configuration of the server, but purely from the perspective of human thinking to plan, he will all the contents of the imagination as a node, key-val form, completely ignore the configuration restrictions. I perform drupal on my local machine (dual-core CPU 6G memory) on my computer, not to mention uploading to the server. (Wen

==============2014-6-22, add =================.

To add, the United States host on the DreamHost provide phpserver support the latest version of PHP, the background is free to switch. So all the latest frameworks are supported.

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