• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts or JSF

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

I bought a book on STRUTS but i'm hearing the Java Server Faces may be the best way to go!?

Can anyone tell me which methodology will probably be the best approach going forward?

Thanks very much!
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to the Web Application Framework forum -- this kind of question is perfect for that forum.

So please post your replies there, thanks!
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I'm just starting to use JSF now and I have used Struts last year. Word around the campfire is Struts is going to die and JSF will arise... I heard it from a guy in a conference. He said that the Struts project will not move on (or will slow down a lot) and JSF will be the next force in the Frameworks world. That makes sense, because Craig McClanahan, Struts creator, is now working as one of the Specification Leaders of JSF.

I think that JSF is just great, it's a great idea, a beautiful framework and it's not that hard to use. But, if you are about to start an Application now, consider this: there are more people using Struts than JSF today, so, if you have a problem, if you get stuck somewhere in your development process (and you probably will), it will be easier to get help with Struts (at least it is today).

Maybe you should take a look at Craig McClanahan's explanation about Struts, JavaServer Faces and Java Studio Creator.
[ January 06, 2005: Message edited by: MTulio Borges ]
 
bob connolly
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks MTulio!

I think i will finish reading the STRUTS book and then start taking a look at JSF!

MTulio! I really appreciate your very thoughtful reply!

bc
 
bronco
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bob,

I very recently went through a similar process. I did some prototyping with both Struts and JSF and ending up deciding to go with JSF. It's a new project, and I just felt like going with the technology that seems to be gaining momentum (i.e. bring added to J2EE) vs. one that's losing momentum (first JSTL, now JSF...) was the way to go. I'm sure there may be a few more bumps in the road on this path, and part of me fears that they may make significant changes to JSF at some point in the future that will bite me, but I still feel good about the decision.

Aside from the momentum issue, I found that I really like the JSF model better...it just "feels right" to me.

I've been away from actual implementation for a few weeks now (working on requirements), so I can't relay any detailed experiences yet...but soon!
 
Dave Wood
bronco
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BTW, be sure to check out this thread if you think there's a good chance you'll end up choosing JSF and you want to be able to find JSF answers more easily.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think MTulio Borges's response about Struts not moving on is a bit hasty. The Struts team is currently working on Struts 2.0, aka Shale. There is a plan to move from the Struts html taglib to JSF for the view. So I don't see Struts dying anytime soon. Just evolving.

With that being said...

There are a ton of Struts vs JSF threads not only in this very forum that you can search for but also on Google. Searching for these threads and links may give you some quicker satisfaction than waiting for people to reply here. As a kick start here is a thread in which I linked to about 4 JSF vs Struts threads. There are many many more. Searching for "Struts JSF" in this forum turns up 107 results. But that should get you going.
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The strength of Struts is where there's a fair amount of logic - putting logic into "JavaBeans" a la JSF makes me uneasy. Conversely, JSF is very strong in presentation and editing. Although Struts never evolved a really good workflow. JSF does somewhat better there.

And, of course, JSF is supposed to lead us to the Silver Bullet of webapp design - drag-and-drop design a la Visual Basic. Now if only someone would do a good open-source DND JSF designer. At the moment the only freebie JSF aids I know of are for the config files.

Just to make life more interesting, there's Tiles, which was an add-on for Struts 1.0, an integral part of Struts 1.1 and may become completely independent of Struts in the near future (or so David Geary hopes).
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The strength of Struts is where there's a fair amount of logic - putting logic into "JavaBeans" a la JSF makes me uneasy.

What about ActionForms? Aren't they just JavaBeans with some logic?

Now if only someone would do a good open-source DND JSF designer Well, that would be nice. However, I still wouldn't use it. Just like I don't use Swing GUI builders. Inevitably you just end up with unmmaintanable generated code. Also note that JSF isn't just something to make web app development easier, although that was a high priority. Sun needed something to market. JSF Tools are a gold mine waiting to happen if JSF takes off like Sun hopes. Think Sun Studio Creator.

Personally, I find Tiles more cluttering than helping. I don't see what the big deal is about a couple of includes on each page. All tiles does for me is give me 1 more XML file to take care of.
[ January 06, 2005: Message edited by: Gregg Bolinger ]
 
Dave Wood
bronco
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Personally, I find Tiles more cluttering than helping. I don't see what the big deal is about a couple of includes on each page. All tiles does for me is give me 1 more XML file to take care of.


I'm really glad to hear someone else say this. I hand't used tiles until recently and found myself wondering what the big deal was once I did try using them. Then I tried using tiles with JSF...not pretty!

It seems to me that something like this works just fine in most cases...

...and then in header.jspf...

[ January 06, 2005: Message edited by: Dave Wood ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oddly enough I am almost done with a medium sized webapp and I didn't have to touch anything outside of what JSF provides, using MyFaces of course. No tiles, no JSTL, no scriplets. I'm pretty proud of myself.
 
Marco Tulio Borges
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
I think MTulio Borges's response about Struts not moving on is a bit hasty. The Struts team is currently working on Struts 2.0, aka Shale.



I don't know... I really think that Struts will move slowly after JSF.
 
Tim Holloway
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
The strength of Struts is where there's a fair amount of logic - putting logic into "JavaBeans" a la JSF makes me uneasy.

What about ActionForms? Aren't they just JavaBeans with some logic?

Well, I didn't exactly impress the authors of Struts when I put the persistency mechanism in my FormBeans (anticipating EJB usage), but I'll forgive initiators and validators. I've seen raw business logic done in FormBeans, and that's not forgivable. Especially the one that kept a JDBC Connection as a Form Bean instance variable (SHRIEK!).

Now if only someone would do a good open-source DND JSF designer Well, that would be nice. However, I still wouldn't use it. Just like I don't use Swing GUI builders. Inevitably you just end up with unmmaintanable generated code. Also note that JSF isn't just something to make web app development easier, although that was a high priority. Sun needed something to market. JSF Tools are a gold mine waiting to happen if JSF takes off like Sun hopes. Think Sun Studio Creator.


Well, if a JSF page designer worked like a VB form, it would work - after all, VB forms work. I'm not asking it to write the backing JavaBean, just allow me to do WYSIWYG page layout so I don't have to spend all my time pairing up raw XML tags.


Personally, I find Tiles more cluttering than helping. I don't see what the big deal is about a couple of includes on each page. All tiles does for me is give me 1 more XML file to take care of.

[ January 06, 2005: Message edited by: Gregg Bolinger ]



The tiles docs were so confusing that only recently have I felt like I could make sense of them. And that's a pretty sad statement considering that it's not exactly rocket science. Of course, so were the Struts docs, which is why I wrote that JavaPro article back in 2K1.

The benefit to tiles is in not having to go back in and modify each and every bloody stupid page in the event that the original includes didn't fit in right. But I agree. I don't like keeping two sets of descriptive info and hoping they'll stay in sync. I've got a Tiles project in the works and I'll either find some way to put that stuff in the metadata the same way I do using XDoclet for the Struts actions or, failing that, go back to includes.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree that JSF, from Sun, will replace Struts.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apparantly Tiles are getting removed from struts and promoted to their own project within apache.

I'm not a fan of them either, I've recently taken a liking to SiteMesh for my templating needs
 
reply
    Bookmark Topic Watch Topic
  • New Topic