After at least three months of on and off work, we are pleased to say that dzone.com is finally ready for you to enjoy. (Be sure to read Matt's column following this one for some detailed tips and insights about how to get the most from dzone.com[snip]
That being said, we feel good about what we built to power
dzone.com. To begin with, we used Spring 2.0 and the Spring Web MVC,
But the more interesting technical choice was probably the selection of Apache iBatis for data persistence. One of the great advantages of Spring is that it makes it easy to support replaceable implementations for your data persistence. Hibernate, of course, is a very popular choice and works well with Spring. We were concerned, however, that with Hibernate we would be relying too heavily of the ORM layer to perform database magic. Having learned from hard experience that database optimization can have at least as much, if not more, impact on overall performance of Java web applications, we thought it might be prudent to stay a little closer to our SQL than Hibernate makes it easy to do. Now don't get me wrong, we have used Hibernate with great success in other applications, and Matt and I both respect and admire what this excellent open source ORM layer gives you. We have also spen! t more than a few hours watching database logs to find problems in Hibernate applications, and the SQL Hibernate generates can be really scary. It's almost invariably correct, but it has that machine-like bias for not caring whether the queries it outputs are human-readable.
iBatis, on the other hand, allowed us to enjoy many of the advantages of an ORM layer without handing over control to a black box, even one as competent as Hibernate obviously is. We got to construct hand-written SQL for our operations and correlate the results of those SQL statements with JavaBeans that provide object-oriented mappings to and from the database backend. Spring was equally well prepared to work with iBatis as it was with Hibernate, so we had confidence that we could drop back to Hibernate if our iBatis experiment didn't work out. It did work out, however. iBatis lets us stay very close to the database, almost as if we were using direct JDBC calls, yet we get to concentrate all of those calls behind a JavaBeans abstraction that let us build DAOs, managers and work in a thoroughly object-oriented data model without concern for the relational database behind it. iBatis was a good choice for dzone.com, and I'm! glad we took the chance to try it out. It's just one more case that proves there is more than one way to get the job done well. Hibernate is extremely popular, but there are other excellent options out there, too.---