In a recent article on CRM Developers Journal, Coach Wei asks:
Why Do ‘Cool Kids’ Choose Ruby or PHP to Build Websites Instead of Java?
— Here is a question that I have been pondering on and off for quite a while: Why do ‘cool kids’ choose Ruby or PHP to build websites instead of Java? I have to admit that I do not have an answer. Why do I even care? Because I am a Java developer. Like many Java developers, I get along with Java well. Not only the language itself, but the development environments (Eclipse for example), step-by-step debugging helper, wide availability of libraries and code snippets, and the readily accessible information on almost any technical question I may have on Java via Google. Last but not least, I go to JavaOne and see 10,000 people that talk and walk just like me.
Coach then goes on to basically not answer his own question, although he offers a couple ideas about the popularity of Ruby and Php in what some folks at Sun see as a Java world.
I don’t think there’s any surprise about why the Ruby and Php are so popular. Unlike Java, when you write in a scripting language, you get immediate gratification and feedback about your web app. Many industrial-strength Java web applications are complex enough to require build and deploy scripts, multiple deployment tiers, and really beefy workstations to run local developer instances. Very little of that’s required with Ruby or PHP. This translates into something viscerally satisfying to web developers. The ability to change something, and then immediately see that change in the working application. Don’t like the change? Do a little tap, tap, tap on the keyboard and then reload your browser. Boom. Now you have a new version of the page.
This dynamic of small, incremental changes leading to immediate application feedback IS available in Java, using JSP. The problem here is overhead. In most shared hosting environments running Linux, there is usually no stable Servlet/JSP engine set up. This means the developer - oft times what corporate types like me call “Junior Developers” - are required to install the servlet engine themselves. That, or use the web development tools that are already available.
Like PHP.