Close and Go BackBack to Viget

Rails Training with Chad Fowler

Patrick Reagan
Patrick Reagan, Development Director, January 24, 2007 0

We covered a lot of ground in the 3-day training course that we planned with Chad Fowler.  Much of the material is still sinking in for most of us, but we gleaned a lot of really good information and tips from the event.  Some highlights from the three days based on my notes:

  • Blocks - Methods that accept blocks can use this construct to clean up after the fact.  The File.open and open (as part of open-uri) both accept blocks to automatically close the stream when finished.
  • Mix-ins - Using modules provides a handy way to re-use functionality inside different classes.
  • RESTful development - This is a big area of interest for us especially since Rails 1.2 was just officially released last week.  We’re already looking forward to using the ResourceFeeder plugin with ‘respond_to’ to handle the RSS feeds we previously created by hand.
  • Routing - Though the material we covered about named routes existed in Rails 1.1.6, many of us hadn’t made full use of it yet – something that we will be leaning on more as we push for more meaningful URLs
  • Testing - We’re already actively using unit and functional tests (and have been for quite a while), but the intro to Selenium that Chad did really blew us away!  We’re planning to use the Selenium IDE plugin to Firefox to allow project managers to create their own regression test suites.
  • Advanced ActiveRecord - Association scoping is extremely useful to us and promises to clean up our controllers by refactoring logic back into the models.  Because of the “leaky abstractions” in Rails, we’re now using Nathaniel Talbott’s Query Trace plugin to see where we should be auto-loading associations.
  • Debugging Tips - Since ‘puts’ doesn’t work as you might think in your controllers and views, Chad gave a couple really useful tips:  add a single ‘raise’ call in your controller to inspect the state of your app or drop a call to ‘debug(var)’ into your view.  For more advanced debugging, we saw the full power of using ‘script/breakpointer’ to interact with controllers from an IRB console.
  • ActionMailer - We’ve been using ActionMailer for a while to send out emails from web apps, but the process for reading incoming mail is shockingly simple (much less involved than my previous PHP solution).
  • Performance - As we need to increase performance with Rails apps, we will now start looking at pushing session and fragment storage to memcached and pass off resource intensive processing to BackgrounDRb.
  • AJAX - Besides looking at RJS, we were introduced to the observe_form and observe_field magic to create auto-updating displays (useful for live searching).

Thanks to Chad for coming out and giving an excellent training session, and to both David Bock and FGM for their hospitality in opening up the space to us on such short notice.

Chad will be giving a couple of talks at The Rails Edge Conference this week that will make for a good continuation of some of the topics we covered in the class.  Ben and I will be attending all three days, so if you’re a Rails developer looking for a full-time gig, let us know.

Trackback: Viget’s Four Labs » Blog Archive » ComputerWorld Lists Ruby on Rails as a Top 5 Te on 03/06 at 08:04 AM [...] we had a good basis from which to start, we didn’t go it alone. Between formal training for the development team and our involvement with various Ruby communities, we’ve made [...]----- [...] As Mark mentioned in his latest post, most of our previous applications have been built with PHP (including Squidoo). Despite all our years of collective PHP experience, we made the decision to switch new development to Rails less than a year ago. In that time, we’ve hosted a training session, attended a conference, connected with other developers in the community, and even had one of our top developers selected to speak at this year’s RailsConf. [...]----- [...] We agree.  We evaluated Rails for a while (with some prodding from Ben), ramped up the whole team through training, events, hiring, and internal work, and now focus most of our new development projects on the Rails framework.  In addition to working on some large sites, we’ve recently launched a couple of smaller ones (example: funside.com) and found that even though Rails was designed more for web apps than mostly-static-content sites, it still offers advantages over a traditional LAMP (as in PHP) solution.  Hence Ben’s talk coming up at RailsConf this year: Building and Working with Static Sites in Ruby on Rails. [...]-----

Name:

Email:

URL:

Not a robot? Prove it by entering the word below.


Remember my personal information

Notify me of follow-up comments?

A Development Community for Viget Labs and Beyond

Every team member here at Viget Labs strives to be an innovator. We members of the development team are no different - that's why we're constantly engaging in community discussions and exploring the unknown that is the next generation of open-source web applications.

Viget Is Hiring!

Viget has job openings for Ruby Developers, Interns, and Front-End Developers. Learn More »

Recent Comments

Smashing! Thanks for outlining what’s needed to be done so precisely :-)