ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  POJO Application Frameworks: Spring Vs. EJB 3.0
Subject:   Fatally Flawed Article
Date:   2006-01-17 19:11:14
From:   javid
Response to: Fatally Flawed Article

"Instead of saying Spring is "non-standard", you should say Spring doesn't have a JSR."


Since we're providing all of these lexical clarifications, let's be more precise. There are two types of standards: de facto standards (standards based on widespread use throughout an industry) and de jure standards (standards that are created by a body or committee). When most people refer to something as being a standard, it is implied that it is a de jure standard. If it is a de facto standard, one usually clarifies. That is why you hear "de facto" much more often than "de jure". EJB 3.0 is a standard (de jure) and Spring is not (de jure or de facto). Spring may currently be in more use, but anybody who claims that it is a standard in any shape or form is smoking some serious crack. Ask any consultant who has worked at many different client sites over the last several years to tell you what percentage of projects are using Spring. More interestingly ask them what percentage of projects are using EJB 2.1 (or previous) technologies.


"In fact, most code that uses Spring for DI can throw Spring out entirely and substitute it for another service that performs creation and relationship management. Spring was intentially written so that your code *did not* rely on it."


Sorry, but that is a load of crap. Anybody who has used Spring for anything more than plain-vanilla DI can tell you that. If I'm using JDBC template, I'm relying on Spring. If I'm using the DAO support, I'm relying on Spring. If I'm using programmatic transaction management, I'm relying on Spring. If I'm using HibernateTemplate, I'm relying on Spring... I could go on. If you go with EJB 3.0, you are coding to a standard, and you can switch between vendors without rewriting application code. Your comment is just flat out false.


"Missing a JSR isn't that big of a deal, I use stuff without JSRs all the time"


I think it is. This is one of this biggest concerns that many of the clients that I work for have. Yes, developers have the leverage to choose libraries and APIs that they use, but way too often, the decision about the overall infrastructure, architecture, or application server is made higher up the chain. When those higher-ups make decisions, they want to know if they're going with standards, and many times it can be a make-it-or-break-it point. I'm not judging whether this is good or bad, but just pointing out the reality.



It seems like quite a few Spring lovers have bashed this article, but I found it to be very informative. I've used both technologies on production systems, and I absolutely agree with most of the points. I'd like to read some opposition to the article that has some substance. At least talk about one of the technical issues that Mr. Yuan brings up if you're going to bash his article. Annotations are simpler than gobs of XML. Spring can turn into a maintenance nightmare. EJB 3.0 is a standard, and Spring isn't. And no, I don't work for JBoss.


1 to 1 of 1
  1. Fatally Flawed Article
    2006-02-10 22:05:55  frankelliott [View]

1 to 1 of 1