[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

GUI toolkit which separates UI specification from driving logic

Gavri Fernandez

12/30/2004 3:23:00 PM

Hi,
Is there one for Ruby? Like XUL for Javascript.
wxWidgets and Fox both need the programmer to build the UI using code
instead of markup.

Why aren't there more frameworks/toolkits for Desktop applications
which separate these 2 concerns? I was just looking at the wxRuby
samples and thought that this shouldn't be so hard....

gavri


8 Answers

Curt Hibbs

12/30/2004 3:48:00 PM

0

Gavri Fernandez wrote:
>
> Hi,
> Is there one for Ruby? Like XUL for Javascript.
> wxWidgets and Fox both need the programmer to build the UI using code
> instead of markup.

Not that I know of. But just to keep the record straight, JavaScript has
nothing to do with XUL... at least technically speaking. Its just that the
only implementation of XUL, Mozilla, has only implemented one embedded
scripting language, JavaScript.

For sometime I have wanted to implement Ruby as a first class scripting
language within Mozilla. This would enable the use of Mozilla/XUL as a cross
platform GUI toolkit. But as I look at the things I want to do and the time
I have to do them, I realize this is something I will never get to.

So, every time this topic comes up, I offer to help anyone who wants to take
this on (I have a fair amount of Mozilla experience in a past life). The
offer still stands.

> Why aren't there more frameworks/toolkits for Desktop applications
> which separate these 2 concerns? I was just looking at the wxRuby
> samples and thought that this shouldn't be so hard....

I think you could easily layer something like this one top of FXRuby or
wxRuby -- especially since Ruby is an excellent language for dynamic code
generation.

You might also be interested the GUI concept of "Naked Objects":

http://www.nakedob...

At one point I had created a "Naked Ruby" project on RubyForge to do
something similar in Ruby, but it sat there for over a year and I never got
to it (as higher priority things constantly got in the way). So I recently
had the project deleted from RubyForge.

I think the Naked Objects concept has greater potential that the
XUL/JavaScript concept, and I would certainly be interested in helping
anyone who wanted to take this one on, as well.

Curt



gabriele renzi

12/30/2004 3:57:00 PM

0

Gavri Fernandez ha scritto:
> Hi,
> Is there one for Ruby? Like XUL for Javascript.
> wxWidgets and Fox both need the programmer to build the UI using code
> instead of markup.
>
> Why aren't there more frameworks/toolkits for Desktop applications
> which separate these 2 concerns? I was just looking at the wxRuby
> samples and thought that this shouldn't be so hard....

I think wxwidget has an xml format named XRC for this.
There is also the .UI format from QtDesigner accessible from qtruby and
Glade from the ruby-gnome2 project.

I don't really love this approach, but you have the choice ;)

Raphael Bauduin

12/30/2004 4:20:00 PM

0

Curt Hibbs wrote:
> Gavri Fernandez wrote:
>
>>Hi,
>> Is there one for Ruby? Like XUL for Javascript.
>>wxWidgets and Fox both need the programmer to build the UI using code
>>instead of markup.
>
>
> Not that I know of. But just to keep the record straight, JavaScript has
> nothing to do with XUL... at least technically speaking. Its just that the
> only implementation of XUL, Mozilla, has only implemented one embedded
> scripting language, JavaScript.
>
> For sometime I have wanted to implement Ruby as a first class scriptingwoul
> language within Mozilla. This would enable the use of Mozilla/XUL as a cross
> platform GUI toolkit. But as I look at the things I want to do and the time
> I have to do them, I realize this is something I will never get to.
>
> So, every time this topic comes up, I offer to help anyone who wants to take
> this on (I have a fair amount of Mozilla experience in a past life). The
> offer still stands.
>

Just to mention that I would be interested in ruby in mozilla. I have an extension
for applying a personal CSS to websites based on regexp matching of the URL. I put a lot of logic
in the accompanying website and each visit to a website triggers a request to that server to know
which CSS should be available to apply. This has a big problem: the url is sent to the central server,
so no privacy...... I'd need to set all the logic in the extension, but I never had
the motivation to implement it in javascript.......
So, for those eagerly waiting to start the project, ruby in Mozzilla would have a user from the beginning :-)

Raph



>
>>Why aren't there more frameworks/toolkits for Desktop applications
>>which separate these 2 concerns? I was just looking at the wxRuby
>>samples and thought that this shouldn't be so hard....
>
>
> I think you could easily layer something like this one top of FXRuby or
> wxRuby -- especially since Ruby is an excellent language for dynamic code
> generation.
>
> You might also be interested the GUI concept of "Naked Objects":
>
> http://www.nakedob...
>
> At one point I had created a "Naked Ruby" project on RubyForge to do
> something similar in Ruby, but it sat there for over a year and I never got
> to it (as higher priority things constantly got in the way). So I recently
> had the project deleted from RubyForge.
>
> I think the Naked Objects concept has greater potential that the
> XUL/JavaScript concept, and I would certainly be interested in helping
> anyone who wanted to take this one on, as well.
>
> Curt
>
>
>

Neil Stevens

12/30/2004 4:38:00 PM

0

On Fri, 31 Dec 2004 00:23:22 +0900, Gavri Fernandez wrote:

> Hi,
> Is there one for Ruby? Like XUL for Javascript.
> wxWidgets and Fox both need the programmer to build the UI using code
> instead of markup.

libglade

http://ruby-gnome2.sourc...

--
Neil Stevens - neil@hakubi.us

'A republic, if you can keep it.' -- Benjamin Franklin

Zach Dennis

12/30/2004 5:56:00 PM

0

gabriele renzi wrote:

> I think wxwidget has an xml format named XRC for this.

yes, and wxruby has support for XRC.

Zach


Nick

1/2/2005 7:30:00 PM

0

Gavri Fernandez wrote:
> Hi,
> Is there one for Ruby? Like XUL for Javascript.
> wxWidgets and Fox both need the programmer to build the UI using code
> instead of markup.

To add to the previous wxruby posts, wxruby has support for XRC, which
uses XML to describe the widget layout. You can use Julian Smart's
DialogBlocks (http://www.anthemion.co.uk/dia...) to generate the
XRC file.

Nick



georgesawyer

1/9/2005 2:52:00 AM

0

I saw this on Sourceforge; seems like what you are looking for:

"Thinlet Contrib is a collection of example apps, addons, plugins,
tutorials, FAQs, how-tos and other goodies for the Thinlet XUL (XML UI
Language) toolkit.
Programming Language: Java, JavaScript, Python, Ruby."

http://sourceforge.net/projects/thinle...

"ScriptableThinlet 0.9 (November 30 2004) is a LGPL extension of Thinlet
that allow to define actions in script code inside the thinlet XUL file,
for various script language (beanshell, javascript, groovy, python,
judoscript...)"

http://sjobic.club.fr/thinlet/scriptablethinlet/...

georgesawyer

1/9/2005 3:14:00 AM

0

I saw this on Sourceforge; seems like what you are looking for:

"Thinlet Contrib is a collection of example apps, addons, plugins,
tutorials, FAQs, how-tos and other goodies for the Thinlet XUL (XML UI
Language) toolkit.
Programming Language: Java, JavaScript, Python, Ruby."

http://sourceforge.net/projects/thinle...

"ScriptableThinlet 0.9 (November 30 2004) is a LGPL extension of Thinlet
that allow to define actions in script code inside the thinlet XUL file,
for various script language (beanshell, javascript, groovy, python,
judoscript...)"

http://sjobic.club.fr/thinlet/scriptablethinlet/...