tags:

views:

1061

answers:

3
+2  Q: 

Spring MVC vs JSF

Hi,

I haved used Struts framework in all my past applications and for the new application,my client has requested to use either Spring MVC or JSF? I am not familiar with these two frameworks but our timelines are strict. So, I am not sure which framework I will choose to build the application.

Can anyone please suggest me which framework will be easy to learn in quick time?

Thanks

+3  A: 

Of course, it's going to be different for everyone, but I'd suggest Spring MVC, as it's a request-based framework like Struts. Of course, you'll want to learn about core Spring stuff like Inversion of Control / Dependency Injection (but I'd consider that a plus...) and whatever you're going to use for database access (just JDBC? Hibernate? iBatis? etc.).

JSF is component-based, which is a bit different paradigm from request-based frameworks. If you do plan to go the JSF route, I'd suggest looking at Seam from JBoss. It's more of a front-to-back framework that uses JSF as the web/presentation end and EJB as the backend. And pretty much all the people who've used it claim it makes JSF and EJB more usable than they are by themselves.

Good luck on whichever technology you choose, though. (Sounds like you'll need it - strict timelines and a client that's prescribing web frameworks?)

Nate
+1  A: 

I'd suggest SpringMVC, because of the timeframe:

  • you need something with less steep learning curve. SpringMVC is more like Struts than JSF
  • in order to use the power of JSF you need to get familiar with many "tricks", while SpringMVC is more or less straightforward
Bozho
A: 

Thanks experts for the answers. I am also thinking now to go for Spring MVC rather than JSF. Our Web designer has provided us the static htmls and I think it would be tough to convert the static htmls to JSF pages(as it uses UI component). I hope Spring MVC also provides tags similar to struts logic:iterate..

Yatish
Yes, if you have HTML pages from a web designer, it's much easier to use them for Spring MVC views than convert them to JSF components. As for the tag - I think I've usually just used the JSTL c:forEach tag for that for that. The Spring taglibs are pretty minimal - http://static.springsource.org/spring/docs/2.0.x/reference/spring.tld.html - but JSTL taglibs are used also - because model objects are just POJOs/JavaBeans JSTL works fine.
Nate
Agreed, in this case. I personally like JSF better as it better fits my coding style but in this case, Spring MVC would probably be better.
Drew