• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When it comes to frameworks for web applications, which is better-Struts or JSF?

 
charlsy chuks
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please I would like to know which you would recommend among these two for any category of web applications.
Would it be preferable to use Struts or JSF?

Thank you for the usual quick replies.

Charles.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3764
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eventually, you will need to learn both. But I would suggest you to start with Struts not because it is better or worse but because it is still heavily used in the industry.
HTH,
Paul.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question can not be answered in general, so I very much disagree with Paul's answer. The answer may very well be "neither".

Note that the widely used version of Struts is Stuts 1, which has been dead (as a project) and thus obsolete (for new projects) for quite some time. Struts 2 is not nearly as widely used; I recommend to learn it only if you already know that you will need it.

As regards JSF, it has proponents and detractors. Most of its proponents seem to like it because it's part of JEE (not a good reason in my book, as other frameworks can easily be used with JEE), and not necessarily for its technical merits. Its detractors seem to have strong opinions about not liking it.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3764
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:This question can not be answered in general....

I have seen similar answer many times on this forum and I always find it annoying. You can always answer based on the information posted by the OP. Of course, the more information OP posts the more "correct" the answer can be. Why, you might even ask for the age of the poster to make your answer even more "correct". But that doesn't make any sense. I would rather OP ask further questions than the responder ask for more information.

OP's question is simple and I find such winding answers practically useless.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Ulf.

No one will need to learn either; let alone both. While I've familiarized myself with both so that I can make informed decisions, I've never used either in a project. In fact, more than a handful of my jobs have been to take monstrosities developed in either (especially JSF) and refactor them into more manageable projects.

So while I would say that it's never a bad idea to learn something new, no one needs to learn either.

As to which is "better": that's unanswerable and subjective. My own opinion is obviously neither. If I have to recommend a framework, I'd recommend either of Play! or SpringMVC before Struts 1 or 2. And I'm on the record as thinking that JSF is a cancer that needs to be surgically excised from the face of the Earth.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Anilprem wrote:You can always answer based on the information posted by the OP.

I do not see how Ulf's response fails to address the question that was asked; albeit with a differing opinion than yours.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Anilprem wrote:OP's question is simple...


Yes, it is. But simple questions don't necessarily have simple answers, or even any answers at all.
 
Roel De Nijs
Sheriff
Posts: 10442
134
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the past (6-7 years ago) I developed web applications with both Struts (version 1) and JSF. But today I would recommend neither for web application development. Without any doubt my recommendation is Spring MVC when you are looking for a framework to develop web applications. Since 2012 I develop mainly web applications and all of them were developed using Spring, Spring MVC and Hibernate.
 
Saket Barve
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Charles, depends on what you are seeking to build. There was a good answer provided here: http://stackoverflow.com/questions/2845271/struts-2-or-jsf which details the difference between Action Framework and Component Framework. Is your question purely from learning point of view?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic