Walter Mundt
Walter Mundt

Reputation: 25271

Where can I read about how Ruby on Rails is structured?

I've been looking at questions like these but I'm not really finding what I'm looking for. I'm a web developer with a fair bit of expertise in other environments (Java, Python, PHP, etc.) and I tried to pick up Rails awhile back. I was incredibly frustrated by the way the guides I found would say things like "put this line of code over there and look at the cool stuff that happens"...and then go on to the next cool thing, without ever explaining what was happening behind the curtains or what kinds of variations were possible.

What I want is a document that lays out what the major functional pieces of Rails are, and how they interact. I want it to tell me which things happen when a Rails app starts up or gets an HTTP request, in what order, and how it's all configured. Most of all, I want links to current API documentation describing the details and letting me see what kinds of things are possible. I want a plain listing of the directory structure of a Rails app, concisely describing all the conventions Rails is using to find my files, how it loads them, and what it expects to find in them.

I am not looking for a tutorial that makes tons of assumptions, a shiny example, a screencast, a video, or an overdose of faddish enthusiasm. Ideally I am looking for a website or a PDF rather than a book, but I'll take a book in a pinch.

Is there anything like that available? If not, how close can I get?

Upvotes: 2

Views: 95

Answers (2)

Mark Thomas
Mark Thomas

Reputation: 37507

When I was learning Rails, I found the book "Ruby for Rails" by David Black to have exactly that: a description of how Rails works, not just how to use it. It was wonderful. I am saddened to see that the book has not been updated to reflect more current versions of Rails. According to Manning, the book "The Well-Grounded Rubyist" is the new edition of Ruby for Rails, but it seems that it doesn't focus as much on Rails.

Upvotes: 0

rfunduk
rfunduk

Reputation: 30432

The Guides go a long way to covering the details... but if you want more than that, then I gotta tell you that in the Ruby community we generally just read code. If you want the deep details just git clone http://github.com/rails/rails.git and start poking around.

As for the conventions, they've been evolving over time and so it's hard to find solid info online about it. I suggest for deeper-than-the-guides overview stuff you grab the newest book you can find on Rails.

Even though you mentioned no screencasts, Railscasts is a great place to just go through every single one of the episodes to get a feel for some of the less explicit parts of Rails that you just sort of have to learn by experience.

Lastly, ask questions. If you need to know some specific piece (like where Rails 'finds your files') then just ask (e.g. on freenode in #rubyonrails).

Upvotes: 2

Related Questions