Author: Manuel Lemos
Viewers: 583
Last month viewers: 220
Categories: PHP opinions
Read this article to learn about an opinion why this claim is unfounded and PHP popularity has more to do with WordPress than with PHP at one language may be more popular than PHP Frameworks.
Contents
What is the Tiobe Index of Programming Languages?
The Rise of PHP in the Tiobe Index
7 Reasons Why WordPress Made PHP Popular, not PHP Frameworks
Shall I develop My Sites with WordPress or with a PHP Framework?
Frameworks are good when they enforce a productive method
Opinions are not Facts
What is the Tiobe Index of Programming Languages?
The Tiobe Index is a ranking organized by the company Tiobe which attempts to show how popular programming languages are relatively to each other. It was started in 2001 and it is updated every month.
It takes in account the number of search results for the language names or equivalents in several sites like Google, Blogger, Wikipedia, YouTube, Baidu, Yahoo, Bing and Amazon.
The Rise of PHP in the Tiobe Index
PHP has always been very popular according to the Tiobe ranking, but recently its popularity has been increasing a bit more than before. According to Tiobe people that may be due to the release of Zend Framework 2 last year. However, they do not explain how they came to that conclusion.
Tiobe Index for July 2013
Position Jul 2013 | Programming Language | Ratings Jul 2013 | Delta Jul 2012 |
---|---|---|---|
1 | C | 17.628% | -0.70% |
2 | Java | 15.906% | -0.18% |
3 | Objective-C | 10.248% | +0.91% |
4 | C++ | 8.749% | -0.37% |
5 | PHP | 7.186% | +2.17% |
6 | C# | 6.212% | -0.46% |
7 | (Visual) Basic | 4.336% | -1.36% |
8 | Python | 4.035% | +0.03% |
9 | Perl | 2.148% | +0.10% |
10 | JavaScript | 1.844% | +0.39% |
11 | Ruby | 1.582% | -0.19% |
12 | Transact-SQL | 1.568% | +0.61% |
13 | Visual Basic .NET | 1.254% | +0.34% |
14 | PL/SQL | 0.920% | +0.28% |
15 | Lisp | 0.868% | -0.13% |
16 | Pascal | 0.792% | -0.04% |
17 | Delphi/Object Pascal | 0.691% | -0.47% |
18 | MATLAB | 0.680% | +0.04% |
19 | Bash | 0.622% | +0.04% |
20 | Assembly | 0.581% | +0.03% |
Tiobe Index Evolution until July 2013
7 Reasons Why WordPress Made PHP Popular, not PHP Frameworks
1. WordPress is the Most Popular PHP Application
Counting the number of search results on several popular search sites may seem to be a way to measure the relative popularity of a technology, language, application or a product.
However, that way does not seem to be very reliable method. When a search site changes its algorithms, you may see changes in the results that really do not have to do so much changes in the popularity of those technologies.
A more reliable way to measure the relative popularity of a technology is to resort to Google Trends. This is a site that Google provides to show the evolution of the relative number of searches done by given keywords over time.
As you may see in the following Google Trends chart, WordPress is much more popular than other PHP applications like Joomla, Drupal, Magento (which is Zend Framework based).
Google Trends: WordPress, Joomla, Drupal, Magento, Zend Framework
2. WordPress alone is much more popular than any PHP framework
Google Trends: WordPress, Zend Framework, Symfony PHP, CakePHP
3. WordPress does not use third-party PHP frameworks
WordPress has been using some third-party components but they are not really full-stack frameworks. This implies WordPress never needed a full-stack framework to be built. The use of such frameworks would hardly make a difference to its popularity.
4. Applications make technologies popular, not components
In the chart above you may notice that Magento is much more popular than Zend Framework. Magento is built on Zend Framework. This seems to imply that what makes applications popular is whether they solve users problems, not the components that they are built on.
WordPress is also popular because it is useful to many users. When users need to host a WordPress installation they need to seek a PHP hosting service. So they know at least superficially what is PHP and that they need PHP hosting.
This means that WordPress helped making PHP even more popular. The more installations there are of WordPress, the more PHP becomes popular.
5. The Extensible WordPress plugin ecosystem
One of the most important reasons that made WordPress popular is the myriad of plugins that were developed to provide additional features.
There are WordPress plugins for practically everything, including those that can turn it into other applications besides being a blog system. There are plugins that can turn it into forums, e-commerce sites, trouble ticket systems, etc., anything.
If WordPress as blog application was already popular, it became even more popular as a platform that can be turned into any type of application.
6. Non-Programmers develop in PHP just because of WordPress
If you need a site that requires certain features that WordPress does not have, you can develop new plugins to extend WordPress further and taylor it to your needs.
Many of the WordPress users were not really programmers. They started programming because they needed to have features in WordPress for which there was no suitable plugin providing them.
This means that many non-programmers had to learn PHP to be able to develop new WordPress plugins. That helped making PHP more popular even among non-programmers.
7. Pragmatism is better than Purism
In sum I could say that WordPress and PHP in general became popular because they can be used to address practical needs of many users.
Neither WordPress nor PHP are examples of software projects that are technically beautiful, are consistent, always follow well-thought project plans and adopt praised design patterns.
But that does not matter. They were created by people with a very pragmatic sense. They were focused on solving real world needs.
As for many of the PHP frameworks, they seem to have been developed in a totally different planet. They are often developed by purist people that seem to be more concerned with the number of design patterns they employ in the framework components than with being pragmatic and solve real PHP application needs.
To make it worse, many PHP frameworks systematically adopt practices of other frameworks developed for other languages. That raises totally unnecessary difficulties for PHP developers that try to use them.
One example of this problem is the configuration formats. In the Java world it is still usual to use XML as format for storing configuration values. XML is a portable format that can be written by humans. It was certainly a progress when compared with binary formats used to serialize data structures by C++ applications in the past.
This was a fine solution in the year 2000 but the fact is that XML is a drag. You need to keep opening and closing tags for every value. Sometimes values are stored as tag attributes, other times as tag values. It is often a pain to use.
Then Ruby On Rails came with the promise to get rid of some of the pains of the Java world habits. Instead of using XML, they decided to use YAML, which is a simplified markup language. It is simpler than XML but it is yet another format that you need to learn.
Several PHP frameworks were built copying Ruby on Rails practices, including the use of YAML as configuration format. Many years have passed and they still used YAML.
If you are a PHP developer, the format you are most familiar with is PHP. Why don't these PHP frameworks make the lives of PHP developers better and adopt PHP scripts as configuration formats? PHP scripts can even be cached and so be loaded much faster.
In the worst case, if you need to use a more portable format, why these PHP frameworks do not use the JSON format to store configuration values? JSON is JavaScript. Every PHP developer knows JavaScript. It is only natural to adopt JSON nowadays.
Unfortunately many PHP frameworks as still stuck with formats that are not a natural choice for PHP developers, like XML, YAML or even INI (a legacy format of the Windows world).
I always get this feeling that PHP frameworks are not meant to please PHP developers. They seem to have been thought to please Java or Ruby developers. To make it worse, many of the newer PHP frameworks keep copying the same mistakes of older frameworks.
Obviously there are exceptions. There are indeed some PHP frameworks that were developed in a more pragmatic way for PHP developers. You can easily learn them without having to learn about Java or Ruby frameworks first.
Unfortunately those seem to not be the PHP frameworks that get more visibility. Maybe it is time for the PHP framework developers rethink their approach and think more about the PHP developers than about developers of other languages.
Shall I develop My Sites with WordPress or with a PHP Framework?
One frequent dilemma that PHP developers have is whether they should develop sites on top of WordPress or develop them from scratch based on a existing PHP framework?
This is a tough call. If the site is a blog, it may be an obvious choice to create it based on WordPress and save lots of development time. If the site is more than a blog but there are plugins for the functionality you need, WordPress may still be the best option.
Now if your site is very different than a blog, the amount of code that you would reuse from WordPress would be much less when compared to the whole project size. In that case, it may be better to start the development of the site from scratch.
If you still need a blog, you can use WordPress in a separate domain or a separate directory of your site.
For the bulk of the functionality you need to develop, you can use a existing PHP framework to gain some development time, or use your own framework if you have a good capable framework to address your needs.
Personally I tend to go for the last option. I can have more control of my project, but I am well aware that this route can take me more time to develop and fix eventual bugs in the code.
Frameworks are good when they enforce a productive method
Despite of the problems described above that many PHP frameworks have, for some people adopting a framework is probably the best solution, especially if it is what is called a "opinionated framework".
That is what are called frameworks that impose a certain development methodology. This means that there is only one way to develop applications with those frameworks.
The reason why this is a good solution for some developers is because they do not have a well defined development methodology. This means that they do not know how to start, how to progress and how to deploy an application, unless somebody tells them how to do it.
Since opinionated frameworks impose a certain development method, the developers learn how to develop their applications following the methodology imposed by the framework.
One example of opinionated framework is Ruby on Rails. PHP frameworks that are inspired in Ruby On Rails tend to be also opinionated.
Opinions are not Facts
Well this article is just about my opinion and my experience of as developer that has been creating software for several decades now.
But opinions are just that, points of view of specific people. Expressing an opinion does not mean it is the only way to interpret the facts.
Just like the Tiobe Index people expressed their opinion stating that PHP popularity growth was due to Zend Framework 2 release last year, other people may express a different interpretation of the facts.
What do you think? Do you have a different opinion about what was discussed in this article? Post a comment to tell what you think.
You need to be a registered user or login to post a comment
1,616,117 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
Comments:
11. WP popularity creates hacking opportunities - Rad Paluszak (2013-09-22 00:25)
I agree WP is awesome, but it's popularity creates a lot of... - 4 replies
Read the whole comment and replies
10. Good article - Tim Robnbins (2013-08-02 00:24)
very nice and factual... - 0 replies
Read the whole comment and replies
9. cheers to php increase popularity - José Filipe Lopes Santos (2013-08-02 00:21)
cheers to php increase popularity... - 0 replies
Read the whole comment and replies
8. Very good article - Frederik Yssing (2013-07-31 07:54)
to framework or not to framework... - 0 replies
Read the whole comment and replies
7. Interesting but... - Anthony Demetriou (2013-07-31 04:39)
An interesting, but I don't know if the data analysis is sound... - 1 reply
Read the whole comment and replies
6. agree; second major reason: facebook - Paul Allen (2013-07-31 04:39)
facebook made php legit... - 1 reply
Read the whole comment and replies
4. PHP might not be that popular - Marco A (2013-07-31 03:40)
only beginners tend to go for PHP because PHP is everywhere... - 3 replies
Read the whole comment and replies
3. Frameworks... - Peter Nicholls (2013-07-30 19:54)
Best without baggage?... - 1 reply
Read the whole comment and replies
2. Wrong way - Dmitry M. Merkushin (2013-07-30 19:54)
Product vs. Tools... - 1 reply
Read the whole comment and replies
1. The happy end of opinion is not fact - Daniele Cruciani (2013-07-30 19:54)
I would have expected something different on this paragraph... - 1 reply
Read the whole comment and replies