With the announcement that Google App Engine is now supporting Java as its second language, Google has significantly altered the face of web development. Typically considered a poor choice for many web development projects, Java will now be considered more seriously for new web site projects. Google's announcement will undoubtably create a chain reaction that will only improve the adoption of Java-based web applications in other cloud services. In this post, I'll talk about why Java hasn't been a good choice for a web development platform until now and why Google has changed that.
One of the the most often cited reasons I’ve heard others tell me why they chose another platform for their web projects is that takes too long to develop web applications in Java. I’d whole-heartedly agree – it takes way too long to develop Java web applications. As it stands, other platforms provide highly productive frameworks such as Ruby on Rails or Django. You can often create robust web sites in these platforms with very little effort. PHP has long been known to be a highly productive web development language — it was originally created for that task!
The underlying reason that it takes too long to develop Java applications is not the language itself, rather it’s the lack of productive and well-adopted web frameworks instead. Sure Java has a number of well-known web frameworks such as Struts, Spring MVC, and Seam (and MANY more). Their tremendous flexibility comes at the high cost of numerous configuration options which make them more difficult to pick up. These frameworks are just plain complicated compared to the popular frameworks of other platforms. There are other emerging Java Virtual Machine platforms that do provide productive web development environments. These other JVM platforms leverage many of the great ideas from the other web platforms, but they have not seen large-scale adoption yet.
Why aren’t there any widely adopted, productive web frameworks in Java or JVM based platforms? Simply put, it’s always been more expensive to host Java web applications than other platforms. Starter packages on most web hosts start at $20 per month or more. Other platforms start at much lower prices though. For instance, you can find PHP hosting starting at $3 per month. Without cheap hosting options for Java-based web sites, few developers are going to use it for their hobby or semi-serious web projects. I speak with experience on the matter. My own wedding web site from a few years back, complete with an online meal selection page, was built with Ruby on Rails simply for the reasons of cost and productivity.
Larger web projects have often chosen other platforms for similar reasons. It’s expensive to develop Java web applications (because there are no productive platforms) and it’s expensive to host these applications. Large-scale Java web sites are often also complicated beasts. These web applications require complex web and application servers and gobs of memory. Web application servers can be very complicated to administer for production applications. The complexity to develop and administer large Java-based websites made it a difficult platform to choose.
Google app engine now removes many of the barriers that prevented Java or JVM based languages being chosen as the web platform. Google has now introduced a solution that is not only fairly inexpensive, it conforms to the many underlying standards Java developers already know. Google also provides an infrastructure that allows progressively more complicated applications to magically grow their resources as they require – the dream of everyone’s favorite-buzzword-of-the-moment, cloud computing.
Now that reasonably priced Java web application hosting is available, I predict we will see an explosion of hobbyist Java web development. Here’s why: according to the TIOBE index, there are still two times as many Java developers as there are PHP developers, the most popular web development platform according to TIOBE. Many of these Java developers will at least more strongly consider Java as their platform of choice for tinkering with their web projects. The increase of hobbyist Java web development will lead to more innovation on productive web frameworks. Developers are going to want simple to use frameworks that allows them to get stuff done fast, so some will inevitably be created due to this need. In addition, many Java developers are now going to begin experimenting with other JVM based web frameworks such as Groovy on Grails and Lift.
As the hobbyist development leads to productive web frameworks, the adoption of Java in commercial web sites will only increase. For all of the negative aspects Java has been known for, raw speed in server applications and stability are not among them. That is, at least in the minds of educated technologists of course. Java’s main advantages as a server platform will now shine that much more brightly when it also becomes seen as a more productive environment. These advantages will lead to an increasing adoption of Java and Java will finally realize the vision I suspect the creators of Java Servlets had when they created servlets more than 10 years ago — that of a premier web development platform. I believe we’ll ultimately have Google app engine to thank for all these changes.