Survey of Rails Example Applications

UPDATE FOR RAILS 3.0: After seeing what was available, I began developing my own Rails example apps. They’ve become quite popular, judging from the number of Rails developers visiting the GitHub repo. Each is accompanied by a detailed tutorial and an application template that can be used to generate a starter app. You can find them here.

THE ORIGINAL POST (from February 18, 2008):

I’m a firm believer that, as software developers, we always are standing on the toes of those who have gone before us.

So, in that spirit, I’m looking around for Rails example apps that I can use as a starting point for my own.

Many Rails books introduce Rails development through the process of building an example application. The best-documented Rails example apps are the ones in the books. I’ve looked through the books I have at hand. Most of the apps in the books are overly simple (for example, no authentication) or dated (no RESTful architecture).

I looked closely at RailsSpace. The authors Michael Hartl and Aurelius Prochazka fully document the steps to building a typical social networking web site. It is a full-featured app that is more complete than most tutorial applications. Unfortunately, the book was written before RESTful architectures became de rigueur. Only one part of the app is RESTful. Otherwise it might be suitable. UPDATE: Michael Hartl, one of the authors of RailsSpace, is leading development of an open source social network app, named Insoshi, which improves on RailsSpace.

I also looked at RailsCoders, the example app from the book Practical Rails Social Networking Sites, published by Apress. It’s a full-featured app and it is RESTful. The author chose to implement his own authentication (using RESTful principles); I would prefer to use the restful_authentication plugin. The app was written for Rails 1.2.3, not Rails 2.0, but an upgrade is relatively easy.

How about open source projects? I looked at a few.

I’ve used the Caboose Sample rails application on other projects, so that’s a potential starting point. The downside? It’s complex and not well documented. (The authors warn, “much of the code is targeted at an intermediate/advanced level”.)

A promising beginning point appears to be the Altered Beast forums application, a newer version of Beast. It’s RESTful. It uses Rails 2.0, rspec, and restful_authentication (with the acts_as_state_machine option). I also liked LovdbyLess, a free open source social network platform. It uses Rails 2.0 but not rspec or restful_authentication.

I posted here to ask for more recommendations.

UPDATE: I found an interesting example app named Jumpstart from the people at Relevance Inc. There’s also kickstart-rails from Mislav Marohnić. And I found RailsStarterApp from David Andrew Thompson and Six Hour Startup.

UPDATE: There’s a new site (announced here) that provides a gallery of open source rails applications. Great idea! And a good place to look for apps that can be studied, adapted, or improved.

UPDATE: I’ve released my own Rails RESTful Authentication Example Application.

Advertisements

3 Responses to Survey of Rails Example Applications

  1. Neil says:

    Check out Insoshi. It’s a YC funded startup by one of the RailsSpace guys; they’re hoping to do for social networks what MySQL has done for databases. And after a quick scan through the code (I haven’t looked at the app in a little while), it all looks pretty RESTful.

  2. […] I’m primarily interested in finding an app that is written for Rails 2.0, that implements a RESTful architecture, and uses RSpec for specifications/testing. Optimally, it should implement authentication (using restful_authentication) and authorization, provide an interface for users to manage their accounts (or profiles), and provide a rudimentary administrative interface for adding or deleting users. I’ve looked at a number of open source apps (see the post Survey of Rails Example Applications). […]

  3. […] Merb Example Apps I’ve looked at a number of open source Rails apps that can be used as a starting point for a project (see the post Survey of Rails Example Applications). […]

%d bloggers like this: