# Interface

**URL:** <https://www.ruby-forum.com/t/interface/116614>\
**Category:** Ruby\
**Created:** [October 8, 2007, 12:09am UTC](https://www.ruby-forum.com/t/interface/116614 "2007-10-08T00:09:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonmorrison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Post date:** [October 8, 2007, 12:09am UTC](https://www.ruby-forum.com/t/interface/116614/1 "2007-10-08T00:09:13Z")

</div>

Hi There,

I have been using rails for the last 6 months and loving every minute of  
it. I decided it would be smart to dive into learning the in’s and out’s  
of Ruby. I bought Beginning Ruby, Programming Ruby, and the Ruby  
Cookbook.

I am through chapter 6 of Beginning Ruby and I havent seen any mention  
of GUI.

I primarily work on os x, is RubyCocoa the main way of doing GUI in ruby  
on OS X?

Any tips or advice on where I can read more about GUI with Ruby on OS X  
would be great.

Thanks!!

Jason

---

<div class="post-metadata">

**Author:** ![jasonmorrison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Post date:** [October 8, 2007, 12:33am UTC](https://www.ruby-forum.com/t/interface/116614/2 "2007-10-08T00:33:01Z")

</div>

On Oct 7, 2007, at 5:09 PM, Jason M. wrote:

> mention  
> Thanks!!
> 
> ## Jason
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

RubyCocoa is one way, and it’s the best way to achieve truly native  
GUI with OS X, but it does require some Cocoa understanding, mostly  
the Hillegass book. This is poised to change at the end of this month  
with the new Objective-C 2 and a new XCode as well.  
But, you can do GUI stuff with RubyTk, WxRuby or Qt libraries for  
Ruby as well.  
It’s a little less learning curve than Cocoa, but a whole different  
approach and you can use that stuff for cross-platform work.

---

<div class="post-metadata">

**Author:** ![jasonmorrison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Post date:** [October 8, 2007, 12:35am UTC](https://www.ruby-forum.com/t/interface/116614/3 "2007-10-08T00:35:57Z")

</div>

Jason M. wrote:

> I am through chapter 6 of Beginning Ruby and I havent seen any mention  
> of GUI.
> 
> I primarily work on os x, is RubyCocoa the main way of doing GUI in ruby  
> on OS X?

Guess what: A GUI platform is a library, not a religion. Ruby is  
agnostic.  
The books you read are teaching you how to use Ruby, including how to  
use it  
with a library. When the time comes to plug in a

> Any tips or advice on where I can read more about GUI with Ruby on OS X  
> would be great.

Not a joke: Why not use Rails to write the GUI you want, then serve it  
locally? Folks are finding this technique competitive (in the \>cough\<  
enterprise) with the ponderous desktop GUIs.

El Goog can lead you to whatever Ruby/Cocoa libraries are available.

---

<div class="post-metadata">

**Author:** ![jasonmorrison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Post date:** [October 8, 2007, 1:43am UTC](https://www.ruby-forum.com/t/interface/116614/4 "2007-10-08T01:43:55Z")

</div>

> Guess what: A GUI platform is a library, not a religion. Ruby is agnostic.  
> The books you read are teaching you how to use Ruby, including how to use  
> it with a library. When the time comes to plug in a

GUI library, you’ll be ready.

---

<div class="post-metadata">

**Author:** ![jasonmorrison](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Post date:** [October 8, 2007, 4:03am UTC](https://www.ruby-forum.com/t/interface/116614/5 "2007-10-08T04:03:26Z")

</div>

John J. wrote:

> > Cookbook.  
> > OS X  
> > the Hillegass book. This is poised to change at the end of this month  
> > with the new Objective-C 2 and a new XCode as well.  
> > But, you can do GUI stuff with RubyTk, WxRuby or Qt libraries for  
> > Ruby as well.  
> > It’s a little less learning curve than Cocoa, but a whole different  
> > approach and you can use that stuff for cross-platform work.

The principle of reading a book on using Ruby is to learn ruby. GUI  
Programming is done using libraries, for example C, C++, and Perl do not  
have  
any thing built in for GUI programming. Yet they are some of the most  
used  
languages, even for GUI applications. You are not required to create a  
GUI.

So you need a GUI Library or ‘toolkit’ that suits your needs, this often  
boils  
done to Windows / Mac native (some one piss on the Win32 C API please),  
GTK,  
QT, or TK. – Programs written in GTK/QT/TK/Toolkit foo won’t look the  
same as  
if you used what your OS provides. But you won’t have to write the GUI  
code  
for each OS.

QTRuby is my favorite, largely because I love the C++ Documentation that  
comes  
with QT, it’s great. And I find QT well enough suited to GUI  
applications  
since it’s easy enough to write by hand. Even though QT Designer allows  
one to  
use a GUI Builder and code generation for the graphical parts make it  
fast +  
easy.

Java is a bit different in how it has it’s own GUI toolkit(s) but Java  
is also  
different in how it runs. Although I’m sure that has changed a lot since  
the  
Java Sourcebook came out… hehe.

TerryP.
