Reputation: 2500
I´m facing a project where I need to build a presentation layer, where a lot of the logic is already implemented in Spring MVC 3. I´ve been working a little with Spring before, but mostly with Struts 2 (in case that´s relevent...).
Lately I´ve also been working with Primefaces, which builds on JSF 2. I really like it since you get loads of good looking components out-of-the-box, that are really easy to implement.
I´ve done some reading, and from what I understand you COULD use JSF on top of Spring MVC, but it would add a lot of complexity to the application, and that doesn´t feel like a good choice since I´m pretty sure I´d regret that further down the road.
There´s ofcourse also the alternative to remove the Spring MVC bits and rewrite them to fit JSF 2 instead, but I have a feeling that would include A LOT of work...
So, what approach would you guys recommend? Is there anything like Primefaces that would fit well into Spring MVC? Or would you just go JSP + jQuery?
(this is the drawback of Java imho, there are just TOO many choices)
BR Daniel
Upvotes: 2
Views: 4135
Reputation: 9255
This is a classic question, and there is no one "correct" answer. Since Spring MVC integrates with so many technologies, at the end of the day its really up to you:
For instance, I was working in a shop that had a Spring MVC app with a JSP/jQuery front-end, and a developer wanted to use JSF. No one knew it, no one had time to learn it, and we could accomplish what we needed to get done with the existing app. So, even though JSF has much to offer, we didn't change strategies mid-stream. That decision was not a knock against JSF - it was a decision that was based on our situation.
Upvotes: 4
Reputation: 426
If you want to stay with Spring MVC i would suggest you just use JSP and JQuery, ofcourse you will need to write alot more views...
But i think if you want to use them both you could use Spring Webflow? I haven't used MVC and webflow together much but i hear they work great together? Don't use the springfaces and such because they are really outdated and discontinued since jsf1 or so...
http://www.springsource.org/webflow for some information
Upvotes: 1
Reputation: 1830
spring mvc is not component framework. so, you should use javascript and jsp/velocity/freemaker.
Upvotes: -3