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 (default7#zbphp.com).


1) thinkphp (version 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 contacted ThinkPHP3.1.3 in fact, the 3.2 version just soon after, 3.2 and 3.1.x is part of the refactoring, with the latest namespace , considering that the purchased virtual host may not support the namespace (namespace must be supported by PHP 5.3.3+), Also consider that most of the domestic enterprises if already used thinkphp, certainly may not be the latest version, so the first choice is ThinkPHP3.1.3, with him to do a website. The overall feeling is very good, he did for you as much as possible and everything. And Thinkphp is a company in support, so do not say suddenly collapsed dissolved, if the enterprise wants to use PHP to do a platform, very good choice, long-term stability.


2) Yii (version 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 have a promising future . began to study Yii (Yii 1.1.x). Read the handbook, all in English, and occasionally see the post that Yii author is Chinese. It was later confirmed that Yii was indeed written only by Chinese. Look at the introduction, I downloaded the installation, feeling to their own level is very difficult, a lot of memory of the zii widgets, and the coupling is very high, ( I just started to contact Yii when writing a view http://bbs.csdn.net/topics/ 390807796) The HTML template has a higher degree of coupling and gives up.


3) cakephp (version 2.5.1)

At this time, the mind is to choose an easy frame, think of many years ago heard 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, compared to Yii, and thinkphp as there is a special picture verification code, SESSION, cookie operation, very similar to thinkphp, a lot of you have done. Then I download to do their own a website, I started as the administrator part, the results found that according to CakePHP's thinking, the administrator and the front desk should actually be in a file inside . For example, if you have a post table, then your admin and front-desk operation for Post is all in Postcontroller, and I expect it to be separated from front and back , without coupling .


4) Symfony2 (Symfony 2.5)

If not a book on the introduction to Symfony, and have a lot of very good comments on him, I think I would definitely not know and focus on symfony2. began 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 my previous knowledge of PHP . Symfony2 must be in PHP 5.3.3 above version, actually now go to see, is must php 5.4+ above version, because some of his components component requirements is the latest version, because when I write this article, my contact with these frames is a few weeks ago, And this period of time to see the frame too much, may be a bit confusing, if there is a mistake, or explore can send mail default7#zbphp.com. After installing the SYMFONY2, carefully read the contents of Symfony2, his biggest feature is to compare the operation of a set of programs into computer computer input+output+cpu. The Request resonse and the PHP Processing section (in fact this idea later other framework Yii Laravel CakePHP 3.x all borrowed from it ). I continue to read Symfony2 's documents, he will not be like thinkphp that the picture verification code, IP, IP attribution to how to query, pictures how to upload processing and so on, search a lot of relevant information, feel Symfony2 is an HTTP framework, but not the MVC framework, Instead, it is an HTTP framework. He has C and V, but not M. The idea is completely different from Yii thinkphp, the idea of component -component is not the same as any of Ror's objects, he is any component, low coupling .



5) Laravel (Laravel4.2)

I continue to search the PHP MVC framework of the post, looking for a 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 www.golaravel.com, introduce laravel framework, documents, introduced to restful function, is enterprise-level framework.

In fact, I have always wanted to find a framework like this, long-term, stable, will not be dissolved suddenly not support, will not say today a change tomorrow. And there are several functions of the newest namespace, which can be omitted to reconstruct the trouble later . Download Install Laravel, also composer mode installation. And then began to use, found his official has been very respected routing features, use is very cumbersome. A route is written for each request URL. Think of here I can not imagine, a website URL a lot of, and not the same rules, including admin backstage, if so every URL to write a route , and all are some to routes.php this file inside, you imagine, How much resource time does the load cost??? And the description of the document is rich, but see really very little, not complete (compared to 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 that supports namespaces, supports AR, is easy to use, has image verification code generation, image upload processing, watermark processing, support i18n, multi-lingual, many people using, mature documents, stable long-term, suitable for enterprise-class . At the end of the comparison, the frameworks are back to the first few frames and back to Yii. Think of why you initially feel that yii is inappropriate, but to compare other frameworks, only to find that Yii is almost the best, the pursuit of execution efficiency, speed (of course, relative).

Compared with so many frameworks, and found a phenomenon, Chinese programs and foreign programmers thinking differently , Chinese programmers are looking at the wallet order, foreign programmers are completely looking at their preferences to order. In other words, Chinese programmers try to adapt to the environment, while foreign programmers try to change the environment. How to say, the same demand project, the Chinese programmer first of all to consider is server support? Version support? How much access do you have to endure? Configuration restrictions how, how to run the fastest, more than 90% of the domestic PHP programs are running on the virtual host, a server hundreds of or even thousands of sites. And foreign programmers do not need to consider these, they follow their own ideas, completely regardless of the configuration, he should feel how an architectural idea, and not to care about how the machine is running the fastest, people to decide the architecture, rather than machine configuration decision Architecture , a very literary feeling .

For example, Laravel, each of his URLs must write a route, which is completely regardless of server performance, assuming that the entire site has 3000 different forms of the URL, that one-time loading how much cost?? There are more popular procedures in foreign countries Drupal, but also completely do not care about the configuration of the server, but purely from the perspective of human thinking to plan, he will all the content of all imagined as a node, key-val form, completely ignore the configuration restrictions. I run Drupal on my local machine (dual-core CPU 6G memory) on my computer, not to mention uploading it to the server. (Wen bydefault7#zbphp.com)










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.