What is the best PHP framework? Why?

Source: Internet
Author: User
Tags php framework zend framework
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply content: ------------------- Updated at: 2014. 09. 02 ------------------

Laravel China is ready Laravel Chinese document , You are welcome to initiate an issue to submit missing and suggestions --> Laravel China GitHub

------------------- Updated on: 2014. 08. 17 ------------------

PHPhub-PHP & Laravel Chinese community A clean PHP Chinese community has always been my dream. I have written one in the past few days. today it is officially launched. although there are many other functions that need optimization, please join us and give me some motivation. haha.

Written in Laravel4, the code is also open-source summerblue/phphub GitHub

------------------- Updated on: 2014. 03. 06 ------------------
A convincing data:

Laravel is the Most famous PHP Project On Github. it has 8627 stars, leading the second-place Symfony and the third-place CI by nearly 1000 stars. for details, see here --> Most star PHP Project On GitHub.

How many years can ci and symfony reach today's influence, while Laravel's first commit occurred in Jun 09,201 1. see:



---------------- First release ---------------------

Laravel4, the entire PHP community is crazy about the framework.

Laravel4 focuses on best practices. it is a positive framework, which is well aligned with Rails of niub. it draws on many successful elements that have been embodied in the mature framework:

  1. RESTful Routing;
  2. The exquisite Blade template engine is designed to be light and flexible;
  3. Reasonable ORM model layer, Eloquent ORM, and the success of Rails;
  4. Migration Database version system and seeding;
  5. The package manager Composer opens a door to spring;
  6. Emphasize Test-driven, and the entire core has undergone complete testing and high-quality code;
  7. The command line driver can be highly automated (pay attention to efficiency, code generator...) for reference and rails;
  8. Make rational use of the new version of PHP to make code writing more fun and keep up with the times;
  9. Active communities are very important. everyone is learning and creating good tools to speed up development, improve programming efficiency, and accept new knowledge quickly.
  10. Support for php standardization-PHP Framework Interop Group

Other links:

Best PHP Frameworks for 2014
Why Laravel is Taking the PHP Community by Storm
The future of web development is Laravel

2014 I have a wish to turn the PHP community into the past, Laravel, Composer, and PHP-Fig will be the future, rapid development, compliance with specifications, DRY, building a united community, smart, rational community.

There is no better time than now. my friends, let me start and let new PHP people and old birds know that there is such a good thing in the PHP community, contribute to the PHP community. may God be with You.
------------------------------------- END ------------------------------------- Laravel was first introduced, followed by Yii, Laravel's design ideas and support in engineering practices, surpassing ThinkPHP for several generations. If the native PHP is a firegun, ThinkPHP is a rifle, and Lavavel is a submachine gun. If you want to hunt, it is enough to bring a rifle to the battlefield, but it is not enough to use a more automated assault rifle.

There are many advantages:
  • Composer for package management
  • The standard Autoload implementation makes 'include xxx. php' a Historical
  • Various dependency injection
  • ORM support
  • Easy-to-use command lines and scaffolding
  • Rich documentation and active communities
Even with so many benefits, ThinkPHP is still catching up with the level of ror a few years ago. ThinkPHP users are just too lazy to get started with new knowledge.

ThinkPHP is suitable for Chinese users. do not bring ThinkPHP to others when you are using ThinkPHP. thank you. After PHP5.3, PHP-FIG and Composer bring huge changes to the PHP community, if a framework has not been used to Composer, or invent everything here, it is really a little outdated.
With the support of Composer, it is not difficult to implement a framework like a computer, but it is difficult to make a "good" framework. Six frameworks (ZF1, SF2, CI, Yii, Laravel4, Silex) used in the project are not counted. The best frameworks I have ever seen are Laravel4, explanation:
  1. Directly. Various common functions are implemented by some simple services. when accessed through Facade, many common problems are handled in a simple and elegant manner, and the interface design is very considerate, most application scenarios have been taken into consideration for you. Because the function is simple and direct, you do not need to go into details about the document. there are not many documents on the official website. you can start to do the work after reading it again.
  2. Open. With Composer, excellent code can be easily introduced into the project. Laravel's framework uses a batch of basic class libraries under boris, whoops, monolog, swiftmailer, and symfony, instead of having to write your own code.
  3. Simple. Not only is it easy to use, but the implementation of the framework itself is not as heavy as other "enterprise-level" Frameworks. each function is rarely coupled and assembled by Dependency Injection containers. The implementation of the framework from the source code is not so many abstract layers.

In addition, new PHP users should start learning from PHP The Right Way and have a correct understanding of PHP in The new era. CI is still suitable for use. There is no "best" PHP Framework. it is only suitable for you and your project. the true and responsible answer is what you make, try, compare, and decide. If you are a newbie, I suggest you study ci. if you have been in the business for a long time and are afraid of trouble, I suggest you read yii. if you increase development efficiency and are willing to contact new toys, I recommend you read laravel4CI.
If you want a better framework, PHP cannot satisfy you. use rails. It is not the answer of Jin you, but it is really not the best, only the most useful.
The framework is divided into four types:
1. the Minimalist system of [getting the file ready first is a big step]: Slim/KissMVC => almost all
2. [allow the attacker to use this function] functions: Yii, CI, Cake, etc. => Yii is better than others
3. [cannot it be a bit higher?] Laravel, ZF => Laravel is better than Laravel.
4. [speed is the most practical] C-Series: Yaf, Phalcon => Phalcon is much richer than zookeeper, and Yii is strongly recommended.
  • Yii Framework is the first choice, with complete documentation, thorough object-oriented, and superior performance. After the model is instantiated, many components can be used. The only thing I don't like is that the queried data operations are all object-based. I prefer the array method, so I have to use chtml: listData () for conversion. In addition, zii widet is very good at improving the development speed.
  • In fact, thinkphp 3 is really good and easy to use, and the documentation is more suitable for Chinese people. I personally prefer the db and route rest sections of thinkphp.
  • Zend framework is more like a super-large class library. although the running speed is a little slow, many frameworks have zend class interfaces, and their value is evident.
  • Codeigniter did not look at it carefully. he did not dare to say anything about it. many people use his branch edition and kohana. if you are interested, you can check it out.
  • Finally, let's talk about speedphp. I like the design idea of this framework very much. It is simple and efficient. it has an sae version, which is easy to expand and suitable for transformation and has a good speed, I like to use this framework to develop social games.
After talking about this, the framework is best for your business. It is hard to say which one is the best.

Benefits of using the framework include:
1. use the standard program architecture and practical components provided by the framework for efficient development
2. the use of well-developed documents is conducive to the training and collaborative development of new team members, reducing communication costs

It is a good framework to achieve the above purpose. Currently, the mainstream frameworks are MVC structures and some practical components and class libraries. apart from database processing, there is little difference in other aspects.

I personally recommend Zend Framework and Yii. The best php framework is spring, of course.

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.