• 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

Questions about JavaServer Face

 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am new to the world of JavaServer Face.
From SUN, I know:


JavaServer Faces is a server-side technology for developing web applications with rich user interfaces. It is a user interface framework for building web applications that run on the server side and render the user interface back to the client.


However, if in such case, what is the difference between JSF and Struts?
I feel both of them try to provide an ease-to-create and manage mechanism for handling Web layout.
Any ideas?
Thanks.
Nick.
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
However, if in such case, what is the difference between JSF and Struts?
I feel both of them try to provide an ease-to-create and manage mechanism for handling Web layout.


No Nick. JSF is purely intended for purely interface to the users, while Struts is some kind of framworks that a web app is built on... I heard that those who are fluent in SWING will find JSF to easy to adapt for them...
I used to develop SWING seriously in the past... I am willing to have a taste of JSF in the future as well... But I'm not that sure about JSF as well... Will it be able to replace HTML traditional interface?
What do u think, Nick?
 
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 used to develop SWING seriously in the past... I am willing to have a taste of JSF in the future as well... But I'm not that sure about JSF as well... Will it be able to replace HTML traditional interface?


But if the server-side stuff, and thus, does this possible?
From your info, seems to me that JSF creates sth like Swing stuffs, and then send to the front end for displaying?
So interesting!
I think it is quite similar to what JSP does, the server side HTML generation, and then send the results to the front end. But Swing components can do the same?
Nick.
 
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
In addition, Struts and JSTL are doing the same thing, rite?
They tries to provide ease-to-create HTML or user interface in server side, like ActionForm, HTML custom Tag lib, so that a greater flexibility is supported.
Persoanlly, I think many technologies are doing the same thing, but just on different focus.
Nick.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
In addition, Struts and JSTL are doing the same thing, rite?


Yeah, they are doing the same thing... I also hope that JSF is working the same like JSP, but JSF might be more things to do with interfaces from server side...


Persoanlly, I think many technologies are doing the same thing, but just on different focus.


Yeah, Nick, I hope so. The new things are developed based on the existing ones with a little changes... But I think JSF will have a big impact on the J2EE world...


I think it is quite similar to what JSP does, the server side HTML generation, and then send the results to the front end. But Swing components can do the same?


No, Nick, SWING is client side like applet... They are window-based components... But I heard that SWING's fade is going down and I do hope Sun to pay attention to the development of SWING as well...
 
Author
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
The main difference between JSF and Struts is the idea of a component. While you could call Struts tag's components they are not true components.
JSF and Struts will compete for mind share. They do the same things. Allow you to specify an HTML user interface that is connected to server side 'stuff' that does all the real business processing.
The very early releases of JSF did not have a real navigation model and in that early stage JSF needed Struts or something like it, to be able to manage the navigation from page to page. With the EA4 release (the one just before the beta that is currently available) we got a full featured and robust navigation model. Now JSF can be seen and thought of as a full replacement for Struts.
However JSF is more than Struts. Since JSF is built on components you have a much richer server side programming model.
Hope this helps.
 
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 heard that those who are fluent in SWING will find JSF to easy to adapt for them...
I don't find anything about JSF, from what I have seen so far, that is similar to Swing in terms of building a UI. The only thing they might have in common is the MVC pattern that both JSF and Swing rely on. Basically, Listeners and Actions.
I think a lot of people are making this comparison ignorantly. Either that or I have no idea what I am talking about. I guess you can take your pick.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • 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 a lot of people are making this comparison ignorantly.


Yes, Gregg, I just heard like that... Actually I have never tried JSF at all... As you said, in the context of listeners and actions, they two are in common...
I am also wondering how JSF can generate Client side component to the user, who are using browsers to view the web pages... Or is it like applets? Is there any website using JSF to taste so that we can figure what actually it is...
 
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

Originally posted by Ko Ko Naing:

Yes, Gregg, I just heard like that... Actually I have never tried JSF at all... As you said, in the context of listeners and actions, they two are in common...
I am also wondering how JSF can generate Client side component to the user, who are using browsers to view the web pages... Or is it like applets? Is there any website using JSF to taste so that we can figure what actually it is...


If you have used Struts, JSF will be very similar. It uses Custom Tags to generate the HTML for Web UI Components. Below is a sample of how to render an HTML input type="text" using JSF
 
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
Hi Gregg,
The code provides seems also similar to JSTL, which tries to display HTML codes using standardize custom tag model.
I am still confuse about those JSTL, JSF and Struts.
In fact, does all those stuffs are supplementary to each other?
Nick.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic