Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring mvc 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.

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

Regards

like image 807
darpet Avatar asked Apr 19 '10 14:04

darpet


1 Answers

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.

like image 199
Arthur Ronald Avatar answered Oct 15 '22 08:10

Arthur Ronald