Java Vs PHP : From business perspective

Created On : Feb-08-2016 Author Author : Kundan Singh

Image result for java vs php

Image courtesy: www.diegosaletta.it

Note: This article is not about technical comparison of PHP vs Java. For technical comparison you can search/google/bing/duckduckgo "PHP vs Java".

We will consider 3 segments where "PHP vs Java" question can arise.(There exist other segments also in software, but I don't think embedded system programmer or rocket navigation system programmer would ponder over "Java or PHP").

0) Mobile App: If you are considering App only then use JAVA. PHP is no where in picture in this area. There are 1.4 billion devices* in the world which run android( java based) and 0 devices which run PHP.

*: http://www.androidcentral.com/google-says-there-are-now-14-billion-active-android-devices-worldwide

1) Enterprise applications: 

Here Java dominates the markets. Just choose any enterprise software and see how many companies used Java vs PHP. e.g. : see how many open source accounting software are in Java vs PHP. (https://en.wikipedia.org/wiki/Comparison_of_accounting_software)

2) High traffic consumer facing website:

Java company:

Amazon, LinkedIn, Twitter, Ebay, Paypal, Google Ads, Salesforce and many more.

PHP company:

Wikipedia, Facebook( facebook uses hybrid form of PHP.), Yahoo( some part) and that is it.

3) normal consumer facing website:

Now this is the area where no clear consensus on winner.

So let us drill down on this area a bit. Let us consider top reasons which people consider when choosing one technology stack over others.

0) Familiarity with language: If you are familiar with only one of the language, then usually this point alone decides the choice. So no winner here.

1) Availability of free/open source frameworks/software : Language itself is not as much important as the entire eco-system that comes with the language. A better technology stack can increase programmer productivity multiple times, which will translate to better ROI( return on investment).

For a sample comparison: If one sees list of Web framework available listed on Wikipedia ( https://en.wikipedia.org/wiki/Comparison_of_web_frameworks),

There are 40 Java Framework listed vs 20 PHP framework. But most significant issue here with PHP is that there is no new framework after 2012. Java has 20 of them.

2) Availability of programmers for hiring: There are 8 times more Java programmers as there are PHP programmers. (http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html). So you can decide which will be easier to find.

3) Cost of Programmers: If you consider only immediate cost then I think PHP will tough to beat. But if consider mid-term to long-term ROI, then Java will emerge as winner.

4) Training for new programmers: PHP is considered easy to learn than Java. But in India where people are more analytical bent , I don't think this point is valid. Soon India will have 5 million programmers (http://www.computerworld.com/article/2483690/it-careers/india-to-overtake-u-s--on-number-of-developers-by-2017.html)

5) Machine/Hardware Cost: Java has better scalability/security/machine affinity/efficiency than PHP, which translates into lower machine cost.

6) Maintenance of software for long term: Many big Indian internet companies I know have changed their technology stack from PHP to Java.

They have incurred major cost for this mainly because of increased complexity over time in PHP code base.

P.S. : If you are still undecided over "Java or PHP" or you have different point of view, I would love to hear from you. You can comment here, or write to kundan@gunaatita.com or tweet to @gunaatita

comments powered by Disqus