Getting started with full sized apps... how?


#1

Ok. First, I should say that I think highly of the Ruby language. I
have written cool snippets and life is good. I should say that I have
developed in many languages currently focused on Delphi.

Now, when I write an app, I make an interface that has things for the
user to see with buttons to push and keep him playing happily. I find
that, without a regular interface, I am somewhat at a loss for making
usable applications. I am not any more interested in a purely command
line approach now than I was when i was writing batch files to do it all
for me.

That having been said, I am not finding the golden path to making
wonderful ruby apps with no easy interface. Even practicing with the
language is problematic as I never seem to write methods longer than a
couple dozen lines and that doth not an app make.

So, as someone that wants to get as much mileage out of ruby as everyone
else seems to be getting, where do I start? What kinds of things are
being done by those that say that their apps are all but running the
universe itself?

Where to I go to get a start on the larger side of ruby?

Thanks for any advice you can offer.


#2

Well, I’m not sure quite how to answer your questions. Getting more
mileage
out of any language is as simple as using the language for more and more
tasks; where you would usually use java/c++/perl/python, use Ruby. I’m
not
sure how one would define the “larger side of Ruby.”

There is no “golden path” to any piece of software, and in fact there’s
a
popular paper on the subject: “No Silver Bullet” by Brookes*. Highly
recommended read.

I guess the best advice one can give is to ask questions. Give yourself
a
project that you know will make you dive into more of the language’s
features and don’t be afraid to admit that you don’t know.

So in your case, maybe you can start with an app you’ve written in
Delphi
and port it over to Ruby. Then you know what you need to do and just
need to
figure out the implementation details.

Hope that helps, and welcome to Ruby!

Jason

http://info.computer.org/portal/site/computer/menuitem.eb7d70008ce52e4b0ef1bd108bcd45f3/index.jsp?&pName=computer_level1&path=computer/homepage/misc/Brooks&file=index.xml&xsl=article.xsl&;jsessionid=Gyx5vsGNJL46Ghh2L8ycWWM2XGnDX5gq654cVWyFGnc4vn2WvHkL!-267347837
http://info.computer.org/portal/site/computer/menuitem.eb7d70008ce52e4b0ef1bd108bcd45f3/index.jsp?&pName=computer_level1&path=computer/homepage/misc/Brooks&file=index.xml&xsl=article.xsl&;jsessionid=Gyx5vsGNJL46Ghh2L8ycWWM2XGnDX5gq654cVWyFGnc4vn2WvHkL!-267347837


#3

Jason R. wrote:

I guess the best advice one can give is to ask questions. Give yourself
a
project that you know will make you dive into more of the language’s
features and don’t be afraid to admit that you don’t know.

Well, therein lies the rub. If I were to start with something in a new
language, say Delphi for the sake of argument, I might make a form, put
an edit box for user name and a push button, and say hello to the name
in the box. With something like that, I can build and make anything I
can dream up in the language.

I see nothing analogous in ruby (yet). I do not want to have command
line prompts that get ever more convoluted as the app progresses. I
need help finding the forest (the app). Trees (snippets and methods), I
can make.


#4

On Jul 26, 2007, at 2:52 PM, Lloyd L. wrote:

Now, when I write an app, I make an interface that has things for the
user to see with buttons to push and keep him playing happily. I find
that, without a regular interface, I am somewhat at a loss for making
usable applications. I am not any more interested in a purely command
line approach now than I was when i was writing batch files to do
it all
for me.

Pick one of Ruby GUI libraries and go with it. Currently, I’m using
Ruby/Tk, which has it pluses and minuses, but does the job. But the
are quite a few others out there to choose from.

That having been said, I am not finding the golden path to making
wonderful ruby apps with no easy interface. Even practicing with the
language is problematic as I never seem to write methods longer than a
couple dozen lines and that doth not an app make.

Can’t agree with this sentiment. Long methods do not an application
make. Applications are made by choosing the appropriate class
libraries, implementing a set of classes that model the problem
domain, providing the appropriate behavior to objects instantiated
from those classes by implementing methods (usually short) which are
highly leveraged on the class libraries. My methods tend to average
well under your “couple dozen lines”.

Regards, Morton


#5

On 7/26/07, Jason R. removed_email_address@domain.invalid wrote:

So you’re talking about IDEs and form builders? If you want to work with a
GUI, I’d suggest getting wxRuby: http://wxruby.rubyforge.org/wiki/wiki.pl

There’s no drag-and-drop WYSIWYG editor that I know of, but you really don’t
need one, and it doesn’t facilitate learning how to use the language
effectively.

Well, if you use GTK as your GUI library, there’s Glade. You can build
an interface with Glade and them hook it up to a Ruby program using
ruby-libglade2.


#6

So you’re talking about IDEs and form builders? If you want to work with
a
GUI, I’d suggest getting wxRuby:
http://wxruby.rubyforge.org/wiki/wiki.pl

There’s no drag-and-drop WYSIWYG editor that I know of, but you really
don’t
need one, and it doesn’t facilitate learning how to use the language
effectively.

Jason


#7

On Jul 26, 2007, at 2:52 PM, Lloyd L. wrote:

Where to I go to get a start on the larger side of ruby?

You might get some ideas from Ruby Q.zes 5, 104, and 129. The
participants in these quizzes implemented modest but complete
applications using a variety of UI techniques, both GUI and CL. I
mention these particular quizzes because I’m familiar with them.
There may be (and probably are) other quizzes that qualify as
complete applications by your standards.

http://www.rubyquiz.com/index.html

Regards, Morton

P.S. You might consider Rails.


#8

Indeed you should consider the web interface of Rails, GUI
interfaces: tk, wx,
even bridges RubyCocoa (write OS X apps in Ruby) for which there must
be a Windows analog.
Delphi is really not a language as much as a framework around a
language, isn’t it?


#9

Morton G. wrote:

On Jul 26, 2007, at 2:52 PM, Lloyd L. wrote:

That having been said, I am not finding the golden path to making
wonderful ruby apps with no easy interface. Even practicing with the
language is problematic as I never seem to write methods longer than a
couple dozen lines and that doth not an app make.

Can’t agree with this sentiment. Long methods do not an application
make. Applications are made by choosing the appropriate class
libraries, implementing a set of classes that model the problem
domain, providing the appropriate behavior to objects instantiated
from those classes by implementing methods (usually short) which are
highly leveraged on the class libraries. My methods tend to average
well under your “couple dozen lines”.

Well, I agree and I should clarify, therefore. The methods I write that
are a couple dozen lines or less are as far as I have ever taken ruby.
Applications require lots of such things stitched together into a whole.
Methods should be as terse as possible and, in the case of something
lengthy, they should be broken into smaller “bite sized” chunks which
makes things go better overall.

John J. wrote:

Delphi is really not a language as much as a framework around a
language, isn’t it?

Well, as Borland was pretty much the only real supporter of Pascal,
they, that is to say Anders H., did whatever he wanted with the language
making it unique. However, with the advent of the new management of
CodeGear, what you say is even more true as there is a Delphi for PHP
and they will be releasing a Ruby IDE in the near future.

This is what I was looking for. Thanks all! I will get on this ASAP.
:slight_smile: