After a long time, it was interesting to see the Spring and JBoss folks engage in a public war of words, in comments on Matt Raible’s blog.
Beyond the obvious entertainment value that one gets as an outside observer to these kinds of things, it is interesting to analyze what the JBoss folks are up to and what they appear to be doing to counter Spring. And please, if you hear anyone from JBoss say that they are OK with Spring – they don’t see it as competition etc., if you believe that, don’t read this blog entry…!
Rod Johnson appears to have uncharacteristically lost his cool when faced with this comment from someone in the JBoss camp:
All those features in or out the app server are the real value of projects like JBoss Embeddable EJB3: the same code run both in and out of app server (or in another one).
Rod’s response:
Wow. What a great idea! Imagine if someone had thought of that back in 2002. Imagine if there was a project used very very widely that gave you the same model inside and outside the app server across a wide range of functionality. There’s a whole world outside JBoss technology :-)
Rod is understandably laying on the sarcasm, not only has JBoss flipped and embraced the POJO, they are trying to make it look like they came up with the whole idea. In the next JBoss versions, they are replacing the JMX based microkernel with a POJO based one. So one thing is clear: both the Spring and JBoss camps agree on something.
I can’t believe that Gavin pushes the talking point that AOP is no big deal.
However, the fact is that full AOP has basically zero traction in the developer community and that to shovel it into the EJB spec would be a terrible idea at this point. Moreover, almost all of the interesting problems you might think you need AOP for can be solved by interceptors + annotations – an approach that is much more understandable to nongeniuses. To me, AOP looks like totally overhyped, failed technology right now. (Of course, future history could prove me wrong on this.)
Or maybe its a defensive reaction to one of the main criticisms of the EJB3 spec.
I have been meaning to rant about a few things for a while, and maybe now is a good time, especially after all that Java One excitement has died down. Boy, am I glad that I don’t work for Sun, JBoss, IBM, BEA or even Interface21 for that matter – I don’t need to sprinkle my posts with sugary hints on how great technology A is, or that B is the best thing since sliced bread – unless I wholeheartedly agree. Here’s a few things I want to say on the oh-so-frustatingly wide world of Java EE:
Sun Specification != Standard – just because some technology carries a Sun “rubber stamp” and is touted as a specification does not mean that a) it is good or b) that it will last or c) that it is superior to other technologies. Classic examples: Entity Beans. The whole EJB 1.X and 2.X specifications.
Everyone agrees that to a large extent: EJB3 = Spring + Hibernate. What does this mean? To put it bluntly – Sun got it wrong and had to revise the specification. Innovation happened outside of Sun. A fresh perspective did not come from IBM, BEA or Oracle. It was the open source community that made things happen. Rod Johnson did a huge service to the entire Java community with that first book of his, and I was lucky enough to have read it at that time.
Now, we are in the middle of a new wave of JSRs, and specifications like EJB3, JPA, the JBoss camp pushing Seam as a new specification, the NetBeans camp raving about Java EE development, MVC frameworks being released right and left and something called Google Web Toolkit. I sometimes feel that it is too much work to be a Java developer nowadays. There is no option but to pick one out of the gazillion frameworks out there, hope that your pick will stand the test of time and focus on it. (And also bash the other “rival” frameworks on public forums for good measure :)
Java developers should keep an open mind and not trust anything that emerges as the result of a “design by committee”. A large part of what goes into a specification, will be the political agendas of the committee members. Ask yourself whether they will really give top priority to the needs of developers, or really try to keep things simple. This is why I like open source, the chances that something proprietary is created is far less and things are far more democratic. Unfortunately the open source landscape is getting increasingly commercialized nowadays…
I’m a blatant Spring fan, but one part of the thread I am referring to grabbed my attention: the part about conversations / optimistic transactions and the dreaded Hibernate LazyInitializationException. I use Spring and Hibernate and with Spring MVC the OpenInSessionViewFilter works fine. However I immediately ran into problems when using Spring Web Flow with Hibernate – and it looks to be something that still needs to be resolved, as of now.
PS: I hope GWT kills JSF and most of the other MVC frameworks. There are too many out there! But seriously I think GWT is something really really big. More on that later.
PS PS: I hate JNDI and I hate annotations. The Spring XML way is better.
Update 2007-03-07: Wicket Impressions: a post comparing Wicket with Spring MVC / WebFlow and some other frameworks as well.





Agree on a lot of the post. There are some of us who are looking to join / create JSRs from a user’s point of view to try to make them based on what people are really doing now. I think it’s time for people like yourself (and me) to become involved in the JCP and make it better.
Oh, and GWT may have an effect on JSF, but it won’t kill action-oriented MVC frameworks, since GWT doesn’t provide a strong controller framework, just UI widgets.
Comment by Jason Carreira — May 28, 2006 @ 6:00 pm
What I’m able to figure from my initial look at GWT is that like Swing, you don’t care about the session or managing navigation-state and just work with widgets and write event handlers. A lot of Swing applications are implemented without a formal controller layer. Which may not be ideal in terms of design but it happens. I actually wonder whether introducing something like Spring Rich Client will be worth it when you use Swing. Anyway, in GWT unlike the typical web MVC framework, you don’t worry about page navigation anymore – you just update areas on the GUI – AJAX style. The important thing is having in place a service facade that can cater to all your UI rendering use cases.
Especially given the way most MVC frameworks tightly couple the V and the C – I’m not sure about GWT not having an effect on MVC frameworks. In fact I’m almost positive that if I use GWT, I have to drop Spring WebFlow. I hope to have more clarity on this soon.
Comment by Peter Thomas — May 28, 2006 @ 8:09 pm
To be fair to JBoss, I sat in a Denver JUG meeting with Mark Fleury way back in 2002 where he said the next generation of JBoss would be completely POJO and AOP-based.
Comment by Matt Raible — May 28, 2006 @ 8:15 pm
Thanks Matt – and I remember reading the “Blue Paper” and getting all excited in those days. I don’t think that in practice JBoss had a POJO flavor until now anyway. And Gavin is trashing AOP now.
BTW – the link to the “Blue Paper” doesn’t work anymore. Anyone know where to find it? I want to read it for old times sake…
Comment by Peter Thomas — May 28, 2006 @ 8:30 pm
Hi Peter,
To address your Spring Web Flow comments:
- Yes, we currently do not officially support extended Hibernate sessions (session per flow). I expect us to first support JPA’s extended persistence context in the Spring Web Flow 1.1 timeframe, as it provides a standard, workable model there.
- Spring Web Flow is very much decoupled from the View (V). As a dedicated controller framework you’ll find an abstraction for logical “View Selections” that is extensible. And I see great opportunity to combine SWF with richer UI technologies, including JSF components and GWT. JSF integration will be in Spring Web Flow will be full-featured in 1.0 final.
Definitely ping me on the forums if you get an opportunity to have a look at using GWT within a SWF environment.
Cheers,
Keith
Comment by Keith Donald — May 29, 2006 @ 10:38 am
Keith,
I completely agree that SWF does a great job in completely decoupling the V and the C, apologies if I made it sound otherwise. I am using 1.0-RC1 in a real-life app and am thrilled with the difference it makes – especially with how you can re-use sub-flows within the view tier – JSPs in my case.
What I meant in comment #2 is that in a GWT context – I may choose to stick with Spring MVC for the C, but am less likely to use SWF where long-running page-flows are its sweet-spot. Of course these are very early days, and I will certainly ping you on the forums.
Comment by Peter Thomas — May 29, 2006 @ 11:42 am
I came across your posts from a bit earlier this year.
Since I am putting together a couple of building parts for a multinational JBoss-based business web app, of course in need of persistence (where Hibernate is a first choice) and also a MVC framwork that matches both modern web app (portal) demand, as works well within the server environment.
Regarding Jason’s reply, I fully agree on that. I myself am getting involved in both Open Source communities (like Apache or Eclipse, as well as JBoss and of course Source Forge) and also try to get some of the practical influence and experience into some JSRs.
Comment by Werner Keil — October 4, 2006 @ 2:28 pm
[...] I had raved about GWT earlier but then quickly realized that one of the core components (the java to javascript compiler thingy) was not open source. Whoa. Not open source? No good. So I was looking at other options. [...]
Pingback by GWT now 100% open source, yet another framework to consider « Incremental Operations — December 13, 2006 @ 5:16 pm
I agree and hope with Peter that GWT (if not itself, but an idea inspired by it) will provide some good and final arguments on MVC implementations. Spring does very much for the model & control, it decouples them in an excellent way and joins them cleanly. On the other hand, GWT is an expressed advocate of client-side abstraction and they don’t deal much with the server side – an excellent opportunity for joining both frameworks together.
As a sub-project of the GWT Widget Library [1] we created a transparent mapping between GWT applications running on the client and Spring managed server side beans. This allows GWT client applications to invoke bean methods very similar to how RMI works.
[1] http://gwt-widget.sourceforge.net/
Comment by George Georgovassilis — December 15, 2006 @ 9:42 pm
I recently tried Wicket and you can read my impressions on it here:
http://ptrthomas.wordpress.com/2007/03/02/wicket-impressions-moving-from-spring-mvc-webflow/
Comment by Peter Thomas — March 7, 2007 @ 1:41 pm
[...] 3rd, 2007 at 12:16 am (Hibernate, Spring, Java) As far as I can tell, there isn’t much love lost between the folks at JBoss (including the Hibernate team) and the guys at Interface21 (the people [...]
Pingback by Hibernate, Spring and ASM « A Public Scratchpad — June 3, 2007 @ 10:16 am
Why should GWT kill anyone MVC framework? It is not even a strong powerful framework – it just helps Java developers who cannot wrap their brains around JS, to actually be able to establish a UI…Which is actually euthanasia for those guys, since if you don’t know JS, it will be deadly for you to track the JS bugs GWT has generated from your Java thinking…
Comment by sebnem — December 7, 2007 @ 7:18 pm
Hi,
I agree with most of the comments. However I don’t agree that Spring XML approach is better than annotations.
Regards,
Nagendra
Comment by Raja Nagendra Kumar — February 6, 2008 @ 10:47 am
You are entitled to your opinion Nagendra. But Spring also supports annotations and even configuration in pure Java or Groovy, JRuby and Beanshell etc.
Comment by Peter Thomas — February 7, 2008 @ 8:52 pm
If annotations can be used in Spring, which I find much better than monstrous XML, what’s the point comparing and criticizing both frameworks :D
Cheers !
Comment by Ketan Padia — February 11, 2008 @ 8:36 am
@Ketan
Huh? No point, no point at all. Just me ranting. Move on.
Comment by Peter Thomas — February 11, 2008 @ 2:25 pm
Screw GWT, it’s outdated technology already. Try Adobe Flex (+Java). Ever since I started using Flex Builder I’ve decided that Flex is the future of RIA and the best option available for most anything with more than a trivial level of functionality. Ajax should be abandoned only for use on mostly static webpages that want to display minor updates periodically without a page reload – that’s it.
And no, I’m not an Adobe “committee member” with an agenda. :) I haven’t had this much fun doing software development since my days of C++ programming little graphics apps ten years ago!
Yep…screw Ajax for RIA! It’s a cute hack appropriate for reloading the scoreboard of an ESPN webpage. Does anyone in their right mind enjoy looking at (and debugging) JavaScript crap? Especially when you could be using Flex debugging tools on the same level as Eclipse/Java – no freakin way! I’m tired of even gmail screwing up (somebody has to admit that it has issues sometimes!), tired of crappy “Ajax enabled” sites completely blowing up or “appearing” to work when they actually aren’t doing crap.
All hype!
I’ll NEVER go back to Ahax again!! Hahaha… what painful misery it seems like now, looking back with the tools Flex/Air and Java gives you! As for the skeptics or the people who already spent all their time learning Ahax, and as a consequence don’t want to switch to something else… oh well!
No loss to me, I’ll just be here producing killer apps in no time with Flex, and having a pleasant time doing it, while all the Ahackers toil away…endlessly chasing after that “perfect Ajax framework” that works with all versions of all browsers available on the internet! Including those which haven’t been created yet…lol…
Comment by AjaxSucks — February 15, 2008 @ 1:09 pm
It would have been nice if you gave your real name and a link to a blog post of yours sharing your experiences with Flex.
Now you certainly *do* sound like an Adobe spam bot.
I must say that I’m very interested in Flex, not yet got a chance to try it out.
Comment by Peter Thomas — February 15, 2008 @ 1:48 pm
Sorry Peter – I don’t have a blog. :(
Comment by AjaxSucks — February 16, 2008 @ 9:11 pm
http://flex.sys-con.com/read/494374.htm
Try that link… this guy knows his stuff.
“If you are still thinking of using AJAX of JSF for your data intensive business application, just stop it, will you! Do not spend half of your project’s time trying invent your version of a data grid with embedded tree or a fancy dropdown, fighting with the browser incompatibilities and slow communication protocols. You can’t afford to be in the Google state of mind. Your human resources and the budget are limited, and your enterprise is not a software development company. Just take care of your business with Flex 3, AIR, and BlazeDS.”
Comment by AjaxSucks — February 17, 2008 @ 1:35 am
Whatever. You still don’t want to provide your real name eh.
Can’t help pointing out this bit of news that Adobe plans to introduce DRM into Flash. *shudder*
http://techdirt.com/articles/20080220/121537306.shtml
Comment by Peter Thomas — February 21, 2008 @ 11:53 am
What use would my name be? It won’t be anywhere. Jus sayin… I’ll never go back to Ajax, or GWT, although I agree with your original points.
As for the DRM thing, I’m going to wait a little more and see what happens. It sounds bad (can’t be good anyway), but I believe it’s use is “optional” (for content providers), so I’m not sure what kind of effect it will really have yet. It shouldn’t effect the use of Flex within an “enterprise” environment or most other uses as far as I can tell, although it’ll probably hurt Flash video.
Of course I’m not a DRM expert, I only know that generally speaking it sucks.
Comment by AjaxSucks — February 25, 2008 @ 8:56 am
> Yep…screw Ajax for RIA!
Seems you never used something like Wicket.
Comment by me, myself and I — April 3, 2008 @ 7:32 pm
Flash sucks. It’s closed technology. Altough supported on many platforms, it is not as pervasive as JS and HTML. I’s a pain in the ass to do flash without commercial tools. It’s not parseable. Bluntly put, it sucks.
Comment by me, myself and I — April 3, 2008 @ 7:56 pm
I found a good blog post on the shortcomings of Flex here:
http://confinedthought.blogspot.com/2008/04/flex-shortcomings.html
Comment by Peter Thomas — April 4, 2008 @ 8:43 am
“A large part of what goes into a specification, will be the political agendas of the committee members.”
This is very true.
Comment by Jeremy Chone — May 16, 2008 @ 9:35 pm
Yea keep on ranting…BTW Spring sucks.
Comment by Ketan Padia — June 22, 2008 @ 6:34 pm
@Ketan
From your comment at #15 it looks like you think Spring sucks because of the XML. You do know that Spring supports annotations instead of XML right?
Also the Spring Java config option is worth mentioning.
Some people like me are not in favor of using annotations for everything. You can have a look at this comment.
Comment by Peter Thomas — June 22, 2008 @ 9:51 pm
Peter, you were really not nice responding to my earlier comment. Yes I know it supports annotations, JSF, Hibernate etc etc …but none of these or any JEE frameworks around are perfect, like one size fits all thing and that’s why I mentioned in my earlier comment that there’s no point comparing these two Frameworks. Anyway, I am moving on :-)
Peace.
Comment by Ketan Padia — June 23, 2008 @ 5:21 am
@Ketan Padia
Hmm. Let’s look at your earlier comment again:
I really couldn’t understand *your* point when I read this a few months ago but let me try again now.
Suppose I want to write a blog post comparing two frameworks A and B. Both A and B support annotations. So going by your logic, I should not bother writing a blog post at all?
Comment by Peter Thomas — June 23, 2008 @ 8:19 am
i can not but agree with the huge role Spring framework has been playing for a good while now. I was one of the ones that chose EJB 2.1 and it had been a wrong choice (clearly proven). I had seen the “Spring” guys flying by me with all the cool stuff (DI, Hibernate, AOP etc). If there are guys that pretend the wheel is about to get the sunlight, then it is only to their own detriment. I would not worry about that. Most of us know who gave what and when.
Comment by ncaralicea — December 10, 2008 @ 2:36 am
I agree with you totally as far as ideaogly of this post is concerned .
Differ on two points
1- Spring annotations are much better than XML config .
2- Flex is much better than GWT .
Want to add one more point :)
for presentation layer Struts 2 are better than any thing I have every used I have used servelets , jsp , jsf , spring MVC , Struts and struts 2
Comment by Shahzeb — December 24, 2008 @ 8:09 am
@Shahzeb: I disagree with your third point ;) – have you used Wicket?
Comment by Peter Thomas — December 24, 2008 @ 10:17 am
Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.
Comment by sandrar — September 10, 2009 @ 5:59 pm