Review: Agile Web Development With Rails, Fourth Edition (Part I)

With a full house of kids, I don’t get as much of a chance to dabble in technologies that I’m not using at work.  So, I am much more selective in what I choose to learn.  I also seemed to be moving jobs enough and bouncing back and forth between the JVM (Java, Groovy) and the CLR (VB.Net, C#) that I was already expanding my language horizon on an annual basis.  While, I’ve been watching Rails from a distance for quite some time, I never seemed to have the bandwidth to take the jump and force myself to sit down and learn it.  For whatever reason, I’ve decided that now is the time.  After asking several friends which book to start with, I settled on Agile Web Development with Rails [PragPress].

Disclaimer:  As of this writing, the fourth edition is still in beta as is Rails 3.  I know the book is a work in progress, but I am reviewing it as-is.

Summary

The purpose of this blog post is to review Part I: Getting Started.  Part I is divided into four chapters: “Installing Rails,” “Instant Gratification,” “The Architecture of Rails Applications,” and “Introduction to Ruby.”  These first four chapters are intended to lay the foundation needed to understand the deeper material covered in the rest of the book.  Additionally, they serve to whet the appetite of the reader by walking him through some very basic examples.

Chapter 1: Installing Rails

When I first started looking at Rails, I was using the third edition of this book and installing Rails 2.  At the time, I was using my Windows 7 box.  I found the walk through for installation to be helpful and complete for getting Rails up and running on Windows.  This time around, I decided to go with my Ubuntu linux environment.  I still needed to install both Ruby and Rails.  And again, I found the guides to be very helpful to get things running.  One section that I found a bit jarring was the sidebar entitled, “Upgrading RubyGems on Linux.”  This sidebar lists several methods for upgrading RubyGems for different versions of RubyGems and different linux distributions.  The slightly odd part is that there is no explanation for which method is needed for which setup.  Perhaps this is because there are so many linux distributions out there that listing them all would take another page (or more).  Regardless, I found it odd that I was encouraged to keep trying the different methods until I found “the one that works for [me].” 

The authors have also thoughtfully included a section discussing different editors and integrated development environments (IDE’s) that are available.  When I first read this section in the third edition, I learned about a nice text editor for Windows that I didn’t know existed (E-TextEditor).  This time around, I decided to stick with my linux text editor of choice.  I briefly looked at using an IDE like RubyMine, but the Rails 3 version is still in beta (since Rails 3 is as well).  I decided that sticking with a bare editor was fine for learning.  I’m a command-line junkie anyway.

Overall, I found the installation guide to be plenty thorough.  Perhaps that’s because I intended to work with all of the defaults (including sqlite for a database).  Perhaps if I would have deviated more from the happy path, I would have had more of a problem.  Then again, the authors have done a good job at pointing the reader to the necessary, external resources when they choose to step away from the default installation.

Chapter 2: Instant Gratification

In 13 pages, the reader is walked through creating a Hello, Rails application.  This allows the reader to quickly experience the power and simplicity of Rails.  Because the chapter accomplishes its goal very well, I don’t have much to mention.  By the end of the chapter, the reader can have a very simple Rails application running in their development environment and handling requests.  There are plenty of screen shots in just the right places, and I was never left with a question as to how to do something.

Chapter 3: The Architecture of Rails Applications


This chapter covers the basics of the Rails architecture.  Models, Views, and Controllers are each discussed in turn.  The basic request pipeline is described and illustrated. Additionally, there is a brief explanation of ActiveRecord.  The chapter does a good job of teaching where different code concerns go within the architecture.  The responsibilities of the Model, View, and Controller are covered well.  Perhaps my reading of this chapter is skewed because I’ve worked with multiple MVC platforms already.  However, I found that the topics were covered in sufficient (brief) detail.  By the end of the chapter, the reader has a good idea of how the various files are laid out within a Rails application and what responsibilities are addressed by each of the major components of the system.

Chapter 4: Introduction to Ruby


This chapter is new for the fourth edition, and I found it to be a very welcome addition.  Having never coded in Ruby before, I found this chapter to be quite informative.  The authors assume that the reader knows nothing about Ruby.  Since I am squarely in the target audience for this chapter, I can honestly say that I learned a great deal here.  The authors have covered object-orientation, data types, logic, and structures. 

The authors also cover a small set of Ruby idioms.  I found this to be very helpful since the bulk of my programming experience is in static languages.  The coverage of Ruby idioms is only slightly longer than a single page, but I’ve already found it useful.

Conclusion


So far, I’ve found this book to be a very enjoyable, informative read.  I look forward to continuing on (and to posting some reviews).

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Eric Anderson

Eric has 6 years experience in software development with the last 3 being in Agile shops. He is now spreading the Agile love as a Senior Consultant with Headspring Systems in Austin, TX. Eric loves to share his passion for software development, especially Test-Driven Design, with anyone that will listen. Eric is also a Hudson Continuous Integration fanboy. He recently published “Hudson Continuous Integration Server” in the May/Jun ‘09 issue of C.O.D.E. magazine to help .Net’ers get started with Hudson. Outside of software, Eric’s passions include his family (wife, son, 2 daughters), fixing things around the house, and volunteering with various local churches and organizations.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

3 Responses to Review: Agile Web Development With Rails, Fourth Edition (Part I)

  1. Erik..

    The purpose of the book is to focus on the Rails framework – not Ruby per se. Several times in the book, Sam Ruby, Dave Thomas and David H. Hansson cite to the Picaxe Book and refer readers to that resource for a more in depth discussion of Ruby. I would also suggest that folks check out the Metaprogramming in Ruby book from the Prag Prog.

    Not sure which version of the book you were going through. As of now, there have been 4 beta revisions of the book. The big change in 4th version, which is not that big of a change, the new key word was added. So..when you create a rails app:

    rails new myappname. It should also be pointed out that

    One other thing, folks probably want to stick with Ruby 1.8.7. I don’t believe the latest beta works with Ruby 1.9.1, but reports are, it works with 1.9.2. Per the release notes, there are still bugs and stability issues. Hence – sticking with 1.8.7 is probably a good idea.

  2. @John

    Thanks for the comments.

    The 4th beta came out just after I wrote this post. I’ve switched to the fourth beta for the next section.

    I agree that a more extensive Ruby book is in order. However, I was also happy that there was enough Ruby (now) to get me through the Rails material in the first section.

  3. If you want to work through some great excercises, check out the Edgecase Ruby Koans on Git.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>