News flash, writing a Rails app without knowing your routes is pretty much impossible, and this just in
$ rake routes
takes forever [1] to run. So how can we build a Rails site with a
minimum of time and a maximum of awesome? You can use the recently released Sextant Gem [2] to generate routes in your Rails app.
What exactly is OAuth, and how can you use it to access data on sites like Facebook? This introductory video explains the basic flow behind OAuth 2 and how OAuth Clients are implemented.
Ever want to write an App that uses the Facebook graph? You could be the next Zynga, Foursquare, or Causes; but first you need to create your app. This quick demo shows getting started by generating an app through Facebook and then editing it. If you’ve already got a working web app it’s simple to add Facebook functionality to it, though we’ll save that for another day. What are you waiting for, five minutes from now you could have your very own live Facebook App!
Starting today Heroku will allow you to specify a version of Ruby in your production app. As one of the most requested features we have been asked for time and time again, we’re happy to announce that it’s now live. To get started you’ll want to update your version of Bundler locally to version 1.2.0, or above.
Wicked was featured by Ryan Bates on Railscasts this past week. I’ve learned quite a bit over the years from Railscasts, so it’s a great honor to have my work featured there.
The cats out of the bag, Ruby isn’t immune to legacy code problems. Just because your app is written in a hip, fun, and dynamic language doesn’t mean that your codebase can’t stagnate, bloat, and quickly turn into an unmaintainable ball of mud. Before Gowalla was purchased by Facebook, the Rails code base stood at close to seven thousand files, with the largest model clocking in at around 3,500 lines of code. While we were somewhat unique, being originally written in Merb and then ported to Rails, applications of this size aren’t all that uncommon. If you’ve got a large app there are a number of things you can do make your situation better, one of the simplest with the greatest impact is splitting up models into concerns.
My good friend @mattt just released this great tutorial for creating an iOS Photo-Sharing app on Rails. You should hop, skip, or jump on over to the article now. What are you waiting for?
Right out of the gate, Ruby gives us some powerful ways to re-use instance and class methods without relying on
inheritance. Modules in Ruby can be used to mixin methods to classes fairly easily. For example, we can add new
instance methods using include
.