Its amazing how much work there is when wiring up a new J2EE application from ground up. Deciding on the frameworks to use is one challenge and then wiring them up so they all work seamlessly together is another. JBoss Seam has indeed tried to address this very issue and I wish them all the luck.
I am stuck in the JDK 1.4 world on this project. For this project I decided to use:
- WebWork for web UI framework. Migration to Struts2 will be easier later when the project moves to JDK 1.5 (if ever).
- Sitemesh – instead of tiles I preferred this one. Less configuration and works great for my needs.
- Spring + Hibernate (and jdbc where needed) on the business logic tier.
- Lastly I am using YUI for certain widgets such as datatable and calendar.
I wanted to go with GWT but decided against that. Though I personally think (as i have blogged earlier) that Java based web UI frameworks are the way to go in the future.
The application I am working on is not an AJAX rich client (and does not need to be) but some of the widgets in YUI fit nicely with my needs. The datatable is an amazing widget. I have configured it with server side pagination and I am extremely pleased with it. The one thing that stands out about YUI and the rest of the AJAX frameworks is their documentation. Often you can just copy and paste sample code and tweak it to your needs. But beware you need to get your Javascript skills ready for this. The more I see Javascript the more I wish I was coding in JavaScript on the server side. Its got a basic syntax closer to Java so thats a plus to me. Other than that its a different animal completely.
A few other points to note on my current effort:
- The Spring aop support in the configuration xml is extremely useful. Use it to your advantage.
- I have my Webwork actions being managed by Spring. This allows me to intercept the action classes in Spring and then do some work there; like exception handling. On the way out of the action classes I expect any application exceptions to be logged in a log file and also messages converted to full messages from resource bundles