File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Is JSF replacing Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Is JSF replacing Struts" Watch "Is JSF replacing Struts" New topic
Author

Is JSF replacing Struts

Pankaj Halder
Greenhorn

Joined: Sep 10, 2008
Posts: 25
Ever since JSP becomes the standard of JEE, many companies selected JSF over Struts. Is Struts going away?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Why do you consider Java Server Pages to be the "standard" of the Java Enterprise Edition?

On what information do you base the statement, "many companies selected JSP over Struts"?

Did you read a few web pages? Or, conduct a survey? How many companies exactly have selected JSF over Struts? How many companies currently continue to use Struts?
[ October 24, 2008: Message edited by: James Clark ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60994
    
  65

Indeed, I've seen quite a bit of the opposite. Some companies I am familiar with, having given JSF a try, are reverting to straight-forward JSP and Servlets. My new job, in fact, is to do just that. The existing Web UI is universally loathed (both usability and technology-wise) and it will be completely replaced with something much more usable and implemented using simpler frameworks (though not Struts).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The Java Server Faces API is strange and awkward. It was four years ago and still is. I'm very happy that I was never "forced" to work with it.
Jane Somerfield
Ranch Hand

Joined: Jul 20, 2002
Posts: 193
When SUN was creating JSF API, they are trying to apply the same beautiful and artistic architecture of Swing. This is what you got now.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30294
    
150

Pankaj,
The only thing "standard" about JSF is that it comes from Sun. It certainly isn't the only MVC framework in the game. Struts 2 is slowly replacing Struts 1 though.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Pankaj Halder
Greenhorn

Joined: Sep 10, 2008
Posts: 25
JSF is called standard because it is in the package under javax.faces.*.*, but not com.sun.*.*. JSF is a component in JEE spec.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
JSF is called standard because it is in the package under javax.faces.*.*, but not com.sun.*.*. JSF is a component in JEE spec.


I'm not sure "who" calls JSF a standard. I have never heard it referred to as a "standard."

Java Server Faces is a technology that consists of a JSP tag library and a set of classes for generating graphical user interfaces. Nothing very "standard" here.

An example of a "standard" would be the set of ASCII character encodings or Standard Generalized Markup Language (ISO 8879).
[ October 26, 2008: Message edited by: James Clark ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30294
    
150

Originally posted by James Clark:
I'm not sure "who" calls JSF a standard. I have never heard it referred to as a "standard."

Sun maybe?

I'd like to point out there are two uses of the word "standard" - both of which are being used in this thread. So I think we might be discussing different things.

1) A standard is a specification that one or more parties formally agree to follow/implement. There may be multiple competing standards for the same technology as in the HD format war. There could also be a standard that nobody implements or doesn't catch on.
2) A standard is a practice or specification that many follow to the point of it being common. Sometimes there is no formal agreement in which case it is called a defacto standard.

With JSF, it meets the threshold for definition #1. (A quick google search show that Glashfish and MyFaces implement it. - along with presumably all other app servers.) I don't think it meets definition #2 in that it's not even the most frequently used framework.

Also, keep in mind that EJB 1.0 was a "standard." And we all see what happened to that. It was rewritten twice before becoming EJB 3.0.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Also, keep in mind that EJB 1.0 was a "standard." And we all see what happened to that. It was rewritten twice before becoming EJB 3.0.


Not sure who called Enterprise Javabeans a "standard" either.

Either way, the EJB technology keeps evolving. This is a good thing. The Java programming language has evolved as well, including many versions with additional features. The current version of EJB is an enhancement of prior versions. Same goes for the Java language. New versions are good things and demonstrate interest and growth.
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
Originally posted by Bear Bibeault:
Indeed, I've seen quite a bit of the opposite. Some companies I am familiar with, having given JSF a try, are reverting to straight-forward JSP and Servlets. My new job, in fact, is to do just that. The existing Web UI is universally loathed (both usability and technology-wise) and it will be completely replaced with something much more usable and implemented using simpler frameworks (though not Struts).


I don't think JSF is as bad as many think. I recently used JSF, Facelets, and Richfaces (with ajax) in a reasonable size project and the users are quite impressed with its overall response times and usability. We built a number of custom components that make future devlopment a breeze and employed a number of aspects to make it respond well like:

-- making use of phase listeners. If you are not careful, some of the database calls can get excuted in more than one phase (as we all know that JSF has 6 phases). We noticed this initially in our app that was not responding well. We noticed each SQL was getting called 3 times in 3 different phases. We fixed this with phase listeners.
-- true pagination (can be applied to any Web framework.)
-- clearing the session data that is no longer required once navigated to a different page (JSFs are high on memory consumption).
-- ajax (Richfaces supports this) to refresh only a portion of the screen (can be applied to any Web framework).
-- adding some configuration parameters recommended by JSF and Richfaces, etc.

I am not saying it perfect, but I can't complain too much. I ahve to agree that some of the other frameworks like Spring-MVC are bit more snappier than JSF. For PDF reporting screens we use Spring-MVC directly. Always build a vertical slice or try it on a pilot project and verify its suitability before using it in any large projects. This is true for any new or existing piece of technology or framework.


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Pankaj Halder
Greenhorn

Joined: Sep 10, 2008
Posts: 25
To build RIC application, is Struts2 better than JSF with RichFaces?

We know Struts2 is completely different from Struts1 in terms of architecture and API.
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
What is RIC? Is it RIA (Rich Internet Application)
Pankaj Halder
Greenhorn

Joined: Sep 10, 2008
Posts: 25
Originally posted by arulk pillai:
What is RIC? Is it RIA (Rich Internet Application)


Rich Internet Client (RIC) Application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is JSF replacing Struts