Seam 2.0.1 released, Is Seam or Spring the best way to write JSF/JPA based applications?
Seam 2.0.1 is out and ready for download. Seam is a framework that supports web applications that are built with EJB3 and JSF--JEE5 centric. Seam 2.0.1 provides cleaner RESTful URLs which "means that you don't have to do any extra work to consume or generate cleaner URLs" (Seam blog). This is the first GA release of Seam in over six months.
Seam 2.0.1 works with the latest version of JBoss Tools (merged JBoss IDE and Exadel Studio), which provides support for building Seam applications, visual page editor, JSF support, Facelets support, JBoss AS support, and more.
The new release provides documentation for using Seam with WebSphere, OC4J, WebLogic, Tomcat, etc., and now runs with the latest version of JBoss 5.
The Seam generation tools now generates Seam apps based on an existing database or JPA annotated classes.
What is Seam?
"EJB 3.0 has changed the notion of EJB components as coarse-grained, heavy-weight objects to EJBs as lightweight POJOs with fine-grained annotations. In Seam, any class may be an EJB - Seam eliminates the distinction between presentation tier components and business logic components and brings a uniform component model to the EE platform...But Seam is not limited to environments that support EJB 3.0. Seam may be used in any J2EE environment, or even in plain Tomcat. " from Seam site.
Seam integrates with Spring as an option. Seam provides different contexts (somewhat like scopes in Spring) for components (like JSF managed beans), namely, Stateless, Event, Page, Conversation, Session, Business Process and Application context that provide many more options than the traditional scopes in JSF.
Seam provides many enhancements to the JSF programming model for validation, JSF components, RESTful URLs, Ajax remoting, providing security support, and a lot more.
Seam integrates with Quartz, GWT, Hibernate Search, iText PDF, JBossCache, jBPM, RichFaces, IceFaces, Groovy, JEE, JMS, WebServices, Java mail (with markup to generate mail, sending and receiving mail), and much more.
Seam seems to be well documented and there are several books published on Seam.
Seam 1.0 beta was released on 9/19/2005. The first versions seemed to be an alternative to Spring with a strong emphasis on JEE, JSF and EJB3. Later versions seemed to support more application servers and integration with Spring.
Seam integration: Spring and Seam running through the meadow, holding hands
It appears that Seam integrates well with Spring. You can inject Seam components into Spring beans, inject Spring beans into Seam components, and use a a Spring bean as a Seam component. In addition Seam provides Spring scopes for all of the Seam contexts, you can use Spring transaction support, and much more.
Questions for Seam users:
- Are you using Seam now, if so what do you think?
- How is the Seam learning curve?
- What is your experience working with Seam?
- What features of Seam can you not live without?
- How good is the Seam generation tools?
- Is Seam the best way to write a JPA, JSF based application?
Questions for Seam versus Spring:
- How would you position Seam and Spring? competitors or complementary? overlap or augmentation?
- If you are using Seam and Spring, and you had to live without one of them, which one would it be?
- Do you use Seam with or without EJB3?
- Do you use Seam with or without Spring?
- Where do you think Spring and Seam overlap and when they do overlap which one is better?
- Do you think Spring JSF support is weak or strong?
Getting started with Seam
About the author
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)