Is Ruby For Me?

Hi all,

I’ve recently discovered Ruby/Ruby on Rails. Or more accurately, I have
discovered it on an introductory level. I.E. I’ve read bits and pieces
on the internet and the initial pages of a book or two killing time at a
Barnes & Nobles.

My question is this: Is ruby for me? Moreover, can I develop
traditional as well as database driven “GUI” apps such as I would in
Delphi or Visual Studio for that matter? Or is it geared for a
“Browser” based interface?

I am a Delphi programmer on the Windows and Linux platforms. So I am
quite acquainted with Object Oriented Programming. An aspect of which
Ruby first caught my interest. And the Model-View-Controller structure
is quite intriguing to me. Also, Ruby coupled with Rails scaffolding.
It’s been said you can do anything (relatively) in Ruby that you can do
in other languages, such as Java, C, Basic, etc. But I haven’t found
any screen captures or code snippets that would actually prove this out.

Can anyone comment on this and clear this gray area up for me? Thank
you very much.

TonyDM

My question is this: Is ruby for me? Moreover, can I develop
traditional as well as database driven “GUI” apps such as I would in
Delphi or Visual Studio for that matter? Or is it geared for a
“Browser” based interface?

I write some GUI apps in Ruby. There’s some caveats, but nothing I
couldn’t work around.

Its core is to me at heart unixy – anything that can be bound in C
is a decent candidate for working with in Ruby. I do so.

IDE integration is weak at best. Being a VIM user, this doesn’t bug
me at all. I write in GTK with quite a bit of Glade when I’m writing,
so I do a bit of visual UI design, and integrate purely in code. No
click-to-stub-event-handlers for me.

Ruby’s threading is sometimes uncomfortable to use with GUI toolkits.
It’s not pthreaded.

I do a lot of web coding. A lot more unix-style shell scripts and
such in ruby. And last, GUIs. But it’s a very general language, and
only slightly less general runtime.

Then go JRuby, and you have full access to the Java goodness, and the
threading there is much better, though of course you lose a lot of
the unixyness.

Aria

On Sun, 21 Oct 2007 11:10:58 +0900, Tony De wrote:

My question is this: Is ruby for me?

I actually read in a book yesterday that it was specifically not for
you.

(No, I jest.)

Moreover, can I develop
traditional as well as database driven “GUI” apps such as I would in
Delphi or Visual Studio for that matter? Or is it geared for a
“Browser” based interface?

There are not a large number of GUI-style Ruby apps today; it’s not that
they can’t be done, but that the interest just hasn’t been there. Ruby
does support several GUI frameworks - Gtk, FOX, Qt3/Qt4, wxWindows,
maybe
others.

You won’t find the integration of IDE, language, and GUI library in Ruby
(or any other language, really) that you’re used to in Delphi; Delphi is
a
self-contained system.

Some languages, like C or C++, have tightly integrated IDEs (Visual
Studio)
but require you to choose a graphics toolkit. Some, like Java, have a
tightly integrated IDE (IntelliJ, Eclipse) and a “standard” graphics
toolkit (Swing) but allow other toolkits (SWT). But Ruby, Python, Perl,
and other dynamic languages aren’t tightly bound to any IDE or any
graphics
toolkit; that’s both an advantage (in flexibility) and a disadvantage
(to
the novice programmer who just wants to write a GUI app).

Ruby’s definitely not geared toward the browser specifically; Rails
obviously is, but Rails is just a Ruby-based framework. You can, in
fact,
do just about anything in Ruby that you can do in any other language,
and
vice versa; whether Ruby makes it easier or harder than [your favorite
language here] is a matter of opinion and depends highly upon the
specific
applications you want to write.

As for IDEs, until fairly recently, there were no good choices. Many
Ruby
programmers use TextMate or another text editor. In the past year or
two,
support for Ruby has been added to Eclipse (via Aptana RadRails [free]
or
3rdRail [commercial]), IntelliJ, and the upcoming NetBeans 6 from Sun.

Jay L. wrote:

the novice programmer who just wants to write a GUI app).
support for Ruby has been added to Eclipse (via Aptana RadRails [free] or
3rdRail [commercial]), IntelliJ, and the upcoming NetBeans 6 from Sun.

Although it’s not an IDE, WideStudio will give you the ability to create
drag-and-drop GUI interfaces (like Delphi or Borland Builder) and will
also let you use Ruby as the language that drives it (or C/C++, Java,
Ocaml, Python…) Be aware that the documentation is a bit weak (unless
you read Japanese) but the guy who created it is very responsive on the
mailing list. That said, I haven’t yet used it for much, so you’ll need
to evaluate it for yourself, I guess. By the way, has anyone here used
WideStudio? It’s cross-platform cross-language ability attracts me
quite a bit (also since I experimented with it for some embedded systems
targets).

On the other hand, one of the things you should consider before you
start is whether you’re happy to let the source code of your application
ship with what you create. I don’t have a problem with this because my
Ruby scripts are internal and my Rails applications are hosted. But, if
you’re doing product development, that’s a concern that you must
address.

Lastly, think of what you’re trying to achieve - what kind of things
will your applications do? If it’s largely database-driven stuff, I
have a feeling that with pieces of Rails (and the many other modes/
frameworks for accessing databases that exist for Ruby), you’ll be able
to slap on a GUI frontend and get moving :slight_smile:

Hope this helps.

Cheers,
Mohit.
10/21/2007 | 2:31 PM.

Tony De wrote:

“Browser” based interface?
Ruby is much more than Rails. Rails is but one of several Ruby Web
development frameworks, and Web development is but a part of what Ruby
can do.

Ruby is a general-purpose programming language. In some ways it is
similar to Python and Perl, and in other ways it is like Java, Lisp, and
Smalltalk.

I am a Delphi programmer on the Windows and Linux platforms. So I am
quite acquainted with Object Oriented Programming.

OOP can mean different things to different people based on experience.
The OO nature of Ruby is different from that of Delphi; it’s nicer and
far more consistent. :slight_smile:

An aspect of which
Ruby first caught my interest. And the Model-View-Controller structure
is quite intriguing to me.

The use of MVC is entirely up to you and how you decide to design your
applications. Ruby will let you pick the architecture that works best
for your needs.

Also, Ruby coupled with Rails scaffolding.
It’s been said you can do anything (relatively) in Ruby that you can do
in other languages, such as Java, C, Basic, etc. But I haven’t found
any screen captures or code snippets that would actually prove this out.

There is great work being done with JRuby, an implementation of Ruby
that runs on the JVM and which can make use of Java libs. This gives
you full access to all the GUI widgets you would use in Java.

There are also bindings for a few different widget sets. There is no
reason not to do traditional desktop apps in Ruby.

Can anyone comment on this and clear this gray area up for me? Thank
you very much.

See also

http://ruby-doc.org/whyruby
http://ruby-doc.org/gettingstarted
http://c2.com/cgi/wiki?RubyLanguage
http://wiki.rubygarden.org/Ruby/page/show/RealWorldRuby
http://en.wikipedia.org/wiki/Ruby_language


James B.

“Every object obscures another object.”
- Luis Bunuel

On Sun, 21 Oct 2007 15:31:21 +0900, Mohit S. wrote:

On the other hand, one of the things you should consider before you
start is whether you’re happy to let the source code of your application
ship with what you create. I don’t have a problem with this because my
Ruby scripts are internal and my Rails applications are hosted. But, if
you’re doing product development, that’s a concern that you must
address.

I was curious about that. Is there nothing in the works to go VM route
with byte code? Or, would that not work for a dynamic language like
Ruby? Is there just not the demand for compiled code presently?

There are multiple VM’s for Ruby, are these for better performance?

On the other hand, what I find attractive about Ruby is that there’s no
need for ANT build files. This is a major feature of the language, for
me.

-Thufir

Is ruby for me?

If you mean ruby as a language like perl (and perl use cases), then
totally “yes”.

This way you can separate applications like RoR from the underlying
language too.
(ie. some People use some components that are also used in RoR, but they
try to avoid the bigger overhead on it with their own solution)

Ruby+GUI is quite ok, although there are sometimes cave-eats such as
lack of documentation in certain areas (which in general, IMHO, is
sometimes a problem
with Ruby as a whole).
As a language, ruby rocks.

On Sun, 2007-21-10 at 17:14 +0900, 7stud – wrote:

Ruby’s documentation is so bad, it makes learning the language too
frustrating. The only good source of documentation is the book
‘Programming Ruby’. If whatever you need isn’t documented in that book,
then it might as well not be part of the language.

Well, that and The Ruby Way (more useful by far than the Pickaxe to me),
the Ruby Cookbook, Everyday Scripting with Ruby, Learn to Program, Agile
Web D. with Rails, Rails Recipes, Rails Solutions, Ruby for
Rails (and this just names the published material I own) … but hey!
What’s nearly an order of magnitude difference between friends?

Tony De wrote:

My question is this: Is ruby for me?

Ruby’s documentation is so bad, it makes learning the language too
frustrating. The only good source of documentation is the book
‘Programming Ruby’. If whatever you need isn’t documented in that book,
then it might as well not be part of the language.

On 10/21/07, 7stud – [email protected] wrote:

Ruby’s documentation is so bad, it makes learning the language too
frustrating. The only good source of documentation is the book
‘Programming Ruby’. If whatever you need isn’t documented in that book,
then it might as well not be part of the language.

I have a hard time saying a language is poorly documented when the
command line tool ‘ri’ is so accessible and easy.
Granted, I would like more formal forms of documentation, (I admit it,
I enjoy reading specifications) but I don’t really expect I know every
facet of the language, what I know easily makes it my favorite
language of the moment.

I was a Delphi programmer for 10 years so I know where you are coming
from :wink:

I am now one of the developers of the Ruby in Steel IDE for Visual
Studio and we are doing as much as is practically possible to make Ruby
programming approachable to people who are used to Delphi, C#, VB etc.

Currently, a completely integrated event-driven visual design system
like Delphi isn’t possible. It will be possible when Microosft
releases IronRuby (the Ruby implementation for .NET) and we already have
a form designer ‘in house’ which will give you a Delphi-like experience
with IronRuby.

The final version of IronRuby is still some way off, however. For the
time being, therefore, we have a cross-language solution. You can design
visual interfaces in a .NET language of your choice and link these into
Ruby using a drag-and-drop control called the Ruby Connector. More on
this here:

http://www.sapphiresteel.com/The-Ruby-Connector-For-NET

For visual web design with drag and drop, you’ll have to wait until
early next year when we shall be releasing the Visual Rails Workbench.
We’ll have more details on this quite soon in our blog.

best wishes
Huw C.

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

Hi,

On Sun, 2007-10-21 at 17:14 +0900, 7stud – wrote:

The only good source of documentation is the book
‘Programming Ruby’. If whatever you need isn’t documented in that
book,
then it might as well not be part of the language.

Admittedly, I’ve never read that book, and I think I’m getting along
pretty well.

Arlen

Devi Web D. wrote:

facet of the language, what I know easily makes it my favorite
language of the moment.

I’m mid-way between 7stud and Devi here. I’d rather not have to learn
how to use a package by reading “ri” or “Rdoc”, or, for that matter,
poking stuff into “irb”. But there are a number of excellent books on
Ruby, including, of course, “Programming Ruby.” Now the quantity of
Ruby books may not be as great as that of Java, Perl, Python, or PHP,
but the quality is first-rate. The only problem I have with Ruby
documentation is that there’s plenty of it for the language and for
Rails, but virtually none for Nitro/Og, etc.

So to paraphrase Ryan D., “those of you who have written really great
Ruby software – write those books or the kitten gets it!”

:slight_smile:

Hi –

On Sun, 21 Oct 2007, Arlen Christian Mart C. wrote:

Hi,

On Sun, 2007-10-21 at 17:14 +0900, 7stud – wrote:

The only good source of documentation is the book
‘Programming Ruby’. If whatever you need isn’t documented in that
book,
then it might as well not be part of the language.

Admittedly, I’ve never read that book, and I think I’m getting along
pretty well.

I’ll still go on record as saying that every Ruby programmer should
own it. Also, if you’ve used ri, you’ve probably used excerpts from
it.

David

Hi –

On Sun, 21 Oct 2007, M. Edward (Ed) Borasky wrote:

So to paraphrase Ryan D., “those of you who have written really great Ruby
software – write those books or the kitten gets it!”

The first thing I thought of when I saw that was my late cat Petey,
one of whose hobbies was eating paper, often wrenched out of books. I
have many books in the house with their title pages and tables of
contents largely missing… For some reason he always stayed away
from “Ruby for Rails.”

David

Tony De wrote:

My question is this: Is ruby for me? Moreover, can I develop
traditional as well as database driven “GUI” apps such as I would in
Delphi or Visual Studio for that matter? Or is it geared for a
“Browser” based interface?

I am a Delphi programmer on the Windows and Linux platforms.

I frequently develop Windows desktop applications with Ruby. As others
have mentioned, the process is a little more segmented than the fully
integrated IDE solutions provided by Delphi or Visual Studio.
Developments such as the Ruby in Steel VS plug-in and IronRuby will
change this. Still, I’m happy with what can I can accomplish using the
NetBeans Ruby IDE and Rake build scripts.

Though you have several options here, I use wxRuby for the GUI. I
usually hand-code my GUIs, but you don’t have to: you can use wxForm
Builder to design your GUI, then save it as XML.

My database apps use SQLite, SQL Server, and (if absolutely necessary)
MS Access.

RubyScript2Exe will “compile” all your files into a standalone
executable. It doesn’t actually compile to binary code, but your users
probably won’t know or care. It has some shortcomings but has served me
and my users well.

I also develop with VB6 and VB.Net, and my wxRuby apps look identical to
my VB apps. And I’m happier writing Ruby code, as long as it is fast
enough – and it almost always is fast enough.

Hope that helps. More details on using Ruby on Windows can be found
here:

http://rubyonwindows.blogspot.com

David

Tony De wrote:

I am a Delphi programmer on the Windows and Linux platforms. So I am
quite acquainted with Object Oriented Programming. An aspect of which
Ruby first caught my interest. And the Model-View-Controller structure
is quite intriguing to me. Also, Ruby coupled with Rails scaffolding.
It’s been said you can do anything (relatively) in Ruby that you can do
in other languages, such as Java, C, Basic, etc. But I haven’t found
any screen captures or code snippets that would actually prove this out.

I am also a Delphi programmer. I worked at Borland supporting Delphi
well before the release of 1.0. Ruby is nothing like Delphi. You do
not have the flexibility with Ruby that any compiled language like
Delphi or C++ allows. Delphi is written in Delphi. Ruby cannot be
written in Ruby. Ruby is interpreted and can never run as fast as
Delphi. Ruby is fully object oriented making things possible which
would be shocking in Delphi.

e.g. a number is an object and can, therefore, call internal methods.
my_string = 1.to_s

The “look and feel” difference between the two is that Delphi lets you
do whatever a computer can do. Ruby does it FOR you. During my growing
pains in Ruby, which persist still :), the trick is not writing code to
do things but to find out how Ruby does it for you.

One recent example: I wanted to read through a large file of movie
titles (all lowercase) and change them to title case. Ruby’s capitalize
method only gets the first word. How to do it? Well, we know how we
would do it in Delphi or C++ (much the same approach) but here is how it
shook out in Ruby:

#l is for line and w is for word (not as number word but as string word)
File.foreach(’\movies.txt’) {|l| puts l.split.map{|w|
w.capitalize}.join(" ")}

As you can see, it comes down to just describing what you want from Ruby
and it does it. Very nice!

Ruby will do a lot. Most programming consists of a small subset of what
programs can do. We read databases. We calculate things and manipulate
strings. We display results in windows or web pages. etc, etc. Ruby
does an exemplary job with those things. If you want write a huge
online video game you would not do it in Ruby. It does, however, do
most everything that most programs do and development time is far
faster, the code far more compact, and much more easily maintained and
enhanced.

For what it does, which is considerable, it is excellent. For
especially exotic applications, use Delphi through sockets or some such
thing.

On Sun, 21 Oct 2007 17:14:52 +0900, 7stud – wrote:

Ruby’s documentation is so bad, it makes learning the language too
frustrating. The only good source of documentation is the book
‘Programming Ruby’. If whatever you need isn’t documented in that book,
then it might as well not be part of the language.

You may want to check out some of 7stud’s other posts to see whether you
feel the same frustrations he does (and, in fact, to learn from them,
since
he or others usually come up with the answers in short order).

Personally, although I have a copy of several Ruby books, I do most of
my
learning here on comp.lang.ruby and by reading the dozens of
Ruby-related
blogs, and haven’t hit any brick walls yet. A quick “How do I do this?”
post or even “I did this but how can I do it better?” often yields a
half-dozen answers with different solutions within a day.

There are also (weekly?) Ruby quizzes posted here, with answers the
following week.

On Mon, 22 Oct 2007 00:29:32 +0900, Lloyd L. wrote:

Ruby cannot be
written in Ruby. Ruby is interpreted and can never run as fast as
Delphi.

Actually, both of these are now/soon-to-be incorrect…

Rubinius (http://rubini.us) is a Ruby virtual machine, and one of its
goals
IIRC is to become self-hosting. Its core libraries are mostly in Ruby
already.

JRuby (http://jruby.codehaus.org) now has its first bytecode compiler;
they’re already working on a second one.

Hooray for diversity!

Bravo!! What a phenomenal response people. You all have given me some
valid points to consider. I never thought about my code visibility. I
am encouraged by the possibility to develop both general and browser
based apps. I am not familiar with GTK, Glade, Java (as much as I hate
to admit it), or or most scripting languages. I came from basic to C,
xbase (i.e. dbase.x, clipper, FoxPro) then to Delphi 2-7 and Visual
Basic 6. And accomplished all of my local & network database
development using Access, SQLite, and MySQL. So I have a little anxiety
about Ruby given it’s differences. Perhaps it’s more of the “I know
what I can accomplish in my comfort zone of Delphi and VCL’s both 3rd
Party and home grown, and how fast I can accomplish it, but how long
will my learning curve be to accomplish the same in Ruby” dilemma. I
guess only digging in will answer that question.

Let me pose another question.

I’m about to embark on a project that will tie into a companies
quickbooks data to provide automated transactions based on business
process managed by my software and in which Quickbooks is not
able/suited.

I have the QBSDK and am working with it. Does anyone know if and if so,
how one would take advantage of the Quickbooks API from Ruby?

TonyDM

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs