Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advantages and disadvantages of using JSF+Spring integration

 
Zainab Haf
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can anyone help me out that what are the main benefits and problems of using spring with JSF 2 over using standalone JSF 2 applications since JSF and spring itself are separate complete frameworks. How the use of their integration is useful?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring is actually a whole collection of frameworks. Spring-web is the one that is most equivalent to JSF.

On the whole, I prefer to use JSF for web form-related facets of my webapps. It is more straightforward and is more supportive of reusable (POJO) components. However, I do have an app or 2 that use Spring to generate specialized output such as XML while still using JSF for the vanilla UI stuff.
 
Zainab Haf
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what do you suggest its better to use JSF only or application with JSF and spring integration when your form data is linked to database queries and procedures (i.e having dao and service layer)?
Thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zainab Haf wrote:So what do you suggest its better to use JSF only or application with JSF and spring integration when your form data is linked to database queries and procedures (i.e having dao and service layer)?
Thanks


No. Spring-web is not directly related to database queries. That's Spring-persistence, and I inject Spring persistence service beans into my JSF backing beans all the time.

I was just saying that JSF is not well-suited to non-HTML, non-form output such as XML output, so I have used Spring-web for stuff like that.
 
Zainab Haf
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Tim Holloway for guidance.It was really helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic