File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Seam vs Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Seam vs Spring" Watch "Seam vs Spring" New topic
Author

Seam vs Spring

Brent W Farrell
Greenhorn

Joined: Apr 10, 2008
Posts: 17
I have often heard Seam being compared to the Spring framework. What is the difference between the two? Does one hold a clear advantage over the other?
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Spring is an integration framework for many popular Java frameworks whether they are web frameworks (Struts2, JSF, Spring MVC), persistence (Hibernate, iBatis) and so on.
Seam on the other hand focuses heavily on the JEE 5 technologies (EJB3, JPA, JSF) and provides tight coupling to JBoss technologies (Drools, jBPM, RichFaces).
Seam introducing many important concepts like the conversation and process scope, workspace management.
If you are not comfortable with the JEE5 stack, you can go with our old friends, the POJOs.
And because Spring is the tycoon those days, Seam provides an integration with Spring but not without caveats.
If you want to employ JSF in your project, Seam is a killer framework (really).
[ August 05, 2008: Message edited by: John Todd ]
Donald Kittle
Greenhorn

Joined: Feb 14, 2005
Posts: 2
One nice thing about Spring, though, is that you can use it outside of any container. If you ever need to integrate a console application with your web application, Spring makes it easy. I SO wish that WebBeans didn't have such a web centric approach - this is a huge oversight. We need a unified bean factory (and ubiquitous EL support too) for all types of applications, not just web.
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

Originally posted by John Todd:

And because Spring is the tycoon those days, Seam provides an integration with Spring but not without caveats.
If you want to employ JSF in your project, Seam is a killer framework (really).

Since Spring is well known people try to compare it Seam. But Seam has Richest GUI support. You don't need create any .xml file for bean class, just annotations works. I would say Seam is the future and Spring is current. And as mentioned by John Seam is a killer framework if project team planning to use JSF.
Dan Allen
Author
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
Originally posted by Donald Kittle:
One nice thing about Spring, though, is that you can use it outside of any container. If you ever need to integrate a console application with your web application, Spring makes it easy. I SO wish that WebBeans didn't have such a web centric approach - this is a huge oversight. We need a unified bean factory (and ubiquitous EL support too) for all types of applications, not just web.


While I definitely see where you are coming from, you have to understand something. There are probably a million web projects to 1 console project. Yes, you're application is still important, but Java EE was so screwed up that they needed to solve that problem first. Gavin has said he is going to work some ideas once WebBeans is done to take it further.


Dan Allen | http://mojavelinux.com | Author of Seam in Action - http://mojavelinux.com/seaminaction
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 467
Another thing is that most Java EE technologies need a container of some sort (EJB, JSF, servlets, JSP, etc.). Seam focuses on Java EE technologies, and hence, it hence it'll need a container.


Visit my blog: http://jnassef.blogspot.com/
Alex Savitsky
Greenhorn

Joined: Aug 07, 2008
Posts: 4
Originally posted by Alaa Nassef:
Another thing is that most Java EE technologies need a container of some sort (EJB, JSF, servlets, JSP, etc.). Seam focuses on Java EE technologies, and hence, it hence it'll need a container.


Seam has got some bad publicity initially, because version 1 did require some sort of J2EE container - and now people don't even bother to check if things have changed. As of version 2, Seam can run in all the same containers that Spring runs in - I have several production applications utilizing Seam stack (JSF, JPA) that are running in plain unmodified (no JBoss Embedded) Tomcat 5.5, without any loss of functionality or features.
[ August 07, 2008: Message edited by: Alex Savitsky ]
Dan Allen
Author
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
Thank you Alex, that was a very accurate explaination of the situation. Seam 2 is significantly different than Seam 1, not just in the API but in the goal of the framework. Seam 2 is really about options. Option to use JTA or resource-local transactions. Option to use Java EE or a servlet container. Option to use JPA w/ any provider or to use native Hibernate. Even now, option to use Wicket instead of JSF (Seam 2.1). Seam 1 was really more of a research project, whereas Seam 2 is a product (not the selling type, the deployment type).
 
 
subject: Seam vs Spring