Why is PHP a concentration camp? one day I chatted with the boss of a great startup company in DUMBO and talked about why non-PHP developers generally despise the PHP and PHP communities. He put forward a point of view that impressed me a lot because he had never heard of it before. Why are you saying that PHP is a concentration camp?
One day I chatted with the boss of a great startup company in DUMBO about why non-PHP developers generally despise PHP and related communities. He put forward a point of view that impressed me a lot because he had never heard of it before.
If you don't know what kind of complaints most programmers will give to PHP, these complaints will be like this:
- Ugly syntax
- Lack of features required by other languages (no namespaces or closures before version 5.3)
- Inconsistent function naming, usage conventions, and other weird things
- Process and object-oriented obfuscation
- Basically, 80-90% of PHP projects are a bunch of shit.
But what he said about PHP is another problem. He didn't say that this language is a problem-he believes that this language is surrounded by a common cultural phenomenon and is a cultural tradition created by the creators of the language, it seems that this has encouraged some bad programming practices. That is, it makes PHP code inferior and not maintainable.
This kind of language or framework reflects the founder's philosophy and is promoted by relevant communities. He used Ruby and its founder Matz as an example. Matz wants a language that is easy to read and write and can improve the efficiency of programmers. Didn't you see Ruby developers say they must be quick development and the elegance of this language?
Next is DHH? And its Rails framework. There are also Guido and his Python language. So I was wondering: What about Rasmus for PHP?
Rasmus Lerdorf is very interesting. He created the first version of PHP language and has been improving it. he worships it like a god in the PHP community, and he has the greatest authority in any aspect of PHP. He was invited to give speeches at numerous meetings and hired by large network companies. he was respected by everyone, despite the fact that: he has become an image of many problems on PHP that most non-PHP programmers despise.
Rasmus advocates avoiding the use of frameworks and treats PHP as a template language. For him, this approach can generate direct operation efficiency and scalability (known as program load ). For others, this approach leads to a large number of process-like code and a large number of projects that cannot be maintained. In the past 10 years or so since the birth of PHP in 1995, all PHP projects have been written in accordance with this guidance.
At the same time, another problem suddenly emerged: before PHP5.0, PHP gained a lot of new followers in the early stages of PHP. The entry threshold for this language is surprisingly low. anyone can download the self-decompressed × AMP Windows program installation package and use this language within two minutes. In addition, at that time, the consensus on the MVC model in web development did not really appear. In this way, you can imagine what a group of new users can create together with a language that lacks good development practices? A pile of garbage that cannot be maintained. The overall environment is like this.
Don't misunderstand me-there are still a lot of excellent PHP developers, even at the time. However, as I said, the shoddy Cainiao works are everywhere. When a cowboy PHP programmer has no guiding principles to develop a program together, like PHPbb, PHPNuke, and many rough. php3 packages. But can you simply blame PHP developers? No! Other web language giants, ASP and Perl, are equally notorious. they also promote a method of development in the form of stew.
That's why PHP gets such a nickname. It is because of its history. Most PHP developers who have switched to Python, Ruby, and Java did not rethink the language when the web MVC concept emerged. In addition, there are some explicit and ironic comments like "Ruby parse" Zed Shaw complained about the ideas of some programmers "being poisoned by PHP". such comments are prevalent on RubyInside.
PHP is a concentration camp
However, the emergence of frameworks such as Zend and CodeIgniter pushes the language to the correct development direction. In fact, it pushed PHP to the opposite direction as Rasmus expected. Check the Zend and CodeIgniter frameworks and you will find that they are a few well-written documents and programs with good code writing.
Most Ruby developers learn Rails and MVC at the same time. PHP has been used for 10 years. For new beginners, the hateful Ruby didn't give them time to play freely. Rails has ready-made standard guidance, which has a relatively high entry threshold and usually blocks experienced developers.
In fact, PHP applications can be well written as other languages, and they also have a certain speed advantage. The rise of MVC-style development methods in the PHP world has only occurred in recent years. I have to admit that we should thank Rails for this change.
So what is PHP today?
- Various standards (non-uniform, but most projects use MVC, with few junk procedural programs)
- Low entry threshold
- Speed and scalability (PHP should be the best in various scripting languages)
- There is a good unit test framework
- Documents with the best language translation in different countries
In addition, most influential websites on the Internet use PHP as their background language or tool, such as Facebook, Digg, Wikipedia, Wordpress, and Drupal. I believe that an in-depth understanding of PHP will open a programmer's door to more unknown fields.
If you do not agree with the above, leave a comment or email to me-I want to hear why you do not think so.
In fact, I am not a fan of PHP, and I don't feel the language. I use PHP mostly because-you guessed it-someone is willing to pay for me. So all blame is on this:
If you want to make informed decisions on software design, PHP is the best choice for developing web applications.
By the way, if you are sure you want to use PHP to develop the next web application, try CodeIgniter. It is a lightweight, common, and super fast PHP framework. I am a fan of CodeIgniter.
?
:)
The first floor of zjshan 2011-05-13 the second floor of lvhjean 2011-05-13 is good.
I also like CodeIgniter. I am studying it now.
On the third floor, Tyler_Long 2011-05-14 php has used the symfony framework. it can be said that this framework is not better known than codigniter and zend. but throughout the process, I was suffering. I felt very confused. I couldn't understand the written code in a few days. I spent two months on a small project, which is less complicated than a simple blog program.
It is hard to make up for the weakness of a language. so now we are very firm in following python and c #. both are very elegant and can be used in almost different occasions. ironPython and C # can call each other! When I know this, it's hard to express my excitement. you said that c # and python are combined, and what projects can't be done? What other projects are difficult to implement?
So ah, fans of the php framework are still suffering from difficulties... there are many things better than php. the 4-floor cherrycmd php project is difficult to maintain the 5-floor smartfish9 Tyler_Long wrote that php has used the symfony framework. it can be said that this framework is not better known than codigniter and zend. but throughout the process, I was suffering. I felt very confused. I couldn't understand the written code in a few days. I spent two months on a small project, which is less complicated than a simple blog program.
It is hard to make up for the weakness of a language. so now we are very firm in following python and c #. both are very elegant and can be used in almost different occasions. ironPython and C # can call each other! When I know this, it's hard to express my excitement. you said that c # and python are combined, and what projects can't be done? What other projects are difficult to implement?
So ah, fans of the php framework are always confused, and there are many things better than php.
The symfony framework is not very good. I still think the current framework is yii good, codeigniter has never used it, but it is slower than yii, zendframework is slower, and it is over-designed. it is not recommended for serious reasons. I am familiar with python and django, and I feel that it is better to be a website or a php. of course, you must first select a framework and spend some time learning it. On the 6th floor, xieye 2011-05-17 has been using zend for many years. zend features that if you are not satisfied with one of the packages, don't use it. You can select only your favorite ones.
On the 7th floor, bardo cannot fully share the opinion of the bloggers. Mainly lies in the identification of the framework. PHP does not have a good framework. Zend, I have criticized this website. CodeIgniter is just a toy at best. What it can do is just a small enterprise website, and there are quite a number of problems with security and scalability, including KOHANA rewriting based on it.
The biggest sorrow of PHP at present is that there is no good framework. There are some standard things. For example, log4php is copied to JAVA. CAKE, that's the copy of ROR. Sadly, the attacker is not proficient in PHP. Therefore, it is also garbage.