Spring v. RedHat v. Oracle
Remember when monster movies jumped the shark they did that battle of all monsters movie where Gamera came flying in on Godzilla vs. Baby Kong? Was like a monster version of a Vegas drag show. The Java world is reaching that stage. Here are a few thoughts on the various parties (just did some of this, so this is more technology focused).
I still like these guys best of the 3, though that may be changing, we‘ll see. The experience of getting a new project going with Weld was unpleasant. First, there were maven archetypes, which is great, and they showed up in m2, which is also great. But then, the Tomcat one is pretty much useless, there‘s no JPA, and no examples of adding any (you can guess numbers though!). Read around a lot and there were a lot of people looking for something to no avail. So I downloaded Glassfish v.3 and installed that. Then regenerated the project. Then I hit a slew of insanely stupid errors. The main one was that the damned xhtml template the project includes has a typo in it. BTW, Weld has its own way of reporting errors that is seriously sucky. Also, glassfish, though it installs in eclipse, doesn‘t write to the console! ( update: I‘m an idiot: they have their own console, which is cool..) So I have to go open their stupid log file to find out what went wrong. Stoopid. Finally, the example doesn‘t work because the db is not started. There is no way to start the db from the console, so you have to go do it the old cl way. Nice.. At least it works.
Still very intrigued by Arquillian. Read a good article about finding a bug with it (see below). Even though Dan Allen and Gavin King are archetypal angry guys, there are some things that require some anger. A decade and a half with the inability to do real integration testing quickly and easily and hot deploy top my lists. (BTW, see the link below where a guy after my own heart does a retrospect of his latest project and says most of the time went to waiting around for restarts, etc. The other damage we are doing is only the lobotomized drones will remain, vs. iOS is insanely fast, the simulator does everything, now Instruments does testing… yada yada yada…
Glassfish does look kind of nice, but I hold out zero hope that Oracle‘s tutelage will be anything but a disaster.
Ok, so a few things conspired to bring some Spring love into my life for the first time in a REALLY long time. One, I was literally about to do a blog post about how it‘s time for object databases to reemerge, and I just happened to read yesterday that Spring is acquiring Gemstone. That I think is a very good move. SQL is great, my friends, but object databases make a lot of sense. And let‘s face the facts, the advent of the cloud, and CEP is changing everything. The idea that we have to see pounds of sterling laid at the db vendors‘ feet is ludicrous. Of course, since Java‘s papa is now the biggest db godfather of all time, don‘t expect to see any movement in that direction from that side. Likewise, Hibernate is still the most successful RH piece of the JEE puzzle, so I doubt they are in a hurry to give us a real OODB. Go Spring on this one!
When Weld was pissing me off, I went looking for some Spring archetypes. Didn‘t see any, but then this morning here on jroller found a link to a guy who has one. Will probably generate the same project using that archetype and A/B the two against each other. If Spring is doing CDI now, let‘s just cross off the DI crap and move on, People, this does not deserve more cycles. Time for a lean redux here.. actually, it‘s really now or never…
Spring JEE Archetype
Weld Reference Doc
Interesting Site on CEP
Good Dan Allen Post re:Using Arquillian to Find Weld Bug
JEE6 Tutorial w/Discussion
Excellent Discussion of JEE6 v. Spring
Weld Quickstart for Maven Users
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)