“PHP and Ruby are perfectly fine systems,” he continued, “but they are scripting languages and get their power through specialization: they just generate web pages. But none of them attempt any serious breadth in the application domain and they both have really serious scaling and performance problems.”
PHP (for example) is able to make things simpler because it’s 100% aimed at web pages, Gosling explained. Whereas with Java, he said, “We have a balancing act: we need the simplicity but we also need power.”
The headline here should be “Father of Java says writing web applications in PHP is simpler.” This is pretty much what I said in my Comparing PHP with other languages post:
Why is Java considered so complicated? One reason is that it is designed to run on everything from servers to cell phones, from desktops to dishwashers. It’s scope is impossibly general. Of course, specialized tools such as Rails and PHP are more productive for their sweet spot applications.
Both .NET and Java have this be all things to everyone mentality. If you need that generalization, fine, but generalization is not without cost as Gosling points out.
He called Simplicity and Power “evil twin brothers” – “Building systems that have a lot of power just attract complexity. Because of the way that the world has become so interconnected it helps to have systems where it carries over from one domain to another. You can do web presnentation stuff really well in PHP but you couldn’t write a library that does, say, interplanetary navigation.
So, if you are writing software for interplanetary navigations, by all means, choose Java. If you just want to write really good web applications quickly, choose PHP.
Regarding the scalability and performance characterization. I’m so tired of that. PHP performs and scales just fine for many people. Flickr makes an interesting case study of PHP scaling: