Monday, May 20, 2013

5 Reasons Why Web Platform War is Over: PHP Won!

During Google I/O 2013 event a Google manager said PHP runs on 75% of the Web sites. So they decided to finally support PHP as in their AppEngine hosting service.

Google I/O is a event mainly for developers that Google organizes every year to present the latest developments of their products.This year Google announced a new language being supported in AppEngine, their so called "cloud" hosting platform. This time the new language was PHP. A Google manager for AppEngine explained that PHP is running in 75% of the Web sites. That explains why PHP support is the top most requested feature for AppEngine.



In reality there was never a Web platform war, at least for most PHP developers.

What happens is that PHP gathered so much popularity, that people that prefer other languages often engage in argument wars against PHP just because PHP popularity compromises the chances of their preferred getting more popular. So in the minds of the fans of those other languages, they are in a war against PHP.

With this announcement from Google, it pretty much killed the arguments of those that fight PHP. If there was a war, PHP won it. Lets get over it. Here is why.

 1. Google Knows Because They Crawl the Whole Web

Google is the top search engine company. Every day thousands of robots spider the Web to crawl and index Web site contents.

So for Google it is easy to crawl the Web and determine which language is used in each Web site. Most sites with PHP installed respond with an header like this: 
Server: Apache/2.2.8 (Unix) PHP/5.3.11
 Although it is possible that some PHP sites may omit the information that PHP is running on the server, most sites do not do this.

So if Google figured that 75% of the sites run PHP after crawling the whole Web as they have been doing for all these years, they are the ones that have the most accurate evidence of the overwhelming presence of PHP.

  2. Google Does Not Influence Web Developers so much

 Definitely Google is a very influential company to anybody using the Internet these days.

It is natural that if Google declares they use a certain technology, it is like an endorsement that may influence people to also use that technology.

I have always heard that Google search engine uses C++ and most other services use Java because of the scalability provided by Java Application servers.

When Google AppEngine launched in 2008, they announced it was only supporting Python. That was odd to me because Python was neither one of the traditional Google languages, nor a popular Web language like PHP.

When I realized that Guido Van Rossum, the creator of Python was behind the Google AppEngine project, it all made sense. Why would he give priority to any other language besides his own creation? It seemed like a personal preference, rather than one based on language features or market share reasons.

It makes sense that a company standardizes on certain tools or programming languages that their employees are more familiar or have more control, but when they think of products for their customers, companies need to pay attention to what the customers prefer.

Microsoft paid attention to their customers many years ago and started actively supporting PHP, so it was odd that Google was not doing it.

Later they added support to Java and even the Go language. That is OK, but given the overwhelming presence of PHP on the Web, what was keeping Google from supporting PHP?

When asked, Google employees gave the standard excuse that Google did not have the necessary resources. Right, a company that makes 100 million dollars a day, does not have resources to support a language that many customers want to use. Something was not quite right in that justification.

Many years ago I heard from a Googler (now ex-Googler) that inside the company there have been huge discussions to add PHP support to AppEngine because it was a huge market that they were neglecting, limiting the commercial success of the product.

Some friends of mine speculated that Guido Van Rossum was against it because PHP support would put Python in the shadow. That made sense but it was still a speculation.

Last December Guido Van Rossum left Google. So, if he was the main opponent of PHP support, after he left the PHP opposition would be gone, or at least the opposition would become much weaker.

Only 5 months after Guido departure, Google announces PHP support for AppEngine. So the speculation that the Python creator was preventing Google from adopting PHP may actually not be far from the truth.

Anyway, if in 5 years Google could not convince PHP developers to switch to Python and use it in AppEngine, I guess Google influence over Web developers is very limited after all.

Too bad for Google that they delayed PHP support for all these years. They could have lead the PHP Platform As A Service (PAAS) market so much earlier. Nevermind, better later than never.

  3. Wordpress is the Dominant Blog Platform (not Blogger)

 One of the reasons why PHP is so successful is due to killer applications like Wordpress.

Just last month I gave an interview to Khayrattee Wasseem of the 7PHP site on which I have explained that in my opinion the success and prevalence of PHP is tied to WordPress and vice-versa.
Wordpress is so extensible that nowadays it can be almost anything you want besides being a blog. There are plugins to turn it practically into anything you want from a Web site.

Wordpress code may not be very beautiful in the opinion of prude developers, but that does not matter. Even developers that preach for other languages use Wordpress. Isn't ironic, don't you think?

More than a software application, Wordpress is an ecosystem, a way of life. Many people developers live exclusively from developing sites based on Wordpress. I see that here every day in the PHP jobs section.

The same could be said to a certain degree about Drupal, Joomla and other popular PHP applications. It is just that Wordpress is much more popular.

The Wordpress community seem to live in a world of their own apart from the regular PHP world. They organize their own events. Those events are always very crowded. I suspect that Wordpress events are even more crowded and frequent than regular PHP events. That says a lot about the importance of Wordpress to the PHP popularity.

  4. Programming Does Not Have to Be Beautiful

 Many years ago I started seing people praising Ruby On Rails as the best way to develop Web applications, as opposed to use languages such as Java or PHP.

I have seen talks from its creator David Heinemeier Hansson on which he was preaching that programming had to be beautiful. I wondered what that meant. Was it the coding style? The project architecture? The development methodology? Something else?

Maybe I missed the point but I assumed that Ruby On Rails imposes a certain methodology as the only way to do it right and be productive. If you do not get out of the rails you train can travel very fast.

It seems to me that using a certain methodology consistently does not require that you use a specific language or a specific framework to be productive.

I use the same methodology to develop PHP projects for years. I feel very productive because I follow the same methodology very consistently. I develop my projects really fast because work becomes mechanic.

It seems that Ruby On Rails brought consistency to the development of Web projects of people that did not know what method they should follow.

However, that does not have to be done with Ruby On Rails, not even with Ruby. It could well be in PHP using a similar framework or not. As a matter of fact many PHP frameworks appeared afterwards copying some things from Ruby On Rails.

Ironically certain things from Ruby On Rails were copied from PHP. For instance the ERB is a templating system that later merged in Ruby On Rails project. It is basically a way to define templates with some code inside, just like what you can do in PHP since ever.

It is even more ironic that some people preach that you should not mix code in HTML templates, as if that is an ugly thing and if do that you will go to hell when you die. After all, I guess Ruby On Rails people agree that programming does not have to be beautiful.

Another thing considered ugly by some is the use of global code in your applications instead of classes. Well, if you take a look at Wordpress source code, you see global code all over it.

I already have written about why organizing your code in classes is better than using global code but that does not have to be a mandatory rule for everything.

Global code may not be beautiful but it works, PHP allows it, a lot of developers use it, and make a living from it.

  5. PHP Detractors Have the Wrong Focus

PHP is not perfect but that does not matter. Actually those are not my words. Those are from Jeff Atwood of StackOverflow fame. Despite he knows that, it is not unusual to see him preaching against PHP. Well if it does not matter, why bother spending time and effort preaching against PHP?

Jeff is not alone. Haters will gonna hate, will do it in public spaces a lot, sometimes in disguised ways.

One site where I see a lot of disguised anti-PHP preaching is in Quora. This is a more sophisticated form of anti-PHP warfare. Some people make allegations against PHP disguised of questions. Some ask if PHP project startups have less chance of succeeding, others ask if PHP popularity is declining, others ask if PHP is still worth learning, and so on.

All this anti-PHP preaching is pointless. It only helps bringing more attention to PHP. Well, if other languages are so much better than PHP, why don't PHP haters try to be positive and focus their efforts in showing the benefits of other languages? That would probably be a better approach to attract more people to their language of choice.

Are you willing to move your PHP applications to Google AppEngine or do you feel it is not yet ready?

Ref: http://www.phpclasses.org/blog/post/208-5-Reasons-Why-the-Web-Platform-War-is-Over-PHP-Won-with-75-says-Google.html

No comments:

Post a Comment