File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Integration" Watch "Integration" New topic
Author

Integration

francisco roman
Ranch Hand

Joined: Jun 22, 2005
Posts: 31
Anyone has ever tried to use Struts and JSF
together ? Any comment or experience is very appreciated.
Cheers.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

My opinion is to not waste your time. Struts is going to start a major shift here soon if not already. "Shale" is going to have a JSF front with a Struts like backend but it still won't be the same as what you are doing right now.

Struts by itself is still a major standard in web frameworks. But I think you'd be wasting your time dealing with bugs (another thread of yours ring a bell?).

With that being said I would also like to point out how well JSF has worked for me all by itself. The only time I'd see a reason to mesh JSF and Struts together right now is if you wanted the JSF components but didn't want to change all your actions to JSF managed beans. However, I'd still seriously consider the pros and cons of just biting the bullet and conerting it all. Technically if you built your application the right way moving your Actions over to Managed Beans shouldn't really be that big of a deal. It's all just data collection and navigation. All the real work should be in seperate classes anyway, right?


GenRocket - Experts at Building Test Data
Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
I'll second what Greg said but also mention that you might look at using JSF with Spring.

They have been good to me so far, and a heck of a lot easier than I thought. I was worried that the intitial learning curve would be steep...until I actually decided to work with the code. Once I did that, I found out that Spring was pretty easy (although not as simple as Struts) for what I use it for (mostly database work) and since I use Creator, the JSF part is about as simple as can be.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

FYI - I assume Darrin means SpringMVC which is there API for webapps? I'd also not recommend mixing SpringMVC with JSF. Now, if you want to use other aspects of Spring with JSF (AOP, IoC, Transaction Management, etc) then go right head but those are not comparable to Struts. They cover 2 different domains. Struts is a web framework, period. Spring has a web framework module among many other things.

When talking about Spring I find it most helpful to state specifically what modules you are referring to as to not confuse anyone.
francisco roman
Ranch Hand

Joined: Jun 22, 2005
Posts: 31
This seems to me a good place for discussions. I finally
agree with the "don't mix and match" pattern believers.
( Is my English getting wierd here ? ). I refer to JSF and Struts
but probably iti is valid elsewhere.
Thanks a lot to all of you.
Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
Originally posted by Gregg Bolinger:
FYI - I assume Darrin means SpringMVC which is there API for webapps? I'd also not recommend mixing SpringMVC with JSF. Now, if you want to use other aspects of Spring with JSF (AOP, IoC, Transaction Management, etc) then go right head but those are not comparable to Struts. They cover 2 different domains. Struts is a web framework, period. Spring has a web framework module among many other things.

When talking about Spring I find it most helpful to state specifically what modules you are referring to as to not confuse anyone.


I wasn't referring to SpringMVC, just the database portion (why I mentioned that's what I use it for mostly).

I agree that mixing Spring's MVC framework and JSF probably wouldn't be the best thing to do, but using JSF with other parts of Spring (like datbase access) is a very productive thing IMHO.
 
GeeCON Prague 2014
 
subject: Integration