rails
(7,101 views)

Using BDD and generators to create a Rails app from scratch Screencast

Using some generators and a behavior driven approach, we create a simple Rails application with one resource and user authentication.

In this screencast we take a BDD (behavior driven development) approach to building a new Ruby on Rails application from scratch, using some nifty generators to bootstrap the application. The result is a basic setup that could be used as a starting point for full applications.

The application is built using several readily available generators, including Ryan Bates' nifty_layout, nifty_authentication and nifty_scaffold. The development is driven by a couple of little Cucumber scenarios which read like plain English stories, and rspecs. We use Authlogic for user registration and login (authentication).

Actually I did not set out to create this tutorial per se. Rather, this started as part of my introductory demo to SaasRamp, a new open-source plug-in for subscription based applications. The plug-in demo needed a dummy app to start from, but these details would be distracting to include there, so I extracted it (and filled in more details) becoming this screencast.

Code snippets

Some code snippets are pasted into files during the screencast, which I've posted in a gist at http://gist.github.com/189671

Also, I've saved the final little app we built in the screencast to http://github.com/linoj/demo-authapp

Download video

authapp-desktop.m4v (25mb)

Click to play

Comments

New Comment

markdown formatting permitted