I tried to talk about this issue a long time ago. I have endured it for a long time in zhihu. After reading the texts of many great gods, I can't help but raise it... As we all know, we will not talk about it much. At first, RubyonRails challenged PHP. Now almost all the major PHP frameworks are imitating RubyonRails... The most amazing thing is CakePHP. However, many great gods who make large frameworks seem to have forgotten the simple and easy-to-use nature of PHP. PHP is not a Java, and it seems self-defeating to encapsulate something too powerful! (The number of words I want to talk about this problem a long time ago. I have endured it for a long time in zhihu. I have read a lot of text from the great gods and finally can't help but raise it...
As we all know, we don't have to talk about it. At first, Ruby on Rails challenged PHP. Now almost all the major PHP frameworks are imitating Ruby on Rails... The most amazing thing is CakePHP.
However, many great gods who make large frameworks seem to have forgotten the simple and easy-to-use nature of PHP. PHP is not a Java, and it seems self-defeating to encapsulate something too powerful!
(The number of words is limited. It is not finished yet !) Reply: The php development team lacks a leader with ideas like DHH. From the beginning of 5, the php core team began to look at "PHP is not suitable for enterprise-level development. It is easy to use and suitable for new users. The popular php frameworks do not have their own design ideas, either spring or django, or rails. In the end, php does not have a good framework.
I don't quite agree that php is put on the wrong path by rails. rails is excellent because of some design ideas proposed by dhh, such as dry, such as conventions that give priority to configuration. There are also a lot of best practices. The php framework should learn his thoughts rather than superficial things. It should be said that developers are put on the wrong path by various frameworks, and Rails is stimulating PHP,
Half of the original CakePHP developers felt that CakePHP was not very compatible with PHP, so they re-opened a Lithium PHP framework,
Compared with Zend, Symfony (I personally think zend has a too heavy Java taste. As for whether the function name of Symfony is obj-c, CakePHP is rails or Yii is not. net flavor is not clear) "large" framework. Li3 is a very good framework with two different languages. If it is too evil, it does not need a framework (word limit, on the question)
Taking the official Zend Framework as an example, I think it is more like a code generator and a lot of tricks. When I use Zend Framework, I feel that I am not writing a website, but writing a software in Java or C. There is no such feeling as PHP. Compared with the Zend Framework, Symfony has done nothing better. Just like Android makes a layer on Linux, these frameworks seem to want to build another layer on the basis of PHP. PHP is a very advanced language, but these frameworks have the intention of turning it into the underlying language.
So I prefer to use something more lightweight, such as ThinkPHP and CodeIgniter...
-------------------
I admit that PHP is not suitable for large projects. You can use Java for large projects! Why force PHP? I heard that Twitter is not considering abandoning Ruby on Rails and switching to Java...
I hope to hear your language... It may be shocked.
I used php when I was in college. I started my work with java and started my business with rails. You can play in various languages. After playing such a multi-language environment, I think it is a comprehensive analysis:
Welcome to shoot bricks.
- Rigor. It is difficult to write code without Bugs. PHP itself is an hack language, and various patching methods are used to expand itself.
- Ecosystem. The investment or accumulation of the php community is on the web. PHP is very suitable for the development of rapidly changing web products.> (@ Allen) its own advantage lies in generating pages. However, in the fields of transactions, mathematical computing, and security, PHP accumulation is insufficient to support its application in the enterprise field. The php development team lacks a leader with ideas like DHH. Best practices for rails web (pjax, scss, coffee)
- Php is more of a front-end application scenario. there is basically no market on the backend, desktop, and mobile terminals.
- Interoperability with other platform systems (web service ). Old Enterprise systems interact with each other through webservice. java and. net have mature solutions.
- Version evolution. The release of php6 is delayed.
- The genes used to create a language. > (Php -- abbreviation of Hypertext Preprocessor) (thanks @ 文), apparently mainly for the purpose of webpage creation. Of course, this is a long history, however, we can see from the history that the original intention of some language designs will become the genes of the language and will be inherited along with the development of the language.
- Maintenance Cost
Because there are too many hack, too many global functions, magic variables, and various types of inconsistency, the maintenance cost is very high.
The characteristics of php language are insufficient. The result of a framework is that various frameworks are full and the quality is uneven.
> (In the words of @ Wang Xiaoyi) taking the official Zend Framework as an example, I think it is more like a code generator and a lot of tricks. When I use Zend Framework, I feel that I am not writing a website, but writing a software in Java or C. There is no such feeling as PHP. Compared with the Zend Framework, Symfony has done nothing better. Just like Android makes a layer on Linux, these frameworks seem to want to build another layer on the basis of PHP. PHP is a very advanced language, but these frameworks have the intention of turning it into the underlying language.
As for php, its advantages are mature web products and various cms products, such as wordpress.
It is really convenient to write and use the framework.
I don't like frameworks. PHP is easy to use. I'm afraid it was a long time ago. For a beginner in PHP, it is very difficult to write a reliable application without using a framework.