An introduction to Rails - Ruby on Rails Tutorial

August 6, 2014

About a month ago I wrote about Michael Hartl’s Ruby on Rails Tutorial. I finished the tutorial over the weekend and thought I would share my thoughts.

Here is the table of contents:

Michael starts off by getting a simple application created and deployed to Heroku within the first chapter. Deploying a web application this fast was simply awesome, quickly you realize that the deployment story is going to be a sweet one. You are no longer worried coming from platform X that the barrier to entry is going to be enormous.

Chapter 2 has you creating a new demo Rails application using the scaffolder however Michael quickly tells the reader that relying on the scaffolder will not teach you Rails and to become a good Rails developer you will need to learn how a Rails application is put together.

In Chapter 3, you start building out a Twitter clone (if you didn’t know Twitter previously was a Rails backed DB application). You start building out a few pages that will not have any / much dynamic content.

Chapter 4 is all about Rails and Ruby; it has been said before that the barrier to entry to Rails is very low. Rails is much more a DSL over Ruby, and it’s very easy to pick up what is going on. That being said to be a truly great Rails developer you will need to know Ruby fairly well.

Chapter 5 is a lot of fun working with SASS you learn how to put together and edit stylesheets in a more programmatic way. I have looked at LESS and SASS before but never done much with it until this tutorial. Let it be known that with this tutorial does not make you a Rails guru, it’s a great introduction but you won’t come away from this tutorial ready to build the next Facebook or Twitter.

Chapter 6 starts getting into Models and ActiveRecord you really start writing a ton of tests at this point. Michael has a very straightforward approach to testing that I like it makes a lot of sense, and the tools available in Ruby makes this a very pleasant experience.

Chapter 7 has you build the sign up process and show the user’s profile that leads nicely into Chapter 8.

Chapter 8 is all about creating a custom security system for the Twitter clone. Some might say just use Devise or another authentication and authorization library. As the author states, most sites require quite a bit of customization when it comes to security systems. Modifying third-party libraries sometimes entail more work than rolling your own. Also, its good to know how these sort of systems work and what better way to find out than rolling your own.

Chapter 9 gets you going with CRUD operations on the user; this is done via Rails design to match REST verbs. If you don’t know what REST is, this is the chapter where some of the mysteries are unveiled.

Chapter 10 finally gets you to the real part of the clone, the mircoposts. The reader is introduced to associations in this chapter and a few partials are built too. After this chapter the application comes to life, you get to login to the application and post various messages like you do on Twitter.

Chapter 11 the final chapter, the last chapter covers following and unfollowing users. It is by far the most intense chapter and deals with associative tables and the use of raw SQL to do some of the magic.

Throughout the whole tutorial you are writing tests TDD style, you are working with views, partial views, stylesheets, GIT is used heavily through the tutorial and during most chapters you are doing database migrations.

This tutorial was awesome. I had a great time working through it; however, my time with the Ruby on Rails Tutorial is not over yet. I still have the videos to watch and would like to complete the exercises provided in the last chapter.

All in all a great tutorial and I highly recommend it.


Discussion, links, and tweets

My name is Deon Heyns and I am a developer learning things and documenting them in realtime. Python, Ruby, Scala, .NET, and Groovy are all languages I have written code in. I appeared in the New York Post once. I host my code up at GitHub and Bitbucket so have a look at my code, fork it and send those pull requests.

comments powered by Disqus