[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Getting started with full sized apps... how?

Lloyd Linklater

7/26/2007 6:53:00 PM

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.
--
Posted via http://www.ruby-....

7 Answers

Lloyd Linklater

7/26/2007 8:24:00 PM

0

Jason Roelofs 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.
--
Posted via http://www.ruby-....

Morton Goldberg

7/26/2007 8:29:00 PM

0

On Jul 26, 2007, at 2:52 PM, Lloyd Linklater 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

R. Mark Volkmann

7/26/2007 8:38:00 PM

0



Bira

7/26/2007 8:40:00 PM

0

On 7/26/07, Jason Roelofs <jameskilton@gmail.com> 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/wi...
>
> 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.

--
Bira
http://compexplicita.bl...
http://sinfoniaferida.bl...

Morton Goldberg

7/26/2007 8:52:00 PM

0

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

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

You might get some ideas from Ruby Quizzes 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/...

Regards, Morton

P.S. You might consider Rails.

John Joyce

7/27/2007 1:16:00 AM

0

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?


Lloyd Linklater

7/27/2007 1:14:00 PM

0

Morton Goldberg wrote:
> On Jul 26, 2007, at 2:52 PM, Lloyd Linklater 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 Joyce 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.
:)
--
Posted via http://www.ruby-....