• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JSF Vs Struts

 
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

-Sudharsan
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can read Lasse's post here
https://coderanch.com/t/48183/Struts/Struts-autor
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Nick
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what the Struts project itself is saying about its relation to JavaServer Faces.
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Nick
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Pal!

Sudharsan
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic