PHP Classes
elePHPant
Icontem

7 Reasons Why WordPress Made PHP Popular, not PHP Frameworks - PHP Classes blog

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog 7 Reasons Why WordPre...   Post a comment Post a comment   See comments See comments (23)   Trackbacks (0)  

Author: Manuel Lemos

Posted on:

Categories: PHP opinions

Recently the Tiobe Index of published an update of their programming language index on which they claim PHP has been raising in popularity due to Zend Framework 2 but they do not justify why.

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 LanguageRatings
Jul 2013
Delta
Jul 2012
1C17.628%-0.70%
2Java15.906%-0.18%
3Objective-C10.248%+0.91%
4C++8.749%-0.37%
5PHP7.186%+2.17%
6C#6.212%-0.46%
7(Visual) Basic4.336%-1.36%
8Python4.035%+0.03%
9Perl2.148%+0.10%
10JavaScript1.844%+0.39%
11Ruby1.582%-0.19%
12Transact-SQL1.568%+0.61%
13Visual Basic .NET1.254%+0.34%
14PL/SQL0.920%+0.28%
15Lisp0.868%-0.13%
16Pascal0.792%-0.04%
17Delphi/Object Pascal0.691%-0.47%
18MATLAB0.680%+0.04%
19Bash0.622%+0.04%
20Assembly0.581%+0.03%

Tiobe Index Evolution until July 2013

Tiobe Index trends 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

Google Trends - Wordpress, Joomla Drupal, Magento, Zend Framework

2. WordPress alone is much more popular than any PHP framework

Using Google Trends you can also compare the popularity of different PHP frameworks. If you compare the popularity of WordPress with Zend Framework, Symfony PHP and CakePHP, as you may see in the chart below, WordPress is much more popular than all these PHP Frameworks together.

Google Trends: WordPress, Zend Framework, Symfony PHP, CakePHP

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

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


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



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog 7 Reasons Why WordPre...   Post a comment Post a comment   See comments See comments (23)   Trackbacks (0)