When we look into the architecture of JSF, it seems it has adapted a lot of goodies of the Struts framework. Being a specification and a standard, will JSF replace Struts eventually? What will be the future of Struts?
I think JSF is a framework that works with the client's component interfaces. I quote the introduction statement from Hans:
JavaServer Faces (JSF) simplifies development of sophisticated web application user interfaces, primarily by defining a user interface component model tied to a well-defined request processing lifecycle.
More specifically, JSF is a specification with implementations offered by multiple vendors. It defines a set of user interface (UI) components�basically, a one-to-one mapping to the HTML form element set plus a few extras�that can be used right out of the box, as well as an Application Programming Interface (API) for extending the standard components or developing brand new components.
I do feel that JSF is component oriented framework, while Struts focus on the MVC model, although Struts also works with validation of client's input, etc, and the idea of them are similar. But Struts has a less focus on how to handle the client UI specifically.
Nick, you are right. But from whatever I have learnt JSF also seems to be an MVC based Framwork.
These words from DeveloperWorks are more confusing... Some may think that JSF and Struts are competing technologies, because both are UI frameworks based on MVC. However, an integration library will soon be available to connect JSF and Struts seamlessly. Using this library, you'll be able to use JSF components in your Web user interface along with Struts controller, actions, and business logic. JSF has some advantages over Struts. For one thing, JSF provides several mechanisms to render an individual component; in Struts, however, there is only one way to do this. JSF also provides a clear separation of roles involved in Web application development.
This kind of discussion has been happening for a few decades until now... I don't know why? Isn't there any clear description what really JSF is and what really Struts?
Whenever there is a book promotion in this forum, whether it is about Struts book or JSF book, this kind of discussion always happened... And I hope it will never end even until JSF is widely used in the industry....
Well, I believe and I have already done searching this kind of discussion about the difference btw JSF and Struts, whether they are compilmentary or subtitutable, in the forum searching utility... I found a lot of threads about it... And I have also participated in several book promotion about it, even though I didn't win...
In my experience, I found out the discussion or argument got settled when Gregg Bolinger came in and explained in details about JSF and Struts... I believe he has also learnt about them in details from the authors coming here in the ranch... And I also found that Gregg's article about JSF in one of the JavaRanch Journal is really great in order to learn about JSF and Struts...
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
I think the MVC pattern appears in JSF maybe the by product. As JSF is intentionally to provide a framework for client side components, but then, it noticed that JSF can also adopt Struts or MVC patterns, and the *overlapping* comes out.
Originally posted by Ko Ko Naing: This kind of discussion has been happening for a few decades until now... I don't know why? Isn't there any clear description what really JSF is and what really Struts?
i agree. We might imagine all mysterious things abt JSF until it is really out in to the field.
I should have searched this forum before asking this question. I apologize for it.
I was just afraid what would happen to our investments on Struts (I mean the training of ppl). We have just standardized Struts for all our web applications and now JSF is showing up its head in the form of Sun's reference implementation.
As Mr. Dudney said before, JSF and Struts are NOT competitive, instead they are supplementary to each other, thus, I think JSF will not take over Struts even it is a recommended reference by SUN.
In addition, each technology will be replaced by others somedays later, and thus, we cant avoid. But, as JSF is now as mature as Struts, even JSF has the potential to replace Struts, it may take several years to do so.
Thus, dont worried that the investment on Struts will be wasted.