Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 3.72 KB

rails-4-in-action.md

File metadata and controls

15 lines (9 loc) · 3.72 KB

@smolnar

TL;DR Rails 4 cooked for beginners getting familiar with Rails.

I asked for this book when I started implementing few Rails 4 projects hoping to get quick inside into new Rails 4 features from the eyes of core Rails developers. However, after few pages I realized that the book covers entire process of building Rails project only with the introduction of new Rails 4 features - hence the TL;DR reference. Anyway, I noticed from the first chapter that the books follows a common pattern of web tutorials similar to Michael Hartl explaining the entire setup of Rails enviroment with git and other resources needed for full Rails development. Therefore, the book is mostly intended for web developers starting with Rails or developers starting with web development.

First few chapters explain setup of Rails environment including git, bundler, rvm and so on. I think that the books covering the setup of environment are helpful, but in most cases users experience a problem closely related their environment and they end up searching steps for setup or resolving their error the on web anyway. The authors tried to remedy this by including links to resources explaining the steps of proposed setup, e.g. why using system Ruby in Ubuntu is a bad idea. After setup the authors jumps right into implementing web application with Rails without any explanation of Ruby as a programming language and they explain Ruby as they go. I think that learning Rails first without any previous experience with Ruby or any other programming language is a bad approach in the first place.

As I said, the book follows the pattern of a tutorial explaining Rails through building you own application from scratch. I really appreciate that the authors introduced TDD approach as soon as possible. Throughout the book they prefer writing acceptance testing using Capybara with Rspec for full-stack testing and then they boil down tests to simple unit specs if they are needed, e.g specs for models. Every chapter tries to cover just one feature and after finishing the chapter, the specs written in the beginning are passing. I guess that building application feature by feature with BDD using Capybara encourages novice developers to decouple the implementation into simple valuable parts and prefer Agile approach everytime - which is a good thing. Since the book covers the entire process of building a new application, authors also covered deployment or setting up development environment with vagrant - they might not provide the best reference, but it’s good to mention other possibilities of developing. I was concerned only about the git workflow they proposed, because in some cases they committed changes after getting the feature done including all views, models and so on, but I think that they should propose bigger granularity for commits, but that’s just my opinion.

Overall, Rails 4 in Action is not what I hoped it would be, but it’s still a pretty good reference for developers starting with Rails. Experienced Rails developers might not find this book helpful, since a lot of the parts explain workflow they already follow. As a Rails developer migrating from Rails 3 to Rails 4, I didn’t find a lot of interesting parts that I didn’t already see in talks or blogs explaining Rails 4 features, but even though I did find few conventions for models and controllers I didn’t really know about before. Therefore I think that Rails 4 in Action is a solid Rails 4 reference not only for beginners starting with Rails.