Seam: 1. Developed by Jboss. 2. We Must Use JSF As Front End
Seam: 1. Developed by Jboss. 2. We Must Use JSF As Front End
1. Developed by Jboss.
2. We must use JSF as Front end.
Spring vs seam
Spring mvc is a framework that has been long time out there, it is well documented and
proven technology. A lot of web sites are using spring.
Seam is a framework based on jsf - rich faces implementation. It has a lot of ajax based
components. It uses some heavy stuff like EJB, JPA. All of this is prone to errors and this
framework is so slow (at my computer it is almost impossible do develop something because it is
really slow, especially redeploying on jboss) But is is very good for back office applications.
Because Seam uses Java Server Faces Technology (A server-side based Technology), behind the
scenes, It is better designed for small and medium applications. (Each JSF view Tree is stored on
Session - You can store on client side, but be aware bandwidth issues). But it has some
advantages:
No controller, No service
Besides that,
Handler Mapping (It chooses which Controller should handle the request)
View resolver (It chooses which View should render the response)
It can be used for large applications
Powerful data-binding
Spring 3.0 supports Annotation-based Controller (JSR 303 - Bean Validation, coming
soon)
By using (and extending when needed) MultiActionController, i can get convention over
configuration without no xml settings to define your Controller (You just need to set up
your MultiActionController as @Component)
SimpleFormController provides similar behavior found in Spring 3.0 annotation based
controller
...
I just watched Rod Johnson's presentation in Denmark "Are We There Yet?", and I read some
technical reviews of JBoss's Seam functionality. It seems there are several areas of competing
technology:
- Seam's heavy use of annotation vs. Rod's 'perceived' concerns about them
- Seam's notion of bijection vs dependency injection
- Rod's preference for moving business logic into the domain layer vs the notion of jBPM (I
admit these may be approaches that are more complimentary than competing)
- Seam's use of EJB (Entity and Session Bean) vs POJO's
I just watched Rod Johnson's presentation in Denmark "Are We There Yet?", and I read some
technical reviews of JBoss's Seam functionality. It seems there are several areas of competing
technology:
- Seam's heavy use of annotation vs. Rod's 'perceived' concerns about them
- Seam's notion of bijection vs dependency injection
- Rod's preference for moving business logic into the domain layer vs the notion of jBPM (I
admit these may be approaches that are more complimentary than competing)
- Seam's use of EJB (Entity and Session Bean) vs POJO's
Randy Johnson
#2
Jun 13th, 2007, 05:09 AM
gonzalad Join Date: Jul 2005
Senior Member Posts: 135
Hello,
I'm not in the Spring team, and just a newbie in this framework and this forum.
We're going to use Jsf / Seam / Spring in our company. So perhaps, it can give you some hints.
The reason why we're going to use Seam is because we want to use Jsf (and this is the only
reason).
So we're actually have some pain integrating the 2 frameworks but so far so good... Sure it would
be good if Spring provided the same functionnalities than Seam for Jsf but there isn't.
gonzalad
Quote:
there's no really wide experience about using EjB3 as controllers for the moment - but there's a
lot of experience using classical (and procedural - not DDD) service pojo layer.
You can create the same "pojo" (anotated pojos are not pojos?, aren't ejb3 components also
pojos? nevermind...) layer with Seam, you don't have to use EjB3 if you don't want to...
I don't see a huge difference between using "classic" spring service pojo layers or SFSB/SLSB in
EJB3 in terms of using them as procedural controllers. The only pain with EJB3 is that you
*have* to implement an interface everytime (you should not need to if you don't want to). The
big advantage is that you get replication "out of the box" in case you need it. Seam also provides
replication for "pojos" but it's a bit invasive, the recommendation is to use EJB3 if you need this.
Another huge advantage of SFSB/Seam components is that you can use them as conversational
caches in Ajax, wizards or in combination with extended persistence contexts. The integrated
ORM support is a killer, super-easy to use. This is great stuff that most applications need out of
the box.
Seam has nowadays support for asynch strategies like java.util.concurrent and Quartz in addition
to EJB3 timer service. It also comes with a security framework and extension points for
integration with non-JTA transaction environments.
The best thing about Seam/JSF is that you can build feature rich apps with a fraction of the effort
that it would take with other popular MVC frameworks
Manuel Palacio
#4
Jun 13th, 2007, 06:24 PM
gonzalad Join Date: Jul 2005
Senior Member Posts: 135
Sorry,
My point was only : if you're goign for Jsf Seam appears an excellent choice.
If you go for another web framework, stay out of Seam for the moment.
Another point : my container isn't Ejb3 ready. Don't know how many containers are production
ready for Ejb3 and how many persons are using it...
gonzalad
#5
Jun 14th, 2007, 03:50 AM
Join Date: Dec 2006
Manuel Palacio
Location: Stockholm
Member
Posts: 78
Quote:
All changes made to your domain model are kept in persistence context and only commited
when the conversation is ended.
If you go for a Jpa based application, great solution. If not you won't use Extended Persistence
Context, and so SFSB will be of lesser use
Yeah, if you are after fully atomic conversations and no LIEs in views with Seam then you need
JPA.
Manuel Palacio
You should try to compare Seam with Spring Web Flow. It has JSF support and gives an
experience closer to Seam than straight Spring can.
__________________
Bill
wpoitras
#7
Jul 21st, 2007, 04:39 PM
Join Date: Mar 2006
Nik
Location: Turku, Finland
Member
Posts: 93
Speaking of Seam...
Does anyone know if it possible to do something like @configurable in Seam (e.g. injecting a
stateless EJB into an entity bean)?
Does anyone know (or have theories on) how close the Web Beans (JSR 299) specs are going to
be to the current Seam implementation?
Nik
#8
Jul 22nd, 2007, 06:04 PM
Join Date: Dec 2006
Manuel Palacio
Location: Stockholm
Member
Posts: 78
Quote:
Does anyone know if it possible to do something like @configurable in Seam (e.g. injecting a
stateless EJB into an entity bean)?
It seems that right now this is not possible. Entity bean components do not support bijection or
context demarcation.
Quote:
Does anyone know (or have theories on) how close the Web Beans (JSR 299) specs are going
to be to the current Seam implementation?
Seam will be the reference implementation for Web Beans, and is one of the inspirations and
sources of ideas for Web Beans.
So a future version of Seam will implement Web Beans (I imagine it will be the first
implementation of Web beans).
Manuel Palacio
#9
Jul 23rd, 2007, 01:33 AM
Join Date: Mar 2006
Nik
Location: Turku, Finland
Member
Posts: 93
Quote:
Quote:
Nik
#10
Jul 23rd, 2007, 10:07 AM
Join Date: Dec 2006
Manuel Palacio
Location: Stockholm
Member
Posts: 78
Quote:
That's a shame. Well, you can always pass in a repository or look it up before using it.
Actually, there's a way to work with rich domain models in Seam. The way to do it is by using
the jBPM support provided by Drools, the rules engine. Using this approach services can be
declared in .drl (drools) files globally so they can be used whenever entities need them.
Still, it would be very convenient to be able to use @In within entities as well.
Quote:
Yep, it would make the dependencies more clearly visible. Perhaps WebBeans will allow for
this, being non-EJB also...