Ruby for XUL would be super! XUL(or any declarative
xml for widgets) is a good choice for new interfaces,
especially for browser apps. The bigs have similar
things in the pipeline - Macromedia Flex and MS XAML.
So, getting on the bleeding edge of this seems shrewd.
On the other hand, using js for this has never struck
me as needing to be rubied.
:Paul
You were seeking help programming…you dont want me
involved, trust me = Dummy.new
On Wed, 17 Mar 2004 18:04:02 -0800, Sean Russell > wrote:
[snip]
One idea that’s been flitting about my head has
been that Mozilla is a
XUL engine, making it a full-fledged GUI toolkit
in itself. If Ruby
code were executable within Mozilla, we’d
instantly have a GUI toolkit
that ranks up among the top two or three
ubiquitous cross-platform
toolkits in the world.
I love XUL… because its declared via xml, I think
it should be lot
easier to do UI-testing.
Well, ruby-gnome2 allows you to use glade xml files, and
qtruby/Korundum should allow you to use QTDEsigner’s .ui files that
are, again, xml files.
Having ruby support in mozilla would be cool, anyway.
···
il Thu, 18 Mar 2004 23:01:53 +0900, paul vudmaska paul@vudmaska.com ha scritto::
XUL(or any declarative
xml for widgets) is a good choice for new interfaces,
especially for browser apps. The bigs have similar
things in the pipeline - Macromedia Flex and MS XAML.
So, getting on the bleeding edge of this seems shrewd.
On the other hand, using js for this has never struck
me as needing to be rubied.
Javascript scales really poorly, so restricting the application code
to Javascript means that XUL will always be marginalized. Ruby scales
much, much better, so having a Ruby interpreter replacement for
Javascript would benefit Mozilla nearly as much as being able to write
GUIs in XUL would benefit Ruby.
That said, Python would be a good alternative, but I’d (selfishly)
much rather see Ruby take this role.
On the other hand, using js for this has never struck
me as needing to be rubied.
Javascript scales really poorly, so restricting the application code
to Javascript means that XUL will always be marginalized. Ruby scales
much, much better, so having a Ruby interpreter replacement for
Javascript would benefit Mozilla nearly as much as being able to write
GUIs in XUL would benefit Ruby.
Also, I could be wrong as I haven’t had to deal much with JS, but doesn’t
JS hide the guns&knives meaning that it doesn’t let you do certain things
like copy files around, etc.?
For example, I don’t think you could (using JS) get a file from a
particular website and then copy it to some specific directory on your
machine, for example. (but I could be wrong)
That said, Python would be a good alternative, but I’d (selfishly)
much rather see Ruby take this role.
Will Ruby really have that much benefit over Javascript? I don’t know
of any performance benchmarks for Mozilla’s Javascript implementation,
but any of the pieces of Mozilla that are too slow end up rewritten in
C++.
How much more of an app could be written in Ruby compared to Javascript,
before you lose the speed necessary?
Additionally, since much of the lower levels of Mozilla are already
written in C++, will Ruby give that much gain?
PS: After writing several extensions for Mozilla using Javascript and
XUL, I find Javascript’s prototype-OO model rather pleasant to work
with. But writing XUL/Ruby apps would still be much, much cooler
On the other hand, using js for this has never struck
me as needing to be rubied.
Javascript scales really poorly, so restricting the application code
to Javascript means that XUL will always be marginalized. Ruby scales
much, much better, so having a Ruby interpreter replacement for
Javascript would benefit Mozilla nearly as much as being able to write
GUIs in XUL would benefit Ruby.
Also, I could be wrong as I haven’t had to deal much with JS, but doesn’t
JS hide the guns&knives meaning that it doesn’t let you do certain things
like copy files around, etc.?
This is what Mozilla’s XPCOM allows. Naturally, access to the XPCOM
layer is only allowed from within the browser chrome, signed scripts, or
on reciept of special permission from the user.
For example, I don’t think you could (using JS) get a file from a
particular website and then copy it to some specific directory on your
machine, for example. (but I could be wrong)
http://jslib.mozdev.org for local FS access and XmlHTTPRequest for
fetching a file off the web will do the trick.
Also, I could be wrong as I haven’t had to deal much with JS, but
doesn’t=
=20
JS hide the guns&knives meaning that it doesn’t let you do certain
things=
=20
like copy files around, etc.?
This is what Mozilla’s XPCOM allows. Naturally, access to the XPCOM
layer is only allowed from within the browser chrome, signed scripts, or
on reciept of special permission from the user.
For example, I don’t think you could (using JS) get a file from a=20
particular website and then copy it to some specific directory on
your=20
machine, for example. (but I could be wrong) =20
http://jslib.mozdev.org for local FS access and XmlHTTPRequest for
fetching a file off the web will do the trick.
So since there is already a Ruby/XPCOM interface
(http://rbxpcom.mozdev.org/) the part we are missing is Ruby/XUL?
Also, I could be wrong as I haven’t had to deal much with JS, but
doesn’t JS hide the guns&knives meaning that it doesn’t let you do
certain things like copy files around, etc.?
This is what Mozilla’s XPCOM allows. Naturally, access to the XPCOM
layer is only allowed from within the browser chrome, signed scripts, or
on reciept of special permission from the user.
For example, I don’t think you could (using JS) get a file from a
particular website and then copy it to some specific directory on
your machine, for example. (but I could be wrong)
http://jslib.mozdev.org for local FS access and XmlHTTPRequest for
fetching a file off the web will do the trick.
So since there is already a Ruby/XPCOM interface
(http://rbxpcom.mozdev.org/) the part we are missing is Ruby/XUL?
So since there is already a Ruby/XPCOM interface
(http://rbxpcom.mozdev.org/) the part we are missing is Ruby/XUL?
I’m not up to speed with Ruby/XPCOM, but isn’t it a one-way binding
from Ruby->Mozilla? A more interesting (and easy to use) mechanism
would be if Mozilla understood
So since there is already a Ruby/XPCOM interface
(http://rbxpcom.mozdev.org/) the part we are missing is Ruby/XUL?
I’m not up to speed with Ruby/XPCOM, but isn’t it a one-way binding
from Ruby->Mozilla? A more interesting (and easy to use) mechanism
would be if Mozilla understood
I’m not up to speed with Ruby/XPCOM either, but I’ve done a lot of
Mozilla-based work, and its obvious that you are correct. This package let’s
you create and use XPCOM objects using Ruby as your implementation language.
While that is useful, it would be way more useful (as you suggested) to be
able to use Ruby as a scripting language that can be invoked from the XUL
user interface.
If only I had the time, I’d love to do it. But (as I’m sure with most of us)
I am already over committed. If anyone else out there in ruby-land wants to
do this, I would at least be willing participate at the level of offering
support and advice from the knowledge I gain through my past Mozilla work.
Curt
···
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.610 / Virus Database: 390 - Release Date: 3/3/2004
So since there is already a Ruby/XPCOM interface
(http://rbxpcom.mozdev.org/) the part we are missing is Ruby/XUL?
I’m not up to speed with Ruby/XPCOM, but isn’t it a one-way binding
from Ruby->Mozilla? A more interesting (and easy to use) mechanism
would be if Mozilla understood
Oh, certainly that would be cool. Not sure how to acheive that, though.
Somehow you’ve got to embed Ruby in Mozilla.
It looks like rbxpcom might actually work for my needs, but I’m thinking
it would have to be updated to work with ruby 1.8.1
BTW: Here’s an interesting article about generating XUL with Python. I
suspect it wouldn’t be too difficult to come up with a similar Ruby module
for doing this.
It looks like rbxpcom might actually work for my needs, but I’m thinking
it would have to be updated to work with ruby 1.8.1
With rbxpcom you can create new services (as xpcom objects) that can be
called from JavaScript code that is bound to the an XUL user interface. You
can also invoke any other XPCOM service, which means that you can (for
instance) cause XUL windows to be displayed.
But what you can’t do is use Ruby as the scripting language that gets
invoked when the user interacts with the XUL windows that are displayed. I’m
not sure what your needs are, but for me this is a very important missing
piece. Without it I would have to code in a mixture of Ruby and JavaScript
instead of all Ruby.
BTW: Here’s an interesting article about generating XUL with Python. I
suspect it wouldn’t be too difficult to come up with a similar
Ruby module
for doing this.