Gumby vs SwiXML/SwixNG - Comments?
Gerald Bauer <[email protected]> Fri, 18 Feb 2005 15:25:11 -0800 (PST)
| Newsgroups | gmane.comp.lang.xul.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Yanick Duchesne writes in response to the question
"Can you let us know how Gumby differs from
established Swing XML UI language (XUL) frameworks
such as SwiXML or SwixNG?":
1) Gumby makes use of XML namespaces, which allows
cleany separating tags pertaining to Swing vs Gumby
tags vs your own tags: name collision risks are
minimized.
2) Gumby IS Swing - it does not abstract Swing
details:
SwixXML:
<button Text="Click Here" Action="submit"/>
Gumby:
<swing:JButton text="Click here">
<actionListener>
<myTags:submit />
</actionListener>
</swing:JButton>
3) Gumby has built-in support for scripting
In the preceding example, SwiXML tag delegates action
handling to a method called "submit" - invoked through
Java reflection. This implies that your must code your
actions in Java (or at least part of them, since this
is what SwiXML expects).
With Gumby's built-in support for scripting, action
handling code can be scripted, sparing you the tedious
code-compile-test cycles. Thus:
<swing:JButton text="Click here">
<actionListener>
<gumby:Expr>
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
new ActionListener(){
public void actionPerformed(ActionEvent e){
....
}
}
</gumby:Expr>
</actionListener>
</swing>
4) Databinding
Gumby support databinding and MVC in a very clean way.
You can use Gumby's built-in JXPath-based tags to
handle basic form input, or you can implement your own
bindings.
5) Ease of extension
Having a look at the source of Gumby tag
implementations will prove to you how easy it could be
to implement your own tags. Everything is
reflection-based.
Source:
http://www.theserverside.com/news/thread.tss?thread_id=31920
- Gerald
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click