You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by James Strachan <ja...@yahoo.co.uk> on 2002/12/18 18:45:47 UTC

[jelly] JellySWT library available

I've just committed an initial JellySWT implementation which is similar to
JellySwing, using XML to build rich user interfaces, but uses SWT as the
underlying UI technology. There's not much in the way of examples or
documentation as of yet, what there is is here...

http://jakarta.apache.org/commons/sandbox/jelly/jellyswt.html

There's an example script here

http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/jelly/src/test/org
/apache/commons/jelly/swt/example.jelly?rev=HEAD


So far I've gotta say, I'm very impressed with SWT. The folks at OTI and IBM
seem to have done a great job. From never using SWT before to completing the
above code took me about 3-4 hours; which considering I've just about
grokked how to create most SWT widgets and make reasonable layouts, I find
pretty impressive.

SWT seems much simpler & more straightforward than Swing. Its so cool for
the Layouts to actually work and not suck! The JellySWT implementation is
also much smaller & simple than the JellySwing implementation.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] JellySWT library available

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "James Strachan" <ja...@yahoo.co.uk>
> From: "Neeme Praks" <ne...@apache.org>
> > Hi James!
> >
> > Is there any plan of making JellySwing and JellySWT to support XUL style
> > markup? So XUL would be used to describe the UI and switching between
> > XUL implementations would be easier...?
>
> Its always been an area I'd like to explore; using XUL to describe rich
user
> interfaces, which can then either be rendered natively in Mozilla or some
> other XUL implementation or transformed (say via XSLT) into HTML/DHTML or
> rendered with Swing or SWT.
>
[snip]
>
> The biggest issue I can see right now with either of these approaches is
how
> do we specify the models across rendering technologies. I wonder if
JSFaces
> will help in this area one day?).
>
> XUL when used in Mozilla uses RDF for all the models. I've gotta say I'm
not
> much of an RDF fan; if anything I'd prefer XML with XPath, its much easier
> to grok, use and its way more popular too. For Java developers it might be
> easier to use something like Action, ListModel, TableModel and TreeModel
> from Swing rather than to convert everything into RDF.


FWIW right now in JellySwing there's a reusable TableModel that uses Jexl
expressions (though it could easily use other expression/scripting languages
too) to extract rows of data and fields in a row. This allows a TableModel
to be easily created from any bean model (using arrays, collections,
iterators, indexed properties etc) to navigate the rows and then use
arbitrary expressions to extract values from each bean/map/DynaBean row.
Similar approaches are used in JSTL, Struts and Velocity in the web worlds.

So maybe we just need some general way to define the binding of the model
(business objects, beans etc) to the view model via expressions? Though
sharing UI model implementations across rendering technologies will help
promote reuse. So far the Swing UI models seem the best I've seen so far.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] JellySWT library available

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Neeme Praks" <ne...@apache.org>
> Hi James!
>
> Is there any plan of making JellySwing and JellySWT to support XUL style
> markup? So XUL would be used to describe the UI and switching between
> XUL implementations would be easier...?
>
> Or are there some serious issues with this idea?

Its always been an area I'd like to explore; using XUL to describe rich user
interfaces, which can then either be rendered natively in Mozilla or some
other XUL implementation or transformed (say via XSLT) into HTML/DHTML or
rendered with Swing or SWT.

One idea could be to create an XSLT stylesheet to convert XUL into
JellySwing and another XSLT to convert XUL into JellySWT. Then you could
render a XUL script using Swing or SWT while keeping full access to the
underlying Swing and SWT widgets to perform any special tweaks. This
actually could be the most flexible as folks could then use XSLT includes to
overload transformations to provide special renderings.

Another approach could be that 2 XUL Jelly libraries could be developed, one
using Swing and another using SWT (and maybe another just generating
HTML/DHTML).

The biggest issue I can see right now with either of these approaches is how
do we specify the models across rendering technologies. I wonder if JSFaces
will help in this area one day?).

XUL when used in Mozilla uses RDF for all the models. I've gotta say I'm not
much of an RDF fan; if anything I'd prefer XML with XPath, its much easier
to grok, use and its way more popular too. For Java developers it might be
easier to use something like Action, ListModel, TableModel and TreeModel
from Swing rather than to convert everything into RDF.

I don't have the bandwidth right now to explore these ideas but would
happily help anyone else who fancies experimenting with this?

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] JellySWT library available

Posted by Neeme Praks <ne...@apache.org>.
Hi James!

Is there any plan of making JellySwing and JellySWT to support XUL style 
markup? So XUL would be used to describe the UI and switching between 
XUL implementations would be easier...?

Or are there some serious issues with this idea?

Rgds,
Neeme

James Strachan ::
> I've just committed an initial JellySWT implementation which is similar to
> JellySwing, using XML to build rich user interfaces, but uses SWT as the
> underlying UI technology. There's not much in the way of examples or
> documentation as of yet, what there is is here...
> 
> http://jakarta.apache.org/commons/sandbox/jelly/jellyswt.html
> 
> There's an example script here
> 
> http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/jelly/src/test/org
> /apache/commons/jelly/swt/example.jelly?rev=HEAD
> 
> 
> So far I've gotta say, I'm very impressed with SWT. The folks at OTI and IBM
> seem to have done a great job. From never using SWT before to completing the
> above code took me about 3-4 hours; which considering I've just about
> grokked how to create most SWT widgets and make reasonable layouts, I find
> pretty impressive.
> 
> SWT seems much simpler & more straightforward than Swing. Its so cool for
> the Layouts to actually work and not suck! The JellySWT implementation is
> also much smaller & simple than the JellySwing implementation.
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>