Strongly Connected Components

Notes from the folks at Pomelo.

A default skeleton for our Rails apps

leave a comment »

I read in the Release Notes for Rails 2.3 that there will be support for application templates. In their words:

Rails 2.3 incorporates Jeremy McAnally’s rg application generator. What this means is that we now have template-based application generation built right into Rails; if you have a set of plugins you include in every application (among many other use cases), you can just set up a template once and use it over and over again when you run the rails command. 

I’ve been waiting for that for a long time, and I am happy to see it coming in the new release –although I haven’t tested it yet, and so I don’t know how good & flexible the support will be. 

It was particularly interesting to find this announcement today because Jay and I have been working for a while on creating exactly that: a skeleton for a basic Rails app that includes the plugins/gems/controllers/behaviors that we use almost invariably in our applications. This includes:

  • Logging and user management. A branch off restful_authentication, but without requiring email confirmations for new accounts, and giving you the ability to change the password right on the ‘I forgot’ page (and then confirm via email).
  • Support for HTTPS in the login/signup windows.
  • A scaffolding builder of our own (non-restful –I know, I know, we’re sinners)
  • Support for conditional GETs in the controllers.
  • Basic CSS and layouts that we like.
  • ActionMailer already setup and with all the necessary views for login/signup.
  • Basic gems that we always use (acts_as_taggable_on_steroids, will_paginate, file_column, etc.)
  • A simple task manager that we use during development and hide during deployment
  • Credit Card management for some projects
  • A logging utility that we’re working on (more on this later!)

We are all for lightweight frameworks, but we’re finding that almost for every single project that we work on, all of these elements are necessary. It will save us a lot of time to get them right off the box, once we have our skeleton operational.

I am curious to know: do other people have skeletons like this one? What do people include there? 

 

Written by Agustín Schapira

February 25, 2009 at 7:03 pm

Posted in rails, web

Leave a Reply