Why is it that PHP is a concentration camp _php tutorial

Source: Internet
Author: User
Tags php language php framework codeigniter zend
This article was translated from Why PHP is a Ghetto this article.

One day I was chatting with the boss of a great startup in Dumbo about why developers in non-PHP circles generally despise PHP and PHP-related communities. He made an impression that I was very impressed, largely because I had never heard of such an argument before.

If you don't know what most programmers would complain about PHP, these complaints would be almost like this:

Ugly grammar

Lack of necessary features in other languages (prior to 5.3, no namespaces, closures)

Inconsistent function naming, usage conventions, and some other weird stuff.

Process and object-oriented miscellaneous blending

Basically, 80-90% 's PHP project is rotten to a heap of crap.

But what he says about PHP is another problem. He did not say that there was a problem with the language-he believed that the language was surrounded by a common cultural phenomenon, a cultural tradition that was often created by the creator of the language, and now seems to encourage some bad programming practices. That is, it makes PHP code poor and non-maintainable.

It is true that a language or framework is a phenomenon in which the founders ' philosophical thoughts are respected by the relevant community. He took out Ruby and its founder Matz as an example. What Matz wants is a language that is easy to read and write, which improves programmer productivity. Don't see what Ruby developers say about rapid development and the elegance of this language?

Then there's dhh and his rails framework. There are also Guido and his Python language. So I was thinking: Rasmus for PHP?

The impression of Rasmus Lerdorf is very interesting. He created the original version of the PHP language, and has been improving the language, he is in the PHP community as God as the worship, he in any aspect of PHP enjoys the greatest authority. He was invited by numerous meetings to give speeches, and was employed by Big Internet company (yahoo.com), who gained all respect-despite the fact that he became an image representative of many of the problems in PHP that most non-PHP programmers despise.

Rasmus advocates avoiding the use of frames and using PHP more as a template language. For him, this approach can produce direct operational efficiency and scalability (known as program load). For everyone else, this has resulted in a lot of stew-like procedural code and a lot of items that can't be maintained. Since PHP was born in 1995, about 10 years ago, all of the PHP projects have been written in this direction.

At the same time another problem suddenly arose: before PHP5.0, PHP had a lot of novice followers in the early days of PHP. The entry threshold for this language is surprisingly low, and anyone can download the self-extracting Xamp Windows Installer package and use the language in 2 two minutes. Beyond that, the consensus on the MVC pattern in web development was not really there. So you can imagine a group of novices and a language that lacks good development practices to be able to create what? A heap of rubbish that cannot be maintained. And the whole big environment is like this.

Don't get me wrong--good PHP developers are still a lot, even at the time. But, as I said, the shoddy rookie works are everywhere. When the cowboy-free PHP programmer gathers together to develop the program without guidelines, it appears as phpBB, Phpnuke, and a lot of rough. PHP3 packages. But can you simply blame the PHP developer? No! Other Web language giants, ASPs and Perl, are also notorious for developing a style of stew.

So that's why PHP gets such a stigma. is because of its historical spread. Most PHP developers who have turned to Python,ruby and Java have not gone back to rethinking the language as the MVC concept arose. In addition, there are some like "Ruby Childe" Zed Shaw complained that some programmers thinking "by PHP poison" such an explicit irony, such comments are prevalent in the rubyinside.

PHP is a concentration camp.

But the advent of frameworks like Zend and CodeIgniter has pushed the language to the right direction of development. In fact, it pushes PHP in the opposite direction as Rasmus would like to see. Looking at the Zend and CodeIgniter frameworks, you will find that they are a few of the documents written very well and the code is written in a very good program.

Most developers who have studied Ruby have learned both rails and MVC, and PHP has been used for exactly 10 years. For the novice, The Hateful Ruby did not give them the time to be free to play. Rails has standard guidelines, which are relatively high-entry thresholds, often blocking out the door for inexperienced developers.

In fact, PHP applications can be written in other languages as well, and will have a certain speed advantage. The development of the MVC style in the PHP world has arisen only in recent years. Admittedly, we should thank rails for this change.

So, what is PHP like now?

Various standards (non-uniform, but most projects use MVC, few garbage-like procedural procedures)

Very low entry threshold

Speed and Scalability (PHP should be the best in a variety of scripting languages)

Have a good unit testing framework

Documents with the best translations of national languages

In addition, most influential websites on the internet use PHP as their back-Office language or tool, such as Facebook,digg, Wikipedia, Wordpress,drupal and so on. I believe that having a deep grasp of PHP will enable a programmer to open the door to more unknown areas.

If you disagree with the above, please leave a comment or email me-I want to hear why you don't think so.

In fact, I am not a PHP fan, I have no sense of language. I use PHP mostly because--you guessed it--someone is willing to pay me. So it's all attributed to this:

If you want to make an informed decision on software design, PHP is the best choice for you to develop a Web application.

By the way, if you're sure you want to use PHP to develop your next Web app, try CodeIgniter. It is a lightweight, generic, super fast PHP framework. For CodeIgniter, I'm a fan.

http://www.bkjia.com/PHPjc/371713.html www.bkjia.com true http://www.bkjia.com/PHPjc/371713.html techarticle This article was translated from Why PHP is a Ghetto this article. One day I chatted with the boss of a very good startup in DUMBO and talked about why developers in the non-PHP world are generally ...

  • Related Article

    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.