EJB has undergone quite a makeover!
While EJB 1/2 was considered obese and ugly , EJB 3 now claims to be the complete opposite.
I find the following observation illustrates the complete makeover:
EJB 2 was one of the main reasons for the development of the Spring Framework. Spring aimed to provide a developer-friendly alternative to EJB:
I wrote this book for architects and developers who have grown increasingly frustrated with traditional approaches to J2EE design, especially EJB. It shows what you can do right now t implement cleaner, more productive alternatives to EJB and move into the next era of web applications.
J2EE Development without EJB
During several years Spring was THE lightweight alternative to the heavyweight EJB model.
Now with EJB 3 this seems to have changed to the exact opposite:
The Spring framework then would be "Just Another EJB Container On Steroids" (JAEC :-)) - it would make, however, the integration between EJB 3 and Spring easier, than even now. This lowers the entry barrier for EJB 3 as well: the migration to pure Spring environment, in case EJB 3 wouldn't be sufficient for functional, or non-functional requirements, should be not that hard.
EJB is now presented as a quick and easy technology, very lightweight but maybe not ready for advanced enterprise scenarios.
Spring on the other hand earns more and more critique as beeing overly complex, verbose, xml-heavy [see Bob Lee here and here, Guice Comparison, another blog ...].
One of my last projects was a simple web-application. We decided that EJB would be an overkill and went with a straight JSF-and-Hibernate-in-a-single-war-approach.
Today I think that leveraging EJB3 would have made the implementation easier and not more complex, especially when implementing stateful-conversations.





0 Kommentare:
Post a Comment