Book/Tutorial on Rails Internals?

I am looking for a book or tutorials that go more in depth on Rails
internals.

Specifically, examining the source code of the Rails framework/active
record/ action pack/etc.

I have read AWDR and Ruby For Rails. That plus being modest apps has
helped provide a foundation.

While I know that reading the source code is the ideal way to learn and
I have scanned some, I am not yet strong enough to be able to do so
efficiently.

As such a book or a tutorial could help speed up my ability to
understand the Rails source (for instance, the last chapter of Ruby for
Rails).

Any pointers on-line or off would be appreciated.

Thanks,

John

On 7 Feb 2008, at 07:24, John H. wrote:

While I know that reading the source code is the ideal way to learn
and
I have scanned some, I am not yet strong enough to be able to do so
efficiently.

As such a book or a tutorial could help speed up my ability to
understand the Rails source (for instance, the last chapter of Ruby
for
Rails).

I don’t know of any such book, but a big problem with it would that it
would very quickly become obsolete. Books etc… have enough trouble
staying on top of the externally visible (ie api etc…) changes, and
internal changes happen even more often. You can learn a lot though by
just stepping through it with a debugger (or just mentally, assuming
you can keep in your head enough of the current state). Pick some
specific bit of functionality and follow it all the way through. It
should get easier as you get more familiar with the source.

Fred

I’m not sure if it’s exactly what you’re looking for, but “The Rails
Way” by Obie F. (http://www.informit.com/store/product.aspx?
isbn=0321445619) is a great more in-depth look at rails & it’s idioms.

On Feb 7, 7:24 am, John H. [email protected]

On Feb 7, 2008, at 8:24 AM, John H. wrote:

and
I have scanned some, I am not yet strong enough to be able to do so
efficiently.

As such a book or a tutorial could help speed up my ability to
understand the Rails source (for instance, the last chapter of Ruby
for
Rails).

+1 to the other two replies.

I’ve done talks about Rails internals for 1.1 and 2.x and they were
based on code walkthroughs on some particular revision and help from
rails-core to understand why some things were done that way. The last
one from November 2007 is online:

 http://www.hashref.com/talks/rails-desde-el-codigo-2007/index.html

It’s Spanish but it is mostly code.

– fxn

Hi –

On Thu, 7 Feb 2008, Frederick C. wrote:

understand the Rails source (for instance, the last chapter of Ruby
should get easier as you get more familiar with the source.
That’s what I did in that last chapter – basically stalking
#belongs_to through the source code. The source definitely does change
a lot over time, so mainly one wants to learn techniques for how to
navigate it, rather than trying to master or memorize every particular
of it. (At least, my brain is better at the learning to navigate thing
:slight_smile: It can be daunting but with a little guidance people usually end
up discovering that lots of it is much more accessible than they’d
thought.

David


Training for 2008!
Ruby on Rails training by David A. Black/Ruby Power and Light, LLC:
* Intro to Rails, New York, NY, February 4-7 2008
* Advancing With Rails, New York, NY, February 11-14 2008
Hosted by Exceed Education. See http://www.rubypal.com for details!

As a follow up, I have been reading Russ Olsen’s “Design Patterns in
Ruby” and am learning a lot from it.

For Rails specifically, there is 1 chapter that explains how the adapter
pattern can be used to enhance convention over configuration.

It is very helpful and exciting to use debugger such as ‘ruby-debug’
when you read through the source codes.

Using the debugger, when reached a debug point you set, rails
execution pauses and you can see what value each variable has, how the
frame stack is, etc.

To do that, in Rails 2.0.2, just write ‘debugger’ in your source code
wherever you want to insert a break point, then start the web server
with ‘script/server -u’

In Rails 1.2.x, you also have to write
require ‘ruby-debug’
at the end of config/environments/development.rb
while starting the web server with ‘script/server’

Good luck!

On Wed, 27 Feb 2008 17:10:18 +0900, K.Kuroda wrote:

Using the debugger, when reached a debug point you set, rails execution
pauses and you can see what value each variable has, how the frame stack
is, etc.

To do that, in Rails 2.0.2, just write ‘debugger’ in your source code
wherever you want to insert a break point, then start the web server
with ‘script/server -u’

Thanks :slight_smile:

-Thufir

Jamis B. has dissected a number of Rails components over on his blog
at http://www.jamisbuck.org/.

Specifically I know his routing walkthrough was really good.

–Jeremy

On Feb 7, 2008 2:24 AM, John H. [email protected]
wrote:

While I know that reading the source code is the ideal way to learn and

Thanks,

John

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


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book

My blogs:

http://www.rubyinpractice.com/

Are you already done learning ruby first ?