Currently I am planning for an upcoming project and I am about to choose the technology stack to use. I know that there are a lot of possibilities out there. Luckily I already decided not to learn completely new things. So at least I cannot exclude things like Perl, Ruby on Rails, .NET + Atlas, Zope and other stuff from my evaluation.
I am quite familiar with the worlds of JAVA and PHP. So I consider these two as possible candidates. But it also makes a big difference, which frameworks on top of these environments to use. This is the point where it gets really complicated.
Of course there is already a huge amount of information and comparison about these two technologies available. But you have to be very carefully when reading this material because in a lot of situations it is some sort of a religious war between both of them. But I do not want to make religious decisions. I want to be pragmatic. That’s why I will try to make a short competition for myself to find out which one is more productive for me.
The candidates:
Option 1) PHP5 with Symfony for MVC without a template engine. Propel as ORM. Not sure which AJAX toolkit to use. Research must be done here.
Option 2) JAVA with Hibernate and Spring and SpringMVC + WebFlow. Plain JSP with JSP 2.0 Taglib as View Helper. SiteMesh for page decoration. DWR for AJAX remoting.
Option 3) Grails (Groovy + JAVA) with Grails View Technology
It was quite easy to choose the PHP stuff because Symfony is the most exciting and productive MVC framework I ever saw for PHP. It solves a lot of day-to-day real style problems in a comfortable and well designed way. Allthough it still has its issues I am looking forward that they will disappear when Symfony gets more mature and its heading to 1.0 version.
To choose a framework in Java is much more difficult because there are a lot of possiblites and a lot of mature frameworks. The frameworks which come to mind first are typically Struts and JSF. Both are inadequate from my point of view. Struts is too much work in terms of configuration and XML wiring. Additionally I absolutely do not like the form bean stuff. Java Server Faces (JSF) is well suited for big back office solutions where you want to make reuse of widgets and where you have massive reuse of widgets. But JSF has to less flexibility. It does too much of the web staff for you. It makes it extremely difficult two build SEO optimized pages. It has big troubles with a GET requests. Components development is awful. So all JSF based frameworks like JBoss SEAM, Oracle ADF, … are out of scope too.
I choose Spring and Hibernate because they are some sort of well-known best practices. I like SpringMVC because it tightly integrates the IOC approach and is very well designed. WebFlow might help us with out wizards a lot. I want to use JSP because I like well introduced technologies with a lot of resources on the net (for example compared to Velocity). The tag libraries as view helper are a very clean and useful approach. Especially with JSP2.0 they get much less painful to implement, because you can use JSP to implement tags which make work much more comfortable.
The third option was chosen because it is the most similar based development approach on the JAVA platform compared to Ruby on Rails and Symfony at PHP. Ruby on Rails always gets extremely good feedback from the developer community. So I would like to see, if this approach is useful on the JAVA platform two. Grails itself is built on top of my personal Option 2 technology stack. So it will also be interesting which value the added compared to using the underlying technology.
The Procedure
I will set up a test use case, which has database connection and must do some emailing. The test case will consist of a multi step wizard and there must be various input including date / time done. The use case must be realized for two locales. Automated tests must be written on the service and action layer. The db schema must be the same for all. I will invest 2 days of development on each option. Afterwards I will collect results in a criteria catalogue. I am really looking forward to the results. Of course I will post them.
So there is only one big question left:
When do I have time to spend 6 days for doing the comparison? Perhaps at X-mas or New Year time? Arrrggg…. a day should have more than 24 hours.