It feels like there has always been somewhat of a divide between PHP and Java development. A large number of PHP projects seem to be quick and dirty hacks with no regard for scalability or extensibility, but that is why it has been so successful. A sad fact is that most people in this world aren’t forward-thinking and just want a quick fix and they want it now.
You can do dirty hacks in Java but you have many more obstacles to overcome – you have to use Objects for start, compile them, deploy a web application etc.
It’s a no-brainer really to see how even a rather ugly scripting language like PHP can trounce Java in the web marketplace.
However it seems natural that an awful lot of people who previously lived in the PHP camp will defect to Ruby on Rails. I’ve not used Ruby or Rails yet, but I’ve read a bit about them. I can see exactly why PHP-style developers will find it attractive.
There appears to be some kind of anti-Java snobbery or psychological barrier to people deciding to learn and deploy Java. Maybe it’s hideous misconceptions of performance, complexity or limitations. I wager there’s quite a bit of urban myth and folklore among the younger website "hackers" who don’t spend time to actually discover the facts and just cite some ill-informed blog somewhere that said "Java performance suckz man".
Groovy has the potential to change this. It supports scripts, not just classes, which makes small jobs easier for everyone. In Groovy it is easy to write many constructs that feel cumbersome in Java. It is dynamic, and this appeals very much to the "coding by the seat of your pants" side of one’s programming persona – without the feeling of also needing a shower afterwards as when you use PHP.
The trouble is to leverage all the great libraries out there for doing web stuff – like RSS parsing, caching and rendering, Ajax, sending email – are in Java land. They are trivial to call from Groovy but they require you to cross the bridge from functional libraries (as most core libraries in PHP are) to often quite complex OO APIs.
I think that if you could download a single .tar.gz containing Java, Groovy, Jetty and a trivial groovy scripting servlet, that the prospects for Groovy and hence Java in the website space could be very different. Not everybody wants Rails… I imagine it is overkill for most "static" websites that just have a contact form or two.
These types of sites represent a very large part of the market and serve as the training ground for young developers. These sites will continue to be written in PHP for a long time I think, unless someone provides an "install and go" solution. Oh, and makes it palatable to all the ISPs in the world
**
For the moment at least, it looks like Ruby On Rails will be in the limelight for some time. The main gripes I’ve seen about it are related to performance and scalability, and lack of unicode support. For many applications these things don’t matter, or in terms of performance a new server can be added for relatively little outlay compared to the perceived development cost of using a Java based solution.
The web development market as opposed to the Enterprise market has always been dominated by lowering costs. That’s why people don’t want to have to spend long learning something, and want instant gratification. That’s what scaffolding is all about, even though it is often useless in real life applications beyond the prototyping stage.
So Java has the feel of a more "software engineering" solution, and PHP has a feel of "just getting things done". Perhaps the two philosophies will start to collide in Rails and Grails.
I hope that we will be able to make Grails an attractive solution to non-Java developers. Instinct tells me we have the performance edge thanks to Hibernate under the hood, and JIT compilation in the Java VM. It will be good to see hard stats on this one day.
** – which requires a custom servlet container I think, that makes it really easy to host multiple applications from multiple home directories, with controls over how they can affect each other in threading terms etc
Recent Comments