Is Ruby good at GUI develop?

I want to choose a script to develop a GUI program. I want to know more
about Ruby on GUI development, including its performance, function
capability, etc. Does anyone give me a brief introduction on this?

···

--
Posted via http://www.ruby-forum.com/.

Zhao Yi wrote:

I want to choose a script to develop a GUI program. I want to know more
about Ruby on GUI development, including its performance, function
capability, etc. Does anyone give me a brief introduction on this?

There are assorted C-based options for GUI toolkits (Tk, Fox, wx, GTK, Qt, etc.). These can be used with the C implementation of Ruby (the one people think of when then think of Ruby).

You also have Java-based options; Swing in particular, which you can use with JRuby.

You have to consider what's important: libraries, available widgets, documentation, vendor support, layout managers, available WYSIWYG UI editors, packaging and deployment, if end-users will need to install or compile something, is it cross-platform, can you create your own widgets, can you customize existing widgets, and so on.

I help develop a library called Monkeybars, which aims to make building cross-platform desktop apps as simple and intuitive as the better Ruby Web frameworks do for Web apps. Monkeybars uses JRuby + Swing, and I encourage you to give it a whirl. It rocks. But I'm biased.

http://www.monkeybars.org

···

--
James Britt

www.happycamperstudios.com - Wicked Cool Coding
www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

It won't work for linux users, but I am interested in macruby--an ruby/
Obj-C combination. That should allow ruby users to use ruby style with
Apple's extensive GUI object library. That will be nice. It is
unlikely any of the current GUI programming systems out now will be
able to compete with it (on the mac platform).
Tim

···

On Sep 5, 6:20 pm, Zhao Yi <youhaod...@gmail.com> wrote:

I want to choose a script to develop a GUI program. I want to know more
about Ruby on GUI development, including its performance, function
capability, etc. Does anyone give me a brief introduction on this?
--
Posted viahttp://www.ruby-forum.com/.

James Britt wrote:

Zhao Yi wrote:

I want to choose a script to develop a GUI program. I want to know more
about Ruby on GUI development, including its performance, function
capability, etc. Does anyone give me a brief introduction on this?

There are assorted C-based options for GUI toolkits (Tk, Fox, wx, GTK,
Qt, etc.). These can be used with the C implementation of Ruby (the one
people think of when then think of Ruby).

You also have Java-based options; Swing in particular, which you can use
with JRuby.

You have to consider what's important: libraries, available widgets,
documentation, vendor support, layout managers, available WYSIWYG UI
editors, packaging and deployment, if end-users will need to install or
compile something, is it cross-platform, can you create your own
widgets, can you customize existing widgets, and so on.

I help develop a library called Monkeybars, which aims to make building
cross-platform desktop apps as simple and intuitive as the better Ruby
Web frameworks do for Web apps. Monkeybars uses JRuby + Swing, and I
encourage you to give it a whirl. It rocks. But I'm biased.

http://www.monkeybars.org

--
James Britt

www.happycamperstudios.com - Wicked Cool Coding
www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

I must say I'm not totally happy with _any_ of the current offerings
that I've tried for a Ruby GUI(fxRuby, wxRuby, Shoes, Sugar). I want a
form to open up and I want to be able to drop controls anywhere I want
on to it without having my eyes bleed.

I'd like to have a GUI builder (preferably on Linux, or will run the
built GUI on Linux) that's as easy as Microsoft Visu ... hey would you
guys stop throwing things ...please? ... anyway as easy as that.

That being said... Monkeybars seems to be the easiest way for me to
build a GUI in Ruby thus far. Hmmmm... I'll have to look at how
plug-ins are done in Netbeans... It may let me automate creating a
project with a form with Monkeybars.

I'm just a Linux newbie so I'll just get back to creating my rinky dinky
little apps in Ruby. :stuck_out_tongue: If someone ever does get around to writing a
decent GUI builder for Ruby I predict the flood doors would open and
you'd see everyone and their dog trying Ruby out. Is that a good
things?... (shrug)

M

···

--
Posted via http://www.ruby-forum.com/\.

Ruby as well as Perl and Python, can use Gtk (multiplatform)

To a demo visit: http://perplex.schmumpf.de/dev/tictactoe/ruby/

···

2008/9/10 timr <timrandg@gmail.com>

On Sep 5, 6:20 pm, Zhao Yi <youhaod...@gmail.com> wrote:
> I want to choose a script to develop a GUI program. I want to know more
> about Ruby on GUI development, including its performance, function
> capability, etc. Does anyone give me a brief introduction on this?
> --
> Posted viahttp://www.ruby-forum.com/.

It won't work for linux users, but I am interested in macruby--an ruby/
Obj-C combination. That should allow ruby users to use ruby style with
Apple's extensive GUI object library. That will be nice. It is
unlikely any of the current GUI programming systems out now will be
able to compete with it (on the mac platform).
Tim

--
Angel Alonso

F3leR

Jason Cameron wrote:

I must say I'm not totally happy with _any_ of the current offerings that I've tried for a Ruby GUI(fxRuby, wxRuby, Shoes, Sugar). I want a form to open up and I want to be able to drop controls anywhere I want on to it without having my eyes bleed.

I'd like to have a GUI builder (preferably on Linux, or will run the built GUI on Linux) that's as easy as Microsoft Visu ... hey would you guys stop throwing things ...please? ... anyway as easy as that.

NetBeans. Built in GUI editor that Just Works. Cross-platform. Free. (It's also a decent Ruby editor as well.)

That being said... Monkeybars seems to be the easiest way for me to build a GUI in Ruby thus far. Hmmmm... I'll have to look at how plug-ins are done in Netbeans... It may let me automate creating a project with a form with Monkeybars.

I'm just a Linux newbie so I'll just get back to creating my rinky dinky little apps in Ruby. :stuck_out_tongue: If someone ever does get around to writing a decent GUI builder for Ruby I predict the flood doors would open and you'd see everyone and their dog trying Ruby out. Is that a good things?... (shrug)

Why must the GUI builder be written in Ruby? Monkeybars works with the resulting .class file(s) containing the Swing stuff; how that gets created is irrelevant. (Note: yes, you can use Monkeybars with "builder"-style GUI-generating code as well, but that gets painful for anything non-trivial, even with Monkeybars.)

Use the best tool for the job. Few people are insisting their text editor or IDE be written in Ruby (not to say that would be a bad thing, just misplaced focus).

There will be a Monkeybars talk at RubyConf 2008; I think it will knock people's socks off. (Yes, I'm biased. But see for yourself.)

···

--
James Britt

www.happycamperstudios.com - Wicked Cool Coding
www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

You can use Glade to do this with Ruby-GNOME2.

Farrel

···

2008/9/10 Jason Cameron <cameronjc2000@yahoo.ca>:

I'd like to have a GUI builder (preferably on Linux, or will run the
built GUI on Linux) that's as easy as Microsoft Visu ... hey would you
guys stop throwing things ...please? ... anyway as easy as that.

--
Aimred - Ruby Development and Consulting

Jason,
There's a GUI builder for Ruby already (JRuby, specifically). It's Netbeans.
Netbeans has a GUI Builder that supports drag-and-drop of buttons, panels, labels, etc. If you do it right, you can use your interface on any platform.

We have some screencasts which are a little dated, but it'll give you the gist of using the editor along with how you wire it up with Monkeybars:
(near the buttom of the page)
http://monkeybars.rubyforge.org/docs.html

We also can be found in #jruby and #monkeybars on freenode.

···

On Sep 9, 2008, at 7:38 PM, Jason Cameron wrote:

I'd like to have a GUI builder (preferably on Linux, or will run the
built GUI on Linux) that's as easy as Microsoft Visu ... hey would you
guys stop throwing things ...please? ... anyway as easy as that.

That being said... Monkeybars seems to be the easiest way for me to
build a GUI in Ruby thus far. Hmmmm... I'll have to look at how
plug-ins are done in Netbeans... It may let me automate creating a
project with a form with Monkeybars.

I'm just a Linux newbie so I'll just get back to creating my rinky dinky
little apps in Ruby. :stuck_out_tongue: If someone ever does get around to writing a
decent GUI builder for Ruby I predict the flood doors would open and
you'd see everyone and their dog trying Ruby out. Is that a good
things?... (shrug)

I'd like to have a GUI builder (preferably on Linux, or will run the
built GUI on Linux) that's as easy as Microsoft Visu ...

Don't fight it :wink:

Drag+drop design for Rails (cross-platform):
http://www.sapphiresteel.com/Visual-Ruby-On-Rails-Drag-and-Drop
http://www.sapphiresteel.com/A-Brief-Guide-To-The-Visual-Rails
http://www.sapphiresteel.com/A-Brief-Guide-To-The-Visual-Rails,235
http://www.sapphiresteel.com/Visual-Rails-Workbench-screencast
http://www.sapphiresteel.com/Visual-Rails-Workbench-The-Import

Drag+Drop design for any .NET program running Ruby:
http://www.sapphiresteel.com/Ruby-and-NET-Making-a-Connection

Drag+Drop Design for Iron Ruby (.NET):
http://www.sapphiresteel.com/Ruby-In-Steel-For-IronRuby

best wishes
Huw Collingbourne

SapphireSteel Software
Ruby and Rails In Visual Studio
http://www.sapphiresteel.com

···

--
Posted via http://www.ruby-forum.com/\.

I'd prefer Ruby and Qt4 (qt4-qtruby): http://rubyforge.org/frs/?group_id=181&release_id=23283

You can use Aptana IDE with Ruby for the Code, the Qt Assistant for Documentation, and the Qt Designer to build GUIs with a graphical Tool. Further i dont know any other way to build a GUI for Ruby with a Visual Designer. Performance is quiet good, cause qt4-qtruby is just a 'Wrapper' for the libraries.

Farrel Lifson schrieb:

···

2008/9/10 Jason Cameron <cameronjc2000@yahoo.ca>:
  

I'd like to have a GUI builder (preferably on Linux, or will run the
built GUI on Linux) that's as easy as Microsoft Visu ... hey would you
guys stop throwing things ...please? ... anyway as easy as that.
    
You can use Glade to do this with Ruby-GNOME2.

Farrel
  
--
Otto Software Partner GmbH

Jan Pilz (e-mail: Jan.Pilz@osp-dd.de)

Tel. 0351/49723202, Fax: 0351/49723119
01067 Dresden, Freiberger Straße 35 - AG Dresden, HRB 2475
Geschäftsführer: Burkhard Arrenberg, Heinz A. Bade, Jens Gruhl

I do not quite care about the developing IDE for ruby GUI. What I want
to know is the performance of ruby GUI application. Compare with other
GUI application, like tcl, python etc., is ruby a good choice?

···

--
Posted via http://www.ruby-forum.com/.

qt4-qtruby is kinda wrapper for Qt4, GUI is nearly same speed as with C++, cause precompiled libraries are used.

Zhao Yi schrieb:

···

I do not quite care about the developing IDE for ruby GUI. What I want to know is the performance of ruby GUI application. Compare with other GUI application, like tcl, python etc., is ruby a good choice?
  
--
Otto Software Partner GmbH

Jan Pilz (e-mail: Jan.Pilz@osp-dd.de)

Tel. 0351/49723202, Fax: 0351/49723119
01067 Dresden, Freiberger Straße 35 - AG Dresden, HRB 2475
Geschäftsführer: Burkhard Arrenberg, Heinz A. Bade, Jens Gruhl

You can use Glade. I made a software with Ruby + ActiveRecord + Glade
+ Sqlite in a week. This soft I done to learn how program with Ruby in
stand alone applications. Is a small example of what can somebody do
with this technologies..

In the bellow link can see explanation of the aplication and download
a screencast about the aplication.

http://cesardiaz.com.ar/personal_page/english/portfolio.html

Cheers

···

--
_______________________________________________
http://www.sindominio.net/ayuda/preguntas-inteligentes.html
http://cronopios.net/Traducciones/trolls.es.html
Gnu/Linux count user #416024

Pagina personal : http://www.cesardiaz.com.ar
Blog://cesarediaz.blogspot.com

Wow. Quite the storm! Oh well.

I guess I should clarify a bit.

I _am_ using monkeybars (and therefore NetBeans) to create my GUI. It's
pretty good. My second choice would be Glade(Is there a way for Glade 3
to be used?). It's still a little hit or miss though in NetBeans. I
put some controls down and the rest _move_ ... even after I put a panel
in. Of course it could be that I'm an idiot and I don't know how to
make a GUI with it. :stuck_out_tongue: The more I use it the more I'll get used to
those quirks.

I also don't care if the GUI itself is written in Ruby. The GUI could
be written in LOGO for all I care. I just want to write an app, click a
button and have some Ruby code execute behind it.

Q: If I write a swing GUI in NetBeans can I then copy that somehow to a
ruby project(using Monkeybars somehow)? Or do I have to start from
scratch every time. I’m also not entirely sure how to create a project
with _two_ or more forms.

My GUI first app is either going to be a pared down media library/grep
tool for people who like to download (open source of course!) shows and
ask themselves, “Do I download that show? Or do I have it already?” I'm
using JRuby, Monkeybars, NetBeans and Postgres. I'm not too sure about
Activerecord yet and I find SQL rather trivial so I'm accessing the db
directly.

My first Ruby script (which made me fall in love with Ruby) transcoded
all of the avi files in a directory to 320x200 in _1_ line of code.

I'm just trying to have fun. :stuck_out_tongue:
M
=:)

···

--
Posted via http://www.ruby-forum.com/.

Wow. Quite the storm! Oh well.

I guess I should clarify a bit.

I _am_ using monkeybars (and therefore NetBeans) to create my GUI. It's
pretty good. My second choice would be Glade(Is there a way for Glade 3
to be used?). It's still a little hit or miss though in NetBeans. I
put some controls down and the rest _move_ ... even after I put a panel
in. Of course it could be that I'm an idiot and I don't know how to
make a GUI with it. :stuck_out_tongue: The more I use it the more I'll get used to
those quirks.

By default in Netbeans, all panels, frames, dialogs, and other containers are set to "Free Design", which is the GroupLayout. GroupLayout is very quirky, and takes some time to learn. For forms of any complexity, you may want to use a different layout (right click on the container in question, and you can set the new layout). If you're looking for something akin to Visual Studio's absolute layout, you can set the layout to null (Null Layout). This isn't cross-platform friendly, and the form won't move/stretch when the user goes to resize it, but at least it'll get you going. You can also isolate some components by putting them in another panel, and different panels, even if nested, can have their own layout. Netbeans also has a handy feature where you can select one or more components, and right click, and select "Enclose In..." and select a JPanel.

GroupLayout does some really cool things, but sometimes it's like working with a mule. It's very tricky.

I also don't care if the GUI itself is written in Ruby. The GUI could
be written in LOGO for all I care. I just want to write an app, click a
button and have some Ruby code execute behind it.

Q: If I write a swing GUI in NetBeans can I then copy that somehow to a
ruby project(using Monkeybars somehow)? Or do I have to start from
scratch every time. I’m also not entirely sure how to create a project
with _two_ or more forms.

We've got a whole more than two forms going in some of our projects:
http://www.happycamperstudios.com/monkeybars/charlotte%20interface.png

I'm not exactly sure what's going on here, but I'd gather that you created a Ruby project. Unfortunately, Netbeans doesn't support a true JRuby project, where you can freely dance between JRuby and Java. The next best thing is to make your project a Java project. Here you can have Ruby files but also Java files and forms. You'll need a Main.java, which kicks off JRuby, as well as the JRuby complete jar. We've got a tutorial on setting a lot of this stuff up in our tutorials section: http://monkeybars.rubyforge.org/tutorials.html

My GUI first app is either going to be a pared down media library/grep
tool for people who like to download (open source of course!) shows and
ask themselves, “Do I download that show? Or do I have it already?” I'm
using JRuby, Monkeybars, NetBeans and Postgres. I'm not too sure about
Activerecord yet and I find SQL rather trivial so I'm accessing the db
directly.

We have a couple of internal Monkeybars project that need their own local database. We used Derby + ActiveRecord for this. While I didn't work a ton on these projects myself, I know we'd be more than happy to share what we did to get it working. Derby is SQLite in Java, so it's just a file that you can load as your database, and there's no need for anyone to set up a full on database server on their machine.

···

On Sep 10, 2008, at 7:02 AM, Jason Cameron wrote:

My first Ruby script (which made me fall in love with Ruby) transcoded
all of the avi files in a directory to 320x200 in _1_ line of code.

I'm just trying to have fun. :stuck_out_tongue:
M
=:)
--
Posted via http://www.ruby-forum.com/\.

Logan Barnett wrote:
...

We have a couple of internal Monkeybars project that need their own
local database. We used Derby + ActiveRecord for this. While I didn't
work a ton on these projects myself, I know we'd be more than happy to
share what we did to get it working. Derby is SQLite in Java, so it's
just a file that you can load as your database, and there's no need
for anyone to set up a full on database server on their machine.

I've got to remember to start with small projects before I go for big
ones.

I think I fubared 3 hours of work on a form.
I get the error: 'no such file to load -- media_window_view' I have a
MediaWindow_view.rb so I'm scratching my head. I'm trying to find
'media_window_view' in my code but no luck so far.

M

···

--
Posted via http://www.ruby-forum.com/\.

All of your files should be named with underscores (media_window_view.rb). The classes are have the camel case (MediaWindowView).
If you're like me, and strive to remember as few things as possible, you can just use the generator task to create these files, and it will hook them up for you.
rake generate ALL=src/foo
This will create the following
src/foo/foo_model.rb
src/foo/foo_controller.rb
src/foo/foo_view.rb
Each of those files will have a very simple Model, Controller, and View for you to use that are pretty much ready to go. I think you just need to fill out the Java class the view where you see set_java_class.

···

On Sep 11, 2008, at 6:29 PM, Jason Cameron wrote:

I get the error: 'no such file to load -- media_window_view' I have a
MediaWindow_view.rb so I'm scratching my head. I'm trying to find
'media_window_view' in my code but no luck so far.

Logan Barnett wrote:

All of your files should be named with underscores
(media_window_view.rb). The classes are have the camel case
(MediaWindowView).
If you're like me, and strive to remember as few things as possible,
you can just use the generator task to create these files, and it will
hook them up for you.
rake generate ALL=src/foo
This will create the following
src/foo/foo_model.rb
src/foo/foo_controller.rb
src/foo/foo_view.rb
Each of those files will have a very simple Model, Controller, and
View for you to use that are pretty much ready to go. I think you just
need to fill out the Java class the view where you see set_java_class.

I followed the example on the site and created a working app. I tried
it again but left it for a couple of weeks(before I got the form to
show) then came back to it. I'm going to start from scratch and try to
import the code for the controls for my form. (crosses fingers)

J

···

--
Posted via http://www.ruby-forum.com/\.