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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not sure if it''s exactly what you''re looking for, but "The Rails Way" by Obie Fernandez (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 Honovich <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 7 Feb 2008, at 07:24, John Honovich wrote:> > 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). >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> > Any pointers on-line or off would be appreciated. > > Thanks, > > John > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 7, 2008, at 8:24 AM, John Honovich wrote:> 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).+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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi -- On Thu, 7 Feb 2008, Frederick Cheung wrote:> > > On 7 Feb 2008, at 07:24, John Honovich wrote: > >> >> 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). >> > 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.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 :-) 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! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jamis Buck 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 Honovich <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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 > -- > Posted via http://www.ruby-forum.com/. > > > >-- http://www.jeremymcanally.com/ My books: Ruby in Practice http://www.manning.com/mcanally/ My free Ruby e-book http://www.humblelittlerubybook.com/ My blogs: http://www.mrneighborly.com/ http://www.rubyinpractice.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 :) -Thufir --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---