views:

374

answers:

2
+1  Q: 

spring mvc vs seam

Hi,

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.

Does someone have a professional experience with this two frameworks? Can you recommend the better one ? Why?

Regards

+1  A: 

I have worked professionally with Seam and it is a killer framework. It really boosts up your productivity. You can use POJOs instead of EJBs, if you think EJBs are slowing you down. About the deployment, just consider deploying to Tomcat instead of JBoss. On my machine redeployment in Tomcat is done in a couple of seconds. But I still haven't used Spring MVC to compare them.

Petar Minchev
Do you have any problems with back button? My customer really bother that.
darko petreski
Back button usage should be deprecated in web applications. It should not be used for the program flow. Otherwise Seam is one of the few frameworks which helps you with the back button. http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/seam/Seam_Reference_Guide/Pageflow_in_Seam-Seam_and_the_back_button.html
Petar Minchev
What ide are you using? Do you use jpa ?
darko petreski
Do you recommend seam? Please compare it with other frameworks you have used previously.
darko petreski
I am using Eclipse and also JPA. Seam is the first web framework I have used professionaly, so I can't really compare it to others. But I can recommend it, because of its ease of development. I really think it has great future.
Petar Minchev
+1  A: 

I use both: Spring-MVC (2.5) and Seam

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:

Typically web application uses the following path

view >> controller >> service >> domain

With Seam, you can get

view >> service >> domain

Or even (by using mediator pattern provided by Seam Framework)

No controller, No service

view >> domain 

Besides that,

  • JSF 2 supports JSR 303 - Bean Validation
  • You can use Wicket instead of JSF if you want
  • Conversation and Business process management support
  • Use can use Spring DI if you want

Spring-MVC

It has a powerful web-Tier infrastructure

  • 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)

But i still not use Spring 3.0 because

  • 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

...

About The learning path, i think both are similar.

Arthur Ronald F D Garcia
`"Because Seam uses Java Server Faces Technology (A server-side based Technology), behind the scenes".` Can you please prove this point? Yes Seam utilize JSF and makes a bridge for it, but you can use Seam without touching JSF or any of the JSF functionalities. It all depends on which filters, servlets and interceptors you enable.Of course there are tons of in-built components that are JSF specific, but the same is true for security, spring, REST, etc.
Shervin
@Shervin You are right when you said: It all depends on which filters, servlets and interceptors you enable. But notice i have included Wicket instead.
Arthur Ronald F D Garcia