You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Reza B'Far <re...@voicegenesis.com> on 2005/04/06 17:52:34 UTC

JSF to JFC

Folks:

Does anyone know if there is any project anywhere that allows for rendering
of JSF to JFC?  I'm looking for a presentation layer that can be rendered
both as a thin and a thick client...not talking about XForms and XUL, rather
a framework that actually does the work of rendering to JFC widgets and HTML
widgets (both).

R




Re: JSF to JFC

Posted by Heath Borders <he...@gmail.com>.
Well, my suggestion would be largely theoretical and probably a bit of a 
hack, but basically, you'd have to have your build your own renderkit. 
Rather than having that renderkit render a String of HTML, it would have to 
render a JComponent.

That would be the basic concept, but obviously there are a lot more details 
to work out than that, as well as a little bit of hacking to build a 
Swing-viewer for this new client app.
 The difference would be rather than parsing HTML, it would read in a 
Serialized Swing JComponent tree which you would then render on the client.
 This might not even be feasible like that.

 On Apr 6, 2005 1:50 PM, reza@voicegenesis.com <re...@voicegenesis.com> 
wrote: 
> 
> Hi Heath:
> 
> Thanks for the response. I think the overwhelming reason to have such a
> functionality is to be able to write one application that, given a local
> web server, can be both a thin and a thick client. Local web application
> can do data replication/synchronization with remote hosts.
> 
> For many rich clients that require lots of data entry, etc. AJAX is not
> acceptable because of transactional integrity and server round trips are
> not acceptable because of usability issues. The ideal would be if I can
> write my JSF app one time and then have a resulting Web Start application
> as well as a thin client (XHTML, HTML, etc., currently supported by 
> MyJSF).
> A great proposition would be: "here, give me X amount of dollars to build
> the app and you'll have both thin and thick if we do it with JSF"...
> 
> I'd like to hear what you'd suggest in the way of a solution 
> implementation.
> 
> R
> 
> >-- Original Message --
> >Reply-To: "MyFaces Discussion" <my...@incubator.apache.org>
> >Date: Wed, 6 Apr 2005 12:15:29 -0500
> >From: Heath Borders <he...@gmail.com>
> >Reply-To: hborders@mail.win.org
> >To: MyFaces Discussion <my...@incubator.apache.org>,
> > reza@voicegenesis.com
> >Subject: Re: JSF to JFC
> >
> >
> >There's really no reason that it couldn't, however, it would require a
> good
> >
> >deal of hacking the ResponseWriter, etc. It is theoretically possible,
> but
> >
> >I'm not sure a lot of people need this functionality.
> >
> >On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> wrote:
> >
> >>
> >> Folks:
> >>
> >> Does anyone know if there is any project anywhere that allows for
> >> rendering
> >> of JSF to JFC? I'm looking for a presentation layer that can be 
> rendered
> >> both as a thin and a thick client...not talking about XForms and XUL,
> 
> >> rather
> >> a framework that actually does the work of rendering to JFC widgets and
> >
> >> HTML
> >> widgets (both).
> >>
> >> R
> >>
> >>
> >
> >
> >--
> >-Heath Borders-Wing
> >hborders@mail.win.org
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: JSF to JFC

Posted by re...@voicegenesis.com.
Hi Heath:

Thanks for the response.  I think the overwhelming reason to have such a
functionality is to be able to write one application that, given a local
web server, can be both a thin and a thick client.  Local web application
can do data replication/synchronization with remote hosts.

For many rich clients that require lots of data entry, etc.  AJAX is not
acceptable because of transactional integrity and server round trips are
not acceptable because of usability issues.  The ideal would be if I can
write my JSF app one time and then have a resulting Web Start application
as well as a thin client (XHTML, HTML, etc., currently supported by MyJSF).
 A great proposition would be: "here, give me X amount of dollars to build
the app and you'll have both thin and thick if we do it with JSF"... 

I'd like to hear what you'd suggest in the way of a solution implementation.

R

>-- Original Message --
>Reply-To: "MyFaces Discussion" <my...@incubator.apache.org>
>Date: Wed, 6 Apr 2005 12:15:29 -0500
>From: Heath Borders <he...@gmail.com>
>Reply-To: hborders@mail.win.org
>To: MyFaces Discussion <my...@incubator.apache.org>,
>        reza@voicegenesis.com
>Subject: Re: JSF to JFC
>
>
>There's really no reason that it couldn't, however, it would require a
good
>
>deal of hacking the ResponseWriter, etc. It is theoretically possible,
but
>
>I'm not sure a lot of people need this functionality.
>
>On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> wrote:
>
>> 
>> Folks:
>> 
>> Does anyone know if there is any project anywhere that allows for 
>> rendering
>> of JSF to JFC? I'm looking for a presentation layer that can be rendered
>> both as a thin and a thick client...not talking about XForms and XUL,

>> rather
>> a framework that actually does the work of rendering to JFC widgets and
>
>> HTML
>> widgets (both).
>> 
>> R
>> 
>> 
>
>
>-- 
>-Heath Borders-Wing
>hborders@mail.win.org



Re: JSF to JFC

Posted by Heath Borders <he...@gmail.com>.
There's really no reason that it couldn't, however, it would require a good 
deal of hacking the ResponseWriter, etc. It is theoretically possible, but 
I'm not sure a lot of people need this functionality.

On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> wrote: 
> 
> Folks:
> 
> Does anyone know if there is any project anywhere that allows for 
> rendering
> of JSF to JFC? I'm looking for a presentation layer that can be rendered
> both as a thin and a thick client...not talking about XForms and XUL, 
> rather
> a framework that actually does the work of rendering to JFC widgets and 
> HTML
> widgets (both).
> 
> R
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: JSF to JFC

Posted by Heath Borders <he...@gmail.com>.
That's ok. Its really an interesting idea, I'm just not much of a Swing 
developer anymore.

On Apr 6, 2005 6:36 PM, reza@voicegenesis.com <re...@voicegenesis.com> wrote: 
> 
> Thanks Heath... Sorry, I didn't mean to slam you with a bunch of emails...
> I'm sure you're plenty busy. This just seems like such a common problem
> and I can't believe that no one has solved it yet!
> 
> Thanks again.
> Reza
> >-- Original Message --
> >Reply-To: "MyFaces Discussion" <my...@incubator.apache.org>
> >Date: Wed, 6 Apr 2005 18:30:08 -0500
> >From: Heath Borders <he...@gmail.com>
> >Reply-To: hborders@mail.win.org
> >To: MyFaces Discussion <my...@incubator.apache.org>
> >Subject: Re: JSF to JFC
> >
> >
> >I don't really know anything about Tapestry, so I'm afraid I can't help
> you
> >
> >out there.
> >
> >On Apr 6, 2005 6:28 PM, reza@voicegenesis.com <re...@voicegenesis.com> 
> wrote:
> >
> >>
> >> Yeah, but it's not clear to me how I can create one presentation layer
> >and
> >> render to both thick and thin clients. Would you care to elaborate on
> how
> >> you think Tapestry/JSF combo may solve this problem?
> >>
> >> Reza
> >> >-- Original Message --
> >> >Date: Wed, 6 Apr 2005 16:13:31 -0700
> >> >From: Michael McGrady <mi...@gmail.com>
> >> >Reply-To: Michael McGrady <mi...@gmail.com>
> >> >To: MyFaces Discussion <my...@incubator.apache.org>,
> >> > reza@voicegenesis.com
> >> >Subject: Re: JSF to JFC
> >> >
> >> >
> >> >Have you checked out Tapestry?
> >> >
> >> >On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> 
> wrote:
> >> >> Folks:
> >> >>
> >> >> Does anyone know if there is any project anywhere that allows for
> 
> >> rendering
> >> >> of JSF to JFC? I'm looking for a presentation layer that can be
> >> rendered
> >> >> both as a thin and a thick client...not talking about XForms and 
> XUL,
> >> rather
> >> >> a framework that actually does the work of rendering to JFC widgets
> >and
> >> >HTML
> >> >> widgets (both).
> >> >>
> >> >> R
> >> >>
> >> >>
> >>
> >>
> >
> >
> >--
> >-Heath Borders-Wing
> >hborders@mail.win.org
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: JSF to JFC

Posted by Heath Borders <he...@gmail.com>.
I don't really know anything about Tapestry, so I'm afraid I can't help you 
out there.

On Apr 6, 2005 6:28 PM, reza@voicegenesis.com <re...@voicegenesis.com> wrote: 
> 
> Yeah, but it's not clear to me how I can create one presentation layer and
> render to both thick and thin clients. Would you care to elaborate on how
> you think Tapestry/JSF combo may solve this problem?
> 
> Reza
> >-- Original Message --
> >Date: Wed, 6 Apr 2005 16:13:31 -0700
> >From: Michael McGrady <mi...@gmail.com>
> >Reply-To: Michael McGrady <mi...@gmail.com>
> >To: MyFaces Discussion <my...@incubator.apache.org>,
> > reza@voicegenesis.com
> >Subject: Re: JSF to JFC
> >
> >
> >Have you checked out Tapestry?
> >
> >On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> wrote:
> >> Folks:
> >>
> >> Does anyone know if there is any project anywhere that allows for 
> rendering
> >> of JSF to JFC? I'm looking for a presentation layer that can be 
> rendered
> >> both as a thin and a thick client...not talking about XForms and XUL,
> rather
> >> a framework that actually does the work of rendering to JFC widgets and
> >HTML
> >> widgets (both).
> >>
> >> R
> >>
> >>
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

RE: JSF to JFC

Posted by Reza B'Far <re...@voicegenesis.com>.
Hi Stefan:

I believe there is one feasible way to do this with JSF:

To write an XForms set of components.  If you render to XForms instead of
XHTML, etc., XForms can be used as the "intermediate" language.  XForms is
generic enough that rendering a thin-client or thick client from it is
reasonable (I've done this part before).  What I like about JSF (and MyJSF
in particular) is the elegant approach to producing the output markup
language.  The only difference would be that we'd need to figure out how to
transform the event model as well as the presentation because the nature of
events (navigation, etc.) in a thick client is quite different than a thin
client.  There is something called XForms Events so that would probably
work.

"How" to do this is fairly obvious to me.  The problem is that it's a fairly
big job and that, as you have mentioned, building it from scratch for any
one project is out of the question... however, it would make a great open
source project.

Reza

-----Original Message-----
From: Stefan Langer [mailto:myfaces@bettsockentraeger.de]
Sent: Thursday, April 07, 2005 1:17 AM
To: MyFaces Discussion
Subject: Re: JSF to JFC


Hello,

I tried something like that a while ago (pre JSF), but we stopped doing
it. Problem back then was we needed to setup our own layout and widget
language (used a custom xml dialect) which resultet in a lot of parsing
of xml and we had to develope most components from scratch. IMHO you
have to get away from your jsp pages or else you need to parse your html
and transform it into a layout for your swing app. Anything else will
produce a gui you won't be happy with. (And this is just one of many
problems)
BTW we stopped the whole thing because it would have cost us too much
time. It's easier to provide the two different presentation layers and
use same backend logic.
If you find a feasable solution be sure to report it as I'm interested
on how they solved the problems we encountered.

Regards
Stefan




Re: JSF to JFC

Posted by Stefan Langer <my...@bettsockentraeger.de>.
Hello,

I tried something like that a while ago (pre JSF), but we stopped doing 
it. Problem back then was we needed to setup our own layout and widget 
language (used a custom xml dialect) which resultet in a lot of parsing 
of xml and we had to develope most components from scratch. IMHO you 
have to get away from your jsp pages or else you need to parse your html 
and transform it into a layout for your swing app. Anything else will 
produce a gui you won't be happy with. (And this is just one of many 
problems)
BTW we stopped the whole thing because it would have cost us too much 
time. It's easier to provide the two different presentation layers and 
use same backend logic.
If you find a feasable solution be sure to report it as I'm interested 
on how they solved the problems we encountered.

Regards
Stefan


Re: JSF to JFC

Posted by re...@voicegenesis.com.
Yeah, but it's not clear to me how I can create one presentation layer and
render to both thick and thin clients.  Would you care to elaborate on how
you think Tapestry/JSF combo may solve this problem?

Reza
>-- Original Message --
>Date: Wed, 6 Apr 2005 16:13:31 -0700
>From: Michael McGrady <mi...@gmail.com>
>Reply-To: Michael McGrady <mi...@gmail.com>
>To: MyFaces Discussion <my...@incubator.apache.org>,
>        reza@voicegenesis.com
>Subject: Re: JSF to JFC
>
>
>Have you checked out Tapestry?
>
>On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> wrote:
>> Folks:
>> 
>> Does anyone know if there is any project anywhere that allows for rendering
>> of JSF to JFC?  I'm looking for a presentation layer that can be rendered
>> both as a thin and a thick client...not talking about XForms and XUL,
rather
>> a framework that actually does the work of rendering to JFC widgets and
>HTML
>> widgets (both).
>> 
>> R
>> 
>>



Re: JSF to JFC

Posted by Michael McGrady <mi...@gmail.com>.
Have you checked out Tapestry?

On 06 Apr 2005 08:52:34 -0700, Reza B'Far <re...@voicegenesis.com> wrote:
> Folks:
> 
> Does anyone know if there is any project anywhere that allows for rendering
> of JSF to JFC?  I'm looking for a presentation layer that can be rendered
> both as a thin and a thick client...not talking about XForms and XUL, rather
> a framework that actually does the work of rendering to JFC widgets and HTML
> widgets (both).
> 
> R
> 
>