Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Spring vs. Seam

  1. #1

    Default Spring vs. Seam

    Hi,
    This is a question that has been discussed before, but I would like to hear some more recent comments.

    Starting a new large scale service project the question from my managment is being asked whether to build it on Spring or on Seam.

    Of course Spring and Seam are not the same, especially when you look at the ecosystem around both products, but the answer I'm looking for is:

    How does Spring position itself as a competitor with Seam?

    Does it really come down to choose EJB over Ioc?

    I think a fundamental difference between Spring and SEAM is around the integration of other technologies: Spring is a very open and extensible architecture while Seam is a technology which tightly integrates with other technologies that come from the RedHat/JBoss world. For example using Seam you commit to Enterprise Java Beans 3.0 as the component architecture and using an EJB container (i.e JBoss) to run in.

    As I see in Spring these are choices using not requirements. At the core of the spring framework ist the IoC container which has been designed as a lightweight alternative to EJB.

    I have been working on a Spring based webservice project for about a year but I have not worked with SEAM.

    Thank you for commenting on this, or pointing me to other fundamental differences.

  2. #2
    Join Date
    Jul 2005
    Posts
    156

    Default

    Hello,

    We're currently using both frameworks in the same application (rather unusual) - but not in production for the moment.

    Seam is rather really really fine if you want to use Jsf and Jpa.
    If your application is mainly targeted for those two technologies (or even wicket - Seam 2.1 is now integrated with wicket), I would say just use Seam and not Spring - Seam is largely better integrated with those technologies (and of course use facelets and icefaces or richfaces).

    We chose Spring because we were not interested by using massively Jpa (we prefer plain old Jdbc - rather simpler for us). So we like Spring goodies such as the templates (I know we could have rewritten this part - but why bother ? Spring makes it better than us !)
    We also like Spring Batch.
    We also want a platform with a backbone we can use for Struts based applications or Jsf based ones.
    So, all these requirements points us to using Spring.

    About the integration Seam / Spring are rather really well integrated.
    Our main concern has been primarily about security (we created a bridge between Seam and Spring Security). But you won't need it if you choose to use Seam Security and drop Spring Security.

    I'm not saying that if you use Seam you *must* use Spring.
    Just look at Seam documentation to make a clear idea of the functionnalities in Seam and if it covers 90% of your needs, use Seam without Spring.
    Same thing, if you want to code fast, just use Seam without Spring (and avoid service / daos) - but you'll have surely some difficulties if your application code base is big.

    If you don't want to use Jsf or Jpa (and don't want to use any other component base framework), I would say stay out of Seam.

    Our architecture is :
    Jsf Page / Seam Action / Spring Manager / Spring Dao.
    And no transfer Objects !

    About Seam / Spring integration : http://docs.jboss.com/seam/2.0.2.SP1...ml/spring.html

  3. #3
    Join Date
    Jul 2005
    Posts
    156

    Default

    Some more information, we had a very long learning curve, mostly because of the complexity of the followgin frameworks (from most complex to lowest) :
    - Jsf
    - Jpa
    - Seam

    Spring was really 'piece of cake'.

    Seam (and Jsf for this matter) is really fine if you just stay on classic use cases (those generated with seam-gen for instance).
    If you want more, you have to struggle to understand how Jsf and Seam works.

    Jpa : we're currently staying out of it (we would have the same conclusion with using Hibernate for the matter) - too much framework there.

    Good luck !

  4. #4

    Default

    Thanks for your comments.

  5. #5
    Join Date
    Oct 2008
    Posts
    23

    Default

    I have been using Seam since 1.2.1.GA. There is a very big learning curve with JSF/facelets/Richfaces/EJB3/Hibernate/Seam if you haven't used any of these technologies before. Read Seam in Action.

    Quote Originally Posted by couzteau View Post
    How does Spring position itself as a competitor with Seam?
    SpringSource and Redhat/JBoss are direct competitors. You can integrate SpringBeans in Seam apps.

    Quote Originally Posted by couzteau View Post
    Does it really come down to choose EJB over Ioc?
    It comes down to stateful vs. stateless context management. Seam also adds business process context (in addition to the standard request, session, application contexts). Seam uses interceptors (as does EJB 3 and Hibernate) which are simple versions of AOP. There's a whole lot of functionality that Seam adds like identity management with 2.1.0.GA and remoting, conversational web services, seam-gen a project skeleton, etc. Very powerful framework. The goal of Seam is to extend and unify JSF & EJB3 and is now the basis for Web Beans (JSR 299) which is slated to be included in Java EE 6.

    Big difference b/n Seam and Spring: Seam has very little XML config (there are literally a handful of XML files to configure) and Spring uses AOP extensively while Seam does not.

    Quote Originally Posted by couzteau View Post
    For example using Seam you commit to Enterprise Java Beans 3.0 as the component architecture and using an EJB container (i.e JBoss) to run in.
    EJB 3 components are optional in Seam. You can use JavaBean classes (POJOs) if you want as your backing beans.

  6. #6
    Join Date
    Nov 2008
    Posts
    2

    Default

    Quote Originally Posted by rabies View Post
    EJB 3 components are optional in Seam. You can use JavaBean classes (POJOs) if you want as your backing beans.
    That's correct. I'm not sure how the rumor got started that Seam requires EJB or even JBoss app server for that matter. I work on a Seam app (JSF) which just uses pojos and runs great under Tomcat.

  7. #7

    Default

    Quote Originally Posted by mmichalek View Post
    That's correct. I'm not sure how the rumor got started that Seam requires EJB or even JBoss app server for that matter. I work on a Seam app (JSF) which just uses pojos and runs great under Tomcat.
    Out of curiousity, when deploying under Tomcat doesn't it need a Embedded JBoss to run the application using JBoss Seam? Or is that purely used when developing with EJBs?


    Shah.

  8. #8
    Join Date
    Nov 2008
    Posts
    2

    Default

    Quote Originally Posted by shahnawazshahin View Post
    Out of curiousity, when deploying under Tomcat doesn't it need a Embedded JBoss to run the application using JBoss Seam? Or is that purely used when developing with EJBs?
    You only need JBoss embedded for EJB or other container managed stuff outside of the servlet container. We run our Seam app under plain Tomcat 6 (not using EJB, etc.).

  9. #9
    Join Date
    Feb 2009
    Posts
    2

    Default

    Given the following constraints, what is recommended?

    1. Integration with Workflow (JBPM)
    2. Integration with Reporting (Pentaho or JasperReports)
    3. To the extent possible, ability to export to MS-Word, Excel and PDF formats


    Seam seemed like the obvious choice due to JBPM?

  10. #10
    Join Date
    Oct 2008
    Posts
    23

    Default

    Quote Originally Posted by embaye View Post
    Given the following constraints, what is recommended?

    1. Integration with Workflow (JBPM)
    2. Integration with Reporting (Pentaho or JasperReports)
    3. To the extent possible, ability to export to MS-Word, Excel and PDF formats


    Seam seemed like the obvious choice due to JBPM?
    Seam supports jBPM integration (see the online Seam in Action chapter here: http://manning.com/dallen/SeamIACH14_bonus.pdf) as well as Excel/PDF support in Seam 2.1.

    check out these links:

    IText:
    http://docs.jboss.com/seam/2.1.1.GA/..._single/#itext

    Excel:
    http://docs.jboss.com/seam/2.1.1.GA/..._single/#excel

    jBPM:
    http://docs.jboss.com/seam/2.1.1.GA/...l_single/#todo
    http://docs.jboss.com/seam/2.1.1.GA/...ngle/#dvdstore

    Post add'l questions here: www.seamframework.org

    And watch out for Christian Bauer, he bites...

    As far as reporting integration, not sure, haven't heard of any. Pentaho sucks, we evaluated and went with Oracle BI tools.

    Also, consider the fact that JBoss AS 5 supports Ruby on Rails app deployments as well (pretty neat!)

    http://java.dzone.com/articles/odd-t...terview-with-b
    Spring and Seam can co-exist in a world ruled by death, taxes and XML.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •