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


JavaRanch » Java Forums » Java » JSP
Bookmark "JSF Replacement for Struts?" Watch "JSF Replacement for Struts?" New topic
Author

JSF Replacement for Struts?

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I've noticed in a couple of posts, Bill, you suggested that JSF is a replacement for Struts.
It was my understanding a while back that JSF was supposed to be more or less a UI model that would tie very nicely into Struts. Now that JSF has added it's Nav and Validation components, it does seem like it would be in direct competition with Struts.
Do you have any idea how the industry is looking at this POV? Especially since the concensus is that Struts is the Defacto Intrustry Standard? Were my original thoughts on Struts true? Is it really just a Buzzword of the now? And JSF will become the new Buzzword until someone makes something more Buzzy?


GenRocket - Experts at Building Test Data
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Well there is certainly enough buz going on
I think that there will be a transition period but eventually just about all projects will be using JSF in one form or another. There is a ton of investment going into the JSF space so expect to see lots of tooling etc.
And as you said as soon as a more buzzy thing comes along JSF will be but a passing memory...


TTFN,<br /> <br />-bd-<br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/0471449156/qid=1064343733/sr=2-1/ref=sr_2_1/002-8375300-3666449" target="_blank" rel="nofollow">Jakarta Pitfalls</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471146153/qid=1064343733/sr=1-2/ref=sr_1_2/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">J2EE AntiPatterns</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471462071/qid=1064343733/sr=1-3/ref=sr_1_3/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">Mastering JavaServer Faces</a> | <a href="http://bill.dudney.net/roller/page/bill" target="_blank" rel="nofollow">Blog</a> | <a href="http://www.jroller.com/page/BillDudney" target="_blank" rel="nofollow">Eclipse Blog</a> | <a href="http://www.sourcebeat.com/TitleAction.do?id=2" target="_blank" rel="nofollow">Eclipse 3 Live</a>
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

And as you said as soon as a more buzzy thing comes along JSF will be but a passing memory...
Awe the joys of Development.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

Not necessarily a bad thing... evolving technologies keep app architects like myself employed!


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Bear Bibeault:
Not necessarily a bad thing... evolving technologies keep app architects like myself employed!

Or just frustrates people like me all to Hell so much that I want to be a Garbage Man. They get paid really well where I live. It's all Unionized.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

I know you better than that Gregg; without a learning challenge you'd wither and die.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Bear Bibeault:
I know you better than that Gregg; without a learning challenge you'd wither and die.

You are probably right. I am usually the first one that jumps on the "ooooh, it's new, I have to try it..." band wagon.
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
I think that there will be a transition period but eventually just about all projects will be using JSF in one form or another.
I read on the Sun's site that JSF are not replacement of struts, rather these technology can be used together. Can you please elaborate on this part. How can two frameworks, doing almost same things can work together


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Prakash Dwivedi:
[QBI read on the Sun's site that JSF are not replacement of struts, rather these technology can be used together. Can you please elaborate on this part. How can two frameworks, doing almost same things can work together[/QB]

Yeah, Prakash, I also think that they can work together and compliment each other... I believe that evolution of JSF won't let struts to be no use in the industry... Struts is now like a mature technology in the industry...
So we should hope something good from the evolution of JSF...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi All,
Struts and JSF can be used together. The idea is to allow us to transition to JSF gracefully. With the struts-faces tags you can use a JSF front end and continue to use your Actions, ActionForms, struts-config.xml etc.
We have a whole chapter dedicated to gracefully converting from Struts to JSF.
Over time though I expect that most new projects will use the whole JSF stack.
Hope this clears this up a bit.
Michael Cleary
Ranch Hand

Joined: Jul 29, 2003
Posts: 93
There seems to be a lot of discussion concerning Struts, struts vs JSF, etc. Well, since I know zip about either, would it be advisable to spend some time with struts before/concurrently with learning about JSF?
TIA,
Mike


Mike<br />SCJP 1.4<br />----------------------------<br />mdcleary@earthlink.net<br />----------------------------<br />There are 10 types of people<br />in the world. Those that <br />understand binary, and those<br />that don't.
Aaron Turner
Greenhorn

Joined: Mar 03, 2004
Posts: 7
We are currently using Struts and want to move toward JSF. You mentioned that the there should be a transition to JSF. Does this mean that you recommend going fully to JSF or can the two co-exist indefinately?
If both are being used together, then are the <navigation-rule> tags for JSF used?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Aaron Turner:
We are currently using Struts and want to move toward JSF. You mentioned that the there should be a transition to JSF. Does this mean that you recommend going fully to JSF or can the two co-exist indefinately?
If both are being used together, then are the <navigation-rule> tags for JSF used?

I am pretty sure that there are some <jsf-struts> tags that allow you to use Struts Actions. So the nav-rules would not be used.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I hope that this IBM DeveloperWorks might be useful for those, who are curious to know how to integrate Struts, Tiles and JSF...
As for me, the article is excellent to explain about this context...
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi All,
The JSF/Struts integration is about
1) doing an orderly transition
2) using JSF UI Components but remaining on Struts navigation model
You can have them both coincide indefinitely but there is little reason to do so IMO. If you have an application that is currently running fine in Struts then leave it there. If you are doing new development then JSF might be the way to go if you have at least 6 months before you have to deploy to production.
The only reason that you'd have the coexist is if you have an existing Struts app that needs some UI Component and you don't have the time or money to rework the whole app. Then you'd want to use the integration tags to use the UIComponent in the UI but remain on Struts for your application.
I'm sure Craig would have a different take on the coexistence of the two...
Hope this helps!
Sharon Ross
Greenhorn

Joined: Sep 25, 2003
Posts: 13
Bill,
I am a bit confused and perhaps you can clear this up for me.
From the information on the amazon entry for your book...
"This innovative book arms you with the tools to utilize JavaServer Faces (JSF), a new standard that will make building user interfaces for J2EE� applications a lot easier."
Would that not mean that JSF would be the V in the M-V-C pattern? And Struts be the C? For that matter, you could use a different framework for the C and continue to use JSF?
Thanks,
Sharon


a belly dancing programmer<br />both artistic processes
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi Sharon,
Well I'd say just because you can does not mean that you should
While it is possible to use Struts as the controller with JSF as the view the only reason I can think of to do that is because you have to put a JSF UI on the top of an existing Struts app. You should not create a new app that uses Struts as a controller but JSF as the view.
JSF has a full MVC implementation and thus is able to 'do it all'.
The part that makes J2EE apps simpler is the way that you build the UI with JSF. JSF is simpler than Struts esp. with tool support.
Hope this helps!
 
GeeCON Prague 2014
 
subject: JSF Replacement for Struts?