I have learned PHP and want to learn a PHP framework. I learned from the Internet that ThinkPHP is a Chinese PHP framework, but many people do not think of it very well. CodeIgniter: Some people say it has weak functions and has a relatively old design philosophy. Lar... I have learned PHP and want to learn a PHP framework.
I learned from the Internet that the following frameworks are often mentioned:
- ThinkPHP: PHP framework made in China, but many people do not think highly of it.
- CodeIgniter: Some people say it has weak functions and has a relatively old design philosophy.
- Laravel: It is said that it is the most widely used PHP framework in foreign countries. I went to Github and looked at it very hot. But it seems very cold in China.
- Others: Yii? CakePHP? Zend Framework ?......
Please advise.
------
April August 10: According to your answers, I decided to learn Laravel. Thank you for your answers.
Reply content:
I have learned PHP and want to learn a PHP framework.
I learned from the Internet that the following frameworks are often mentioned:
- ThinkPHP: PHP framework made in China, but many people do not think highly of it.
- CodeIgniter: Some people say it has weak functions and has a relatively old design philosophy.
- Laravel: It is said that it is the most widely used PHP framework in foreign countries. I went to Github and looked at it very hot. But it seems very cold in China.
- Others: Yii? CakePHP? Zend Framework ?......
Please advise.
------
April August 10: According to your answers, I decided to learn Laravel. Thank you for your answers.
Select the PHP framework, you have to look at the FIG: http://www.php-fig.org/
FIG is the abbreviation of Framework Interoperability Group (Framework Interoperability Group). It was founded by several developers of open-source frameworks in 2009. Since then, many other members have been selected, although it is not an "official" organization, it also represents a small part of the community.
The purpose of the organization is to unify the coding specifications of each project with the lowest degree of restriction, so as to avoid the troubles of programming designer development in the style of independent development. There are four sets of specifications:
- PSR-0 (Autoloading Standard) Automatic Loading Standard
- PSR-1 (Basic Coding Standard) Basic Coding Standard
- PSR-2 (Coding Style Guide) Coding Style wizard
- PSR-3 (Logger Interface) log Interface
I used ci and zend all the time, but as @ shamiao said, I am also becoming a laravel fan.
A few days ago I used esoTalk to build a light Forum http://bbs.justjavac.com
New Forum address: http://discuss.flarum.org.cn/
However, the author posted a twitter Post saying that he would replace the development of Flarum with esoTalk. The reason is that the underlying code of esoTalk is not powerful enough, so the new Flarum system uses the laravel framework at the underlying layer.
A couple of weeks ago, there were people selling cute http://discuss.flarum.org.cn/13-esotalk-toby to toby.
Highly recommended: Phalcon and CI
Laravel is a mess, with poor backward compatibility. tab is also used to indent the code style! In today's world of 4-space (PSR, PEAR, ZEND) and even 2-space (Langspec) indentation, the author's credibility is also problematic, phil tried to persuade him to follow his own dsrs for many times. The author agreed, and FIG also had it, but he never changed it... let alone the "Elegance" and "super-CI performance" it advocates.
Laravel can be used for reference, such as IoC, DI, eloquent, and Artisan. All Phalcon have better performance (there are not many PHP frameworks that can be faster than this framework. The only one that can compete with YAF is YAF, but YAF's community, that document, haha ).
Codeigniter's 3.0 is about to be stable, and has also made significant improvements to some of the 2.0's most popular websites (such as native support for composer and highly compatible with HHVM ), moreover, CI's rapid deployment, ease of expansion, and proximity to native syntaxes (just learn how human and concise it is) features also make it increasingly popular, and some relatively good third-party libraries are frequently updated, its Derivative framework Bonfire is also vibrant.
The main disadvantages of CI are:
- IoC/DI/ORM missing
- There is a lack of namespace (in fact, I haven't seen many projects that are fully implemented in laravel's 1 year)
- The Singleton mode is used (this mode has been considered an anti-pattern !)
As for Yii/ZendFramework/CakePHP/Slim/Swole/Symfony/Swoole, I am not qualified to comment on these frameworks because I have never touched them, I am not very interested in learning these frameworks.
Look at Github's most popular PHP open-source project, follow everyone to go, accurate right https://github.com/search? L = PHP & q = + stars % 3A % 3E0 & ref = searchresults & type = Repositories
Personal Recommendation:Phalcon
,Laravel4
Http://segmentfault.com/q/1010000000435088
If you want to get started with thinkphp ci in a short period of time
Other laravel yii phalcon
Short Life, I use Slim
Why? Because Slim is out of the box
I strongly recommend that you learn Symfony.
Advantages:
1. Complete documentation
2. The community is very active.
3. enterprise-level framework, suitable for various stages of continuous iteration of projects from small to large
4. composer, automation, and command line
5. namespace, fully Object-Oriented Design
6. A large number of third-party packages to accelerate the development process
7. A great production environment and development environment, and a complete exception prompt in the Development Environment
8. After being proficient in development, the development speed is very fast. This speed is not due to the rapid release of a demo, but to the ability to quickly produce a complete product
Disadvantages:
1. If you have a high learning curve, you need to learn it. There are many new concepts, but after learning it, it is an advantage.
2. relatively poor performance, but there are a lot of methods to optimize performance later
3. It will still be difficult to learn, but the documentation is very comprehensive. As long as you are willing to spend a lot of time, there will be no problem.
The first level is the deep learning of PHP technology, such as PHP Strings, arrays, files, and PHP advanced features, and PHP operating principles. The second level is the deep development of Web technology: such as in-depth Http protocol, Linux technology, Web server technology, front-end JS technology, MySQL and NoSQL technology. The third layer is the expansion of programming ideas and capabilities: such as data structure and algorithm design, design patterns, good code principles and skills, and large-scale website development technology.
Follow this outline to learn: http://www.sijiaomao.com/course.htm
Yii
It is easy to go to the recruitment website and enter these frameworks to see which one is popular. This is also a trend.
Ps: My company uses yii
You can familiarize yourself with some microframeworks such as slim and silex, and then focus on the symfony components.
Https://github.com/lloydzhou/router
You can see that it is not a framework, but a routing controller, which is very refined.
It is strongly recommended to learn laravel. You will find that you will learn more outside of the framework during the learning process.
1. How to overturn the wall, because the speed of installing and using composer inside the wall is terrible.
2. How to translate, because laravel's documents are mostly in English. For example, laravel5.1 was released in December June. until December October 19, there were still no fully written documents.
3. How to crack the forces, you need to use TP people not to understand, use Yaf people's contempt, use Yii people's testing eyes
4. How to perform O & M? After the project is launched, you need redis memcache opcache php7 hhvm and other performance optimization solutions to solve the problem of low performance.
PHP frameworks are similar. I personally think the key is to select a framework based on the project requirements. Or are you looking for a framework for business development or looking at the framework source code?
Laravel
Recommended
Recommended laravel
I use thinkPHP
Not much. YII:
Http://segmentfault.com/q/1010000000500665#a-1020000000632699
No one recommends YAF? Both Sina Weibo and Baidu Post bars use the PHP framework written in this C language.
Http://www.laruence.com/manual/
I recommend CI or TP3.1.x.
TP 3.2.x TP3.1.x CI cakephp laravel has been used.
At first, I thought CI was too simple. In fact, it was the most scalable. TP 3.2 has many problems.
TP 3.1.x is also a good choice
Yii is good.
Laravel
You won't be disappointed.
Thinkphp is quite practical
Use Laravel
If you select yii, you will not regret it. If you select tp, you will regret it.
ThinkPHP still has many pitfalls, and there are design mistakes and no one cares. The author is missing, and issue is not in charge. currently, thinkphp1.cn is used in this tutorial. It does not have a complete book. It can be used by Daniel and never used by beginners.
It depends on what kind of site you are learning the framework.
I personally like to learn things while doing projects. Things learned through practice are more practical. You can first think about what projects you plan to do and how long the project cycle will take. Then, you can select a framework based on the project size, cycle, and capabilities.
Good Luck!
PS. This is the Chinese Reddit version I wrote using the CI framework-91 headlines
I only use Yii, so I can only recommend it.
Yii learning curve is steep. It's hard to grasp it when you get started. It's easy to develop quickly.
(I would like to agree with those who answered Yii, but have insufficient reputation.
Recommended YAF framework
I wrote something with laravel. It feels good.
My suggestion is:
If you have fun in your spare time, there are three frameworks, you can use it as a simple user logon or message board. Too many suggestions cannot replace your personal subjective feelings. Try it on your own.
If I go to work to take this job as my job, I suggest you learn everything in three ways. From a long-term perspective, every company's strategy is different from the technical history, in addition, the framework has a great degree of similarity. As far as I know, ci and tp are actually very similar, but they only grasp the current technical psychology of Chinese people, which is more convenient and dummies. Or, if you are at work, you can use the one you want to learn. If you are not at work, you might as well work with your colleagues on a practical project with varied demands.
How did you test the framework performance and write a hello world?
But Laravel is not recommended. We recommend Phalcon. Who knows who should use it?
Slim and Silex are recommended for the microframework. The latter is more important, but it can be well mixed with Symfony components. The former can be regarded as the Sinatra PHP version and is also very nice, there is an open-source flat-file blog engine called TextPress, which can be used as a good learning reference.
Zend Framework and Symfony are important. They are too complicated to comment.
It is worth mentioning that Laravel and Phalcon have become popular in recent years. The former is the most popular PHP framework on GitHub so far. It is very easy to use, and the latter is the second most popular PHP framework, almost all of the functions are implemented in C. The first is Yaf, but Yaf's code style is earlier than PHP 5.3, which is not modern enough and has fewer functions than Phalcon ......
In addition, there are also domestic ThinkPHP, which optimizes various domestic PaaS runtime environments such as ACE, BAE, and SAE, and the Chinese documentation is perfect, which is also a good choice.
Symfony must be learned, representing the most advanced design ideas in the PHP framework. It is reliable for developers, active communities, component-based, low coupling, and high reuse;
Laravel and Drupal are both based on Symfony;
New users do not recommend the C extension framework;
In fact, new thinkphp is easy to use and has many documents. It is only suitable for new users ..
However, it seems that tp has a little problem.
Ci, required.
Symfony2 must be learned. It has advanced design ideas and represents the most advanced productivity of PHP!
Symfony2 is learning. Please join us.
One of my open-source frameworks can be studied and developed together if you are interested.
I have been struggling with Laravel and Phalcon before, but after several demos, I decided to choose phalcon. laravel is really bloated, and a PHP framework is even more unacceptable than Symfony. On the contrary, phalcon runs fast, has an elegant design, and is very comfortable to write. In addition, phalcon 2.0 is a leap behind it. In the future, many non-controller-layer code can be encapsulated into extensions. This performance will be excited. However, choosing a framework is similar to looking for a girlfriend. You don't have to pursue the most beautiful things. You just need to suit yourself.
I recently saw a small frame like slim.
Symfony
It seems that Kohana is useless )_
All PHP frameworks are similar. It is easier to learn one and then learn other frameworks,
Use Yii for beginners
Laruence's Yaf framework is good.