Getting around the fact that Gavin can be something of an unrestrained ass, he is also clearly clairvoyant about some things. In fact, if I were to offer up my own flash of amateur psychology (and what else are blogs good for?) I'd say that it's simple audacity that makes Gavin King tick, and that that's why he's been so successful at shifting the landscape. If you're not a fan of his, you should listen to this too. While I myself have cursed Hibernate & the sometimes brusque forum, it is understandable that you'd be a bit frustrated the 6000th time somebody pisses & moans that the free framework you developed doesn't serialize the entire DB and send it over to fix your lazy load problem.
Coming into this podcast I was really skeptical of annotations. They seemed like a separation of concerns nightmare waiting to happen. Deployment specific tags just waiting to be incompatible. I say give me the nice clean lines of a pure & simple POJO.
But now I'm not so sure.
There's a real point to be made that my POJO's are really nothing without Spring's DI, and the rest of my Spring MVC web tier is of course tied closely to SpringMVC. In fact there's nothing really wrong with this either, and I've found Hibernate/SpringMVC/Freemarker to be an eminently workable combo. Plugging Acegi in was cake & my simple GWT wrapping site with user administration was the work of an afternoon.
Moreover, there sure was a lot of power in those annotations. And would it be any more embeded and than switching from what I've got now? I do have to disagree with a bit of his disdain for layers however. I really DID switch my database tier out the other day (db4o to hibernate) and the process was lovely. New DAO impl's, new appicationContext-hibernate.xml and... off she goes! Well, up until GWT bonks on a hibernate PersistantList, but that's for another day.
The main revelation in the podcast is Gavin's defense of stateful web applications. After some amusing IBM potshots, he really starts to make some sense (interestingly, the more expletives/minute the more sense he seems to make.) The only real issues I've had with Spring MVC have been
- Inefficiencies from not wanting to use the session, because.. well the session was verboten at work due to vapor-concerns about scalability
- Back-Button, refresh, history...
- Lazy Loading, NonUniqueIdentifier etc. exceptions
Seam's great solution is to just go ahead and use the session, but to introduce the idea of conversational scope. While this is precisely what Spring WebFlow does as well & I could've solved a couple of the problems above more easily with access to the session, I have to admit that Seam's implementation was pretty darn slick. I'd love to hear a good debate about the relative merits of the two (well, a bit flamey, but still good), as well as somebody to rebut Gavin's assertion that stateful session beans are not as unscalable and unworkable as we'd all been led to believe.
And back to audacity. Finishing up that podcast I really wonder whether being such a... so forthright, about his opinions really leads to more willingness to innovate. I love the Spring project, but I wonder if it will end up too much of a fixed J2EE and not enough of a revolution.
I'd really love to see a little more about Seam's Ajax capabilities. That's on the things to google list. Right now I'd definitely consider Seam vs my Spring MVC for a new traditional web app. However for the project at hand, the guts in GWT land and I wouldn't throw away my ability to manipulate DOM code like a Swing-set for all the component based wonderful-ness on offer.
Just don't load my site in two tabs at the same time ;)