Deploy a Ruby program & GUI connection

A

Adrian Arlechin

I have some Java experience and jus try to understand Ruby
I have two problems:
First: how can I deploy a ruby app. Is there something like jar? or the
application is started allwais going to the command line? The source
files can't be hidden and/or protected?
And the second:
From Java I now that is better to code yourself the GUI and not to use a
GUI maker, but in Ruby must I learn Tk?, this beeing presented in the
"Programming Ruby - The Pragmatic Programmer's Guide"
I have seen an IDE called wxFormBuilder wich make the GUI developement
very easy, but how do I connect the code to a ruby program? I looked
around the web and in some Ruby books and I didn't find a explenation.
A simple example will be great: a file made with wxFormBuilder wich
takes two numbers in two text fields, and two buttons one for
multiplication and one for division, with output to another text field.
I think such explenation will help a lot of people in their first steps
in Ruby
Thanks
 
P

pharrington

I have some Java experience and jus try to understand Ruby
I have two problems:
First: how can I deploy a ruby app. Is there something like jar? or the
application is started allwais going to the command line? The source
files can't be hidden and/or protected?
And the second:
From Java I now that is better to code yourself the GUI and not to use a
GUI maker, but in Ruby must I learn Tk?, this beeing presented in the
"Programming Ruby - The Pragmatic Programmer's Guide"
I have seen an IDE called wxFormBuilder wich make the GUI developement
very easy, but how do I connect the code to a ruby program? I looked
around the web and in some Ruby books and I didn't find a explenation.
A simple example will be great: a file made with wxFormBuilder wich
takes two numbers in two text fields, and two buttons one for
multiplication and one for division, with output to another text field.
I think such explenation will help a lot of people in their first steps
in Ruby
Thanks

Ruby apps are typically deployed as gems. Yes, your source is as plain
as day, but is that really *so* much different than Java, given the
ease of disassembling bytecode (and the numerous tools that do a
fantastic job of it)? Also bindings for just about every graphics
toolkit known to man exist for Ruby, a simple google search will help
you with that. One of the more interesting approaches to this though
is http://shoooes.net/, you should give it a look.
 
L

Logan Barnett

I have some Java experience and jus try to understand Ruby
I have two problems:
First: how can I deploy a ruby app. Is there something like jar? or
the
application is started allwais going to the command line? The source
files can't be hidden and/or protected?
And the second:
From Java I now that is better to code yourself the GUI and not to
use a
GUI maker, but in Ruby must I learn Tk?, this beeing presented in the
"Programming Ruby - The Pragmatic Programmer's Guide"
I have seen an IDE called wxFormBuilder wich make the GUI developement
very easy, but how do I connect the code to a ruby program? I looked
around the web and in some Ruby books and I didn't find a explenation.
A simple example will be great: a file made with wxFormBuilder wich
takes two numbers in two text fields, and two buttons one for
multiplication and one for division, with output to another text
field.
I think such explenation will help a lot of people in their first
steps
in Ruby

Adrian,
I highly recommend you take a look at Monkeybars - A JRuby library
that cleanly handles Swing. You can use a variety of ways to build the
UI/layout, all of which Monkeybars is agnostic to. This way you can do
some GUI development with Ruby while also capitalizing on your Java/
Swing experience.
http://monkeybars.rubyforge.org/
Right now we're moving to Kenai, so everything may not be linked up yet.
http://kenai.com/projects/monkeybars/
Our mailing list is very active and probably the best place to go for
help:
http://kenai.com/projects/monkeybars/lists/users/archive


Logan Barnett
(e-mail address removed)
http://www.logustus.com
 
L

Logan Barnett

Ruby apps are typically deployed as gems.

Monkeybars apps built with Rawr (the standard build tool) can go out
as standalone .app and .exe files - no Ruby installation (let alone
gems) are necessary.
Yes, your source is as plain as day, but is that really *so* much
different than Java, given the
ease of disassembling bytecode (and the numerous tools that do a
fantastic job of it)?

Rawr by default compiles your app into Java bytecode. We have run a
decompiler over JRuby's compiled code for hello world (puts "hello
world") and found many lines of unreadable Java. Now go write a non-
trivial application, and you have code that's obfuscated pretty well.
Also bindings for just about every graphics
toolkit known to man exist for Ruby, a simple google search will help
you with that. One of the more interesting approaches to this though
is http://shoooes.net/, you should give it a look.

Shoes is an interesting library, but if you're thinking of writing a
standard GUI app with lots of UI widgets (such as tables, lists,
buttons, text fields, etc), then I'd look elsewhere. Shoes tackles a
different set of UI problems than your standard GUI framework. I've
been paid to port Shoes apps that were trying to do what Monkeybars
excels at, and it wasn't pretty to see how Shoes was doing it. Just to
reiterate - Shoes isn't bad, it's just designed for something else.
 
A

Albert Schlef

pharrington said:
One of the more interesting approaches to this though
is http://shoooes.net/, you should give it a look.

Shoes, if I understand correctly, doesn't install into your existing
Ruby environment. It comes with an independent Ruby environment.

In other words, Shoes is an anathema to the Free World (because you
can't install just Shoes; you have to install, and manage, its own
Ruby).
 
A

Adrian Arlechin

Logan said:
On May 23, 2009, at 12:46 AM, Adrian Arlechin wrote:
I highly recommend you take a look at Monkeybars - A JRuby library
that cleanly handles Swing. You can use a variety of ways to build the
UI/layout, all of which Monkeybars is agnostic to. This way you can do
some GUI development with Ruby while also capitalizing on your Java/
Swing experience.
http://monkeybars.rubyforge.org/
Right now we're moving to Kenai, so everything may not be linked up yet.
http://kenai.com/projects/monkeybars/
Our mailing list is very active and probably the best place to go for
help:
http://kenai.com/projects/monkeybars/lists/users/archive


Logan Barnett
(e-mail address removed)
http://www.logustus.com

Thanks, I think monkeybars will solve my problem when I will understand
it. For now there are some problems in the tutorial: the video links
don't work. But Logan wrote about that. I hope they will resolve this as
soon as posible
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top