<< Hey, JBoss? Two words: duhhhhhhhh | Home | Is Spring better than EJB? >>

Spring and the Damage Done

... with apologies to Neil Young

Spring's great, but IMO it's based on a need that didn't really exist. It's only after it "won" the battle between it and J2EE that it had a legitimate raison d'être ; - and I still find that to be of questionable merit.

Here's the really short and probably unfair summary: Rod Johnson saw how poorly EJB was performing. J2EE was getting mauled, for high maintenance costs, poor performance, incredible requirements.

So he looked at why J2EE did so poorly, and realised that EJB was a pain. It required special compilation steps (until EJB 1.1), was difficult to configure, hard to test, and ran like a pig through molasses in December.

So instead of saying something sensible like "you blokes shouldn't be using EJB when you're making local, largely nontransactional calls," he wrote a book about J2EE without EJB altogether, and replaced EJB with Spring.

Educate the masses? Nonsense. That'd be too much work, and far less profitable. Why educate people when you can create an opportunity instead?

So EJB got tarred with the brush of incompetent education. Nobody said "don't do that, if it's the wrong thing," they just said "don't do that."

EJB never recovered. It tried to fix the things Spring addressed by adding...

Local and remote interfaces.
This was a huge mistake, as local interfaces for EJBs basically meant you had all the cruft of managing remote resources without the benefits of remote resources. I blame IBM and BEA for this, as one of their competitors managed to shortcircuit network roundtrips with EJBs, if you were silly enough to do everything on the same physical box; maybe they just... couldn't. So they mangled the spec instead.

(Thanks.)

Now, of course, Spring's won the day. It did so against the weight of specifications, by being easier to use than ... I dunno, I guess JNDI, although I never found JNDI difficult to use.

In fact, it's still fighting JNDI - in the SpringSource Application Platform, they're still considering whether to support JNDI at all, even though JNDI would make some things very convenient for them.

Since Spring won, it's gotten even better. I actually enjoy using Spring 2.5, with the autowiring capabilities. Good on them.

But that doesn't change the fact that EJB has been effectively ruined by Spring, mostly for profit's sake.
Tags :


Re: Spring and the Damage Done

> But that doesn't change the fact that EJB has been
> effectively ruined by Spring, mostly for profit's sake.

Note: Joe and I cheerily correspond from time to time. I consider Joe a very good guy. So take my comment simply in the vein of a friendly back-and-forth. :)

I heartily agree that EJB was and is too hard to use. I personally found it very unproductive.

Not knowing the history of exactly how Local and Remote interfaces made it into the EJB spec, isn't it the spec writers' fault and not Spring's? Didn't the EJB spec writers fail in the competitive arena?

If Spring wasn't so much better, I think it would have been very difficult for it to get into the position it's in, especially considering it didn't have the recommendations of a large vendor behind it.

Cheers,
David

Add a comment Send a TrackBack