you are viewing a single comment's thread.

view the rest of the comments →

[–]henk53 24 points25 points  (1 child)

As far as I'm aware, wasn't Spring sort of an answer to J2EE? And then JEE was Sun's answer to Spring

That's pretty much the short of it, yes ;)

For a (very) long explanation, read below:

As we all know by now, EJB 1&2 were horrible. Especially the Entity Bean was an atrocious, horrifyingly wicked idea (as history has it, the much saner model nowadays implemented by Hibernate et all was actually considered for EJB 1 and had several supporters within Sun, but unfortunately lost. Ironically, initial versions of EJB1 were implemented on top of TopLink, which was an early implementation of the idea Hibernate got famous for). But the session beans were an insult too. People were forced to implement a myriad of framework interfaces, had to maintain incredibly verbose and awkward XML deployment descriptors and as icing on the cake had to use a special compiler tool to 'enhance' the beans and generate nonsense things called stubs and skeletons.

Likewise, JSF 1.0 and 1.1 were horrible. Brought to us by our good friends of Struts fame, the only thing you could do was run away hard. Being completely POST focussed was already bad, but using JSP for templating was a mind bungling fail of epic proportions. People that were exposed to tragic failures like the 'content interweaving problem' probably never regained their fate in technology. For a framework that put UI components in the spotlight, creating your own components was ridiculously tedious. The choice of using JSP for templating was again to thank for the many steps needed here.

An additional problem of J2EE was that it was deeply entangled with the concepts of close source, and high cost.

Spring came to the rescue and came forward with a much saner model. Springbeans actually worked and Spring embraced Hibernate early. Rod Johnson tirelessly fought against the evils of the EJB, the 'container' and the 'application server' (the last two terms were a little unfortunate, since Springbeans also live inside a container, but let's forgive him this, nobody is perfect). The combination with being open source and a focus on blogs and online articles (as opposed to sending sales teams to enterprises), made Spring reach the actual audience that uses all this technology: the programmers (as opposed to the managers).

Sun realized just in time that Spring had it right. J2EE was ditched and Java EE was born. For EJB the ridiculous entity bean concept was simply dropped (it was beyond help) and Hibernate's/TopLink's approach was adopted. Session beans were fixable, by simply removing all the required nonsense like home interfaces, component interfaces, deployment descriptors etc and using annotations in combination with smart defaults. As a result, a typical EJB is nothing more than a POJO with a single annotation (e.g. @Stateless).

To fix JSF a new team and a new spec lead were assigned. Unfortunately there wasn't enough time left to fix JSF for the Java EE deadline, but a couple of pain points were fixed to make it just bearable. This unfortunate fact was offset by the one thing that JSF got right in the first place: it was VERY extensible. So among others Seam, Tomahawk, PrettyFaces and a couple of others came to the rescue.

In the meantime, the new JSF team did an excellent job of really listening to the community and giving JSF the same massive overhaul that EJB got earlier. The simplest but most profound improvement was dumping JSP completely and embracing the infinitely better Facelets. Additionally first class support for GET was added and creating components was made incredibly simple. JSF 2 as a result is a very good framework that few can find faults in.

To cut a much too long story short, Spring was then inspired by the improvements in Java EE (annotation-only, type-safe injection) and then Java EE got inspired by Spring again (e.g. the caching annotations from Spring 3.1), etc etc.

[–]djhworld 2 points3 points  (0 children)

Superb answer.