• 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

JSF a general GUI framework?

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the looks of how JSF is structured, it appears that JSF could be used to generate ANY type of interface desired. Is that the intent, that JSF could be used to generate not only HTML user interfaces, but maybe even Swing or some other?
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope the following thread would be helpful for you to have a look about comparison between SWING(Client side) and JSF(Server side)...
https://coderanch.com/t/284397/JSP/java/Questions-JavaServer-Face
 
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:
I hope the following thread would be helpful for you to have a look about comparison between SWING(Client side) and JSF(Server side)...
https://coderanch.com/t/284397/JSP/java/Questions-JavaServer-Face


I don't think that thread answers this question at all. Sounds like a good question for Bill though.
 
James Carman
Ranch Hand
Posts: 580
  • 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 don't think that thread answers this question at all. Sounds like a good question for Bill though.


That's EXACTLY who this post was inteded for! :-) I have played around with JSF a bit (an evening or two) and when taking a step back from the API, it appears that it is meant to be able to "render" any sort of UI. That intrigues me VERY much!
 
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 James Carman:

That's EXACTLY who this post was inteded for! :-) I have played around with JSF a bit (an evening or two) and when taking a step back from the API, it appears that it is meant to be able to "render" any sort of UI. That intrigues me VERY much!


Is it really true that JSF can render SWING-like UI components through the browser?If so, it would be very interesting...
Since u have tried JSF a bit, I have one question about JSF... How do u compare JSF with SWING components, which is based on client side? I cannot imagine how people who are fluent in SWING might not find difficult to deal with JSF much... I heard like this before...
 
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 still a bit confuse of that.
For Swing and Applet, or simply JFC stuffs, they are thick client stuffs. All codes are running in the client side.
For JSF, all stuffs, like JSPs, Servlets and Struts, are server side stuffs. If JSF can generate JFC components, then it just seems that JSF pre-create JFC components, and then ship them to the client for execution.
If so, what is the advantages?? Since both of them are thick clients. One of the advantages I think of is, even the JFC components can be dynamically built! But does this really need?
Nick.
 
Author
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While in theory you could have JSF generate a swing UI there are issues with the FacesServlet and request life cycle management that would have to be addressed by such a solution. I could see a renderer that build an Applet that could communicate back to the server side services (i.e. session beans etc) and JSF would be involved only in serving up the applet and the navigation away from that page but I've not tried it yet.
Nick - JSF is not a thick client, the component model runs on the server.
Hope this helps!
 
James Carman
Ranch Hand
Posts: 580
  • 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:
Hi all,
I am still a bit confuse of that.
For Swing and Applet, or simply JFC stuffs, they are thick client stuffs. All codes are running in the client side.
For JSF, all stuffs, like JSPs, Servlets and Struts, are server side stuffs. If JSF can generate JFC components, then it just seems that JSF pre-create JFC components, and then ship them to the client for execution.
If so, what is the advantages?? Since both of them are thick clients. One of the advantages I think of is, even the JFC components can be dynamically built! But does this really need?
Nick.



What I meant was that a client-side JFC GUI could be built that submits "requests" to a server-side (and, come to think of it, that's not absolutely necessary either) JSF application which would contain the business/application logic. The "response" would build the next "screen" the user would see (perhaps a JFC JPanel with some smart components on it). Therefore, the server-side business/application logic could be reused. The only difference would be in the "rendering" phase. Maybe I'm way off base and that's why I asked the question. But, it appears that the level of abstraction in the API (ExternalContext for example) was deliberate and not necessarily meant to be restricted to servlets/portlets.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic