This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes JSF a general GUI framework? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSF a general GUI framework?" Watch "JSF a general GUI framework?" New topic
Author

JSF a general GUI framework?

James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
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?


James Carman, President<br />Carman Consulting, Inc.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I hope the following thread would be helpful for you to have a look about comparison between SWING(Client side) and JSF(Server side)...
http://www.coderanch.com/t/284397/JSP/java/Questions-JavaServer-Face


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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)...
http://www.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.


GenRocket - Experts at Building Test Data
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
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

Joined: Jun 08, 2002
Posts: 3178
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...
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
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.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
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!


TTFN,<br /> <br />-bd-<br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/0471449156/qid=1064343733/sr=2-1/ref=sr_2_1/002-8375300-3666449" target="_blank" rel="nofollow">Jakarta Pitfalls</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471146153/qid=1064343733/sr=1-2/ref=sr_1_2/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">J2EE AntiPatterns</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471462071/qid=1064343733/sr=1-3/ref=sr_1_3/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">Mastering JavaServer Faces</a> | <a href="http://bill.dudney.net/roller/page/bill" target="_blank" rel="nofollow">Blog</a> | <a href="http://www.jroller.com/page/BillDudney" target="_blank" rel="nofollow">Eclipse Blog</a> | <a href="http://www.sourcebeat.com/TitleAction.do?id=2" target="_blank" rel="nofollow">Eclipse 3 Live</a>
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF a general GUI framework?
 
Similar Threads
How to generate calender
How to include an applet in JSF
Seam and WAI?
Swing & JSF
JSF and JSP