[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Rails for the Rubyist

Gavin Kistner

9/25/2006 11:06:00 PM

It's very nice that DAB has written "Ruby for Rails", which (as I
understand it) helps Rails developers learn Ruby.

What's the best source for the opposite? Learning Rails for those who
already know Ruby? I'm frustrated by the number of intro tutorials to
rails that have things like "I learned that @foo is called an 'instance
variable'".

I'm not sure what form this should take, but some insight into the
inner workings (dispatch diagrams, how/when rails reloads files, etc.)
seem to be in order.


While I'm asking for some me-centric stuff, how about the best resource
for "Rails for the veteran web developer who's used to rolling every
bit of HTML and CSS and JS by hand and is having trouble learning to
re-use existing helper methods, and is instead spending gobs of time
writing 'convenience' methods when that time should be spent cranking
out the site." :)

20 Answers

Philip Hallstrom

9/25/2006 11:16:00 PM

0

Paul Lynch

9/26/2006 1:22:00 AM

0

On 26 Sep 2006, at 00:10, Phrogz wrote:

> What's the best source for the opposite? Learning Rails for those who
> already know Ruby? I'm frustrated by the number of intro tutorials to
> rails that have things like "I learned that @foo is called an
> 'instance
> variable'".

I spent time banging my head on the desk when I was trying to pick up
Rails, too. Plus I suffer from terminal overdose of cuteness
whenever I come within 20 yards of those "Head First" books.

> While I'm asking for some me-centric stuff, how about the best
> resource
> for "Rails for the veteran web developer who's used to rolling every
> bit of HTML and CSS and JS by hand and is having trouble learning to
> re-use existing helper methods, and is instead spending gobs of time
> writing 'convenience' methods when that time should be spent cranking
> out the site." :)

Yup, that's me!

Agile Web Development with Rails (2nd Ed) is going to be your answer,
but I think you'd enjoy Ruby for Rails, too; I know I did.

Paul

Matt Todd

9/26/2006 3:19:00 AM

0

> > What's the best source for the opposite? Learning Rails for those who
> > already know Ruby? I'm frustrated by the number of intro tutorials to
> > rails that have things like "I learned that @foo is called an
> > 'instance
> > variable'".
> > While I'm asking for some me-centric stuff, how about the best
> > resource
> > for "Rails for the veteran web developer who's used to rolling every
> > bit of HTML and CSS and JS by hand and is having trouble learning to
> > re-use existing helper methods, and is instead spending gobs of time
> > writing 'convenience' methods when that time should be spent cranking
> > out the site." :)


Here is a little diagram I created specifically for my MVC framework
(one I wrote for PHP5) which is very similar to Rails:

http://c.anvas.es/docs/images/flow_of_a_r...

As far as learning Rails, just gleaning through the Agile Web Dev w/
Rails book is probably your best bet, and experimenting. I know the
Rails Recipes book is really good, though, and will answer a lot of
the questions you might have as well. It's learning by example.

M.T.

Reprisal

9/26/2006 4:26:00 AM

0

Rails Recipe's was my thought too. It's basically walks you through
solid approaches to various problems, you'll recognize most
everything, but will help you get your mind on the right track. I
still find my AWD to be a very useful resource. Additionally there
is a wealth of information online, especially look for open source
rails apps, download the whole thing and read the source. What you
don't understand look up in AWD.

Rick DeNatale

9/26/2006 8:04:00 PM

0

On 9/25/06, Paul Lynch <paul@plsys.co.uk> wrote:
> On 26 Sep 2006, at 00:10, Phrogz wrote:
>
> > What's the best source for the opposite? Learning Rails for those who
> > already know Ruby? I'm frustrated by the number of intro tutorials to
> > rails that have things like "I learned that @foo is called an
> > 'instance
> > variable'".
>
> > While I'm asking for some me-centric stuff, how about the best
> > resource
> > for "Rails for the veteran web developer who's used to rolling every
> > bit of HTML and CSS and JS by hand and is having trouble learning to
> > re-use existing helper methods, and is instead spending gobs of time
> > writing 'convenience' methods when that time should be spent cranking
> > out the site." :)
>
> Yup, that's me!
>
> Agile Web Development with Rails (2nd Ed) is going to be your answer,
> but I think you'd enjoy Ruby for Rails, too; I know I did.

I haven't seen Ruby for Rails, so I don't know the balance between
Ruby and Rails. I've heard good things about it, but is it really the
right choice for someone who already knows Ruby and is trying to learn
rails?

I've found that, as in development, an incremental or spiral approach
works best for me.

When I first heard about Ruby, I focused on the language and worked
through the on-line version of the first ed of the Pickaxe. Then I
got interested in Rails, and bought Agile Web Development. Then I
bought the Pickaxe and got really serious about the language.

Now I'm working through the new edition of AWDWR, and rather than just
slavishly following Dave's examples, I'm playing with them, using the
Ruby knowledge that I've acquired, and seeing how it works in Rails.


--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

Paul Lynch

9/26/2006 9:19:00 PM

0

On 26 Sep 2006, at 21:04, Rick DeNatale wrote:

> On 9/25/06, Paul Lynch <paul@plsys.co.uk> wrote:
>> On 26 Sep 2006, at 00:10, Phrogz wrote:
>> > While I'm asking for some me-centric stuff, how about the best
>> > resource
>> > for "Rails for the veteran web developer who's used to rolling
>> every
>> > bit of HTML and CSS and JS by hand and is having trouble
>> learning to
>> > re-use existing helper methods, and is instead spending gobs of
>> time
>> > writing 'convenience' methods when that time should be spent
>> cranking
>> > out the site." :)
>>
>> Yup, that's me!
>>
>> Agile Web Development with Rails (2nd Ed) is going to be your answer,
>> but I think you'd enjoy Ruby for Rails, too; I know I did.
>
> I haven't seen Ruby for Rails, so I don't know the balance between
> Ruby and Rails. I've heard good things about it, but is it really the
> right choice for someone who already knows Ruby and is trying to learn
> rails?

I said that I think he would enjoy it - because it avoids the "gee
whiz" web designer approach to the essential Ruby core of Rails, and
does manage to explain various aspects of Rails from a Rubyphile
perspective.

> I've found that, as in development, an incremental or spiral approach
> works best for me.
> ...
> Now I'm working through the new edition of AWDWR, and rather than just
> slavishly following Dave's examples, I'm playing with them, using the
> Ruby knowledge that I've acquired, and seeing how it works in Rails.

The latest edition is looking to become radically different from the
first, in a good way.

Paul

Steve Tangsombatvisit

9/26/2006 9:51:00 PM

0

From: spammer.sbt@gmail.com
Bcc:
Message-ID: <AVSPAMHfyQgeDKvPEkG0000020d@avspam.lyris.com>
X-OriginalArrivalTime: 26 Sep 2006 21:51:04.0217 (UTC) FILETIME=[DD253090:01C6E1B5]
Date: 26 Sep 2006 14:51:04 -0700

Hi everyone,

I was just wondering if anyone can recommend a good image capture
library/package that can be used with Ruby/Watir? We need to do pretty basic
image capture like capture a specific window, or a specific frame within a
window and then save the image as a bmp or jpg file.

Thanks in advance,

Steve Tang



Gavin Kistner

9/27/2006 3:36:00 PM

0

Paul Lynch wrote:
> On 26 Sep 2006, at 00:10, Phrogz wrote:
>
> > What's the best source for the opposite? Learning Rails for those who
> > already know Ruby? I'm frustrated by the number of intro tutorials to
> > rails that have things like "I learned that @foo is called an
> > 'instance variable'".
[snip]
> Agile Web Development with Rails (2nd Ed) is going to be your answer,
> but I think you'd enjoy Ruby for Rails, too; I know I did.

I just bought the PDF, and I'm not very far into it, but I've already
found this section:

"In the description of views and controllers, we showed the controller
setting the
time to be displayed into an instance variable. The .rhtml file used
that instance
variable to substitute in the current time. But the instance data of
the controller
object is private to that object. How does ERb get hold of this private
data to
use in the template?

The answer is both simple and subtle. Rails does some Ruby magic so
that
the instance variables of the controller object are injected into the
template
object. As a consequence, the view template can access any instance
variables
set in the controller as if they were its own.

Some folks press the point: "just how do these variables get set?"
These folks
clearly don't believe in magic. Avoid spending Christmas with them."

Very amusing, but exactly the sort of explanation and attitude that I
was hoping to avoid. Ah well; certainly other good information in it so
far. (I'm also discouraged by the appearance that the book takes the
track of "If you use an RDBMS other than MySQL, it'll mostly work, but
you're on your own when you run into trouble.")

Patrick Spence

9/27/2006 4:23:00 PM

0

Steve Tangsombatvisit wrote:
> From: spammer.sbt@gmail.com
> Bcc:
> Message-ID: <AVSPAMHfyQgeDKvPEkG0000020d@avspam.lyris.com>
> X-OriginalArrivalTime: 26 Sep 2006 21:51:04.0217 (UTC)
> FILETIME=[DD253090:01C6E1B5]
> Date: 26 Sep 2006 14:51:04 -0700
>
> Hi everyone,
>
> I was just wondering if anyone can recommend a good image capture
> library/package that can be used with Ruby/Watir? We need to do pretty
> basic
> image capture like capture a specific window, or a specific frame within
> a
> window and then save the image as a bmp or jpg file.
>
> Thanks in advance,
>
> Steve Tang

We're using TechSmith's SnagIt to capture screenshots during the
automated test runs. SnagIt can function as an OLE automation server,
saves the images to a file, clipboard. You can capture an entire screen,
a region of the screen, a scrolling web page, you name it. I've written
a ScreenCapture class that encapsulates all the COM stuff.

A fully functional 30-day trial version can be downloaded from here...
http://www.techsmith.com/download/snagi...

The COM server examples and documentation can be found here...
http://www.techsmith.com/download/de...


--
Posted via http://www.ruby-....

Richard Conroy

9/27/2006 4:43:00 PM

0

On 9/27/06, Patrick Spence <patrick@pkspence.com> wrote:
> > Hi everyone,
> >
> > I was just wondering if anyone can recommend a good image capture
> > library/package that can be used with Ruby/Watir? We need to do pretty
> > basic
> > image capture like capture a specific window, or a specific frame within
> > a
> > window and then save the image as a bmp or jpg file.

I thought that WATIR already had some basic screencapture stuff built-in?

Probably quite primitive though.