Vegas

screenshot of Vegas

template application demonstrating how to get Rails 3 pluggability without waiting for Rails 3 (Sinatra FTW)

Overview

"Rails is so last year..or, "How to get Rails 3, today," is an article written by Alex Chaffee that explores the limitations of Rails as a web application framework and introduces an alternative approach called Vegas. The author discusses various aspects of Rails, such as the router/dispatcher, controllers, views, utilities, caching, helpers, and ORM. They also highlight the drawbacks of Rails and propose using Sinatra, Erector, ActiveRecord, and minimal glue to build web applications instead.

Features

  • Clear routing DSL: Vegas uses Sinatra, which provides a straightforward routing domain-specific language (DSL) for defining routes.
  • Erector OO view framework: Vegas utilizes the Erector gem for building object-oriented views in a more modular and reusable manner.
  • ActiveRecord: Vegas leverages ActiveRecord, making it easy to work with relational databases and benefit from features like migrations.
  • Customizable components: The author suggests creating activescaffold-like components for Erector to enable rapid development of administrative or quick-and-dirty sites.
  • Gem-based plugins: Unlike Rails, where plugins are not necessarily gems, Vegas encourages the use of gems for plugins, providing better standardization and ease of management.
  • Automatic class loading and reloading: Vegas includes "reqrun.rb" (or "rake run") to reload the entire application when there are changes to the filesystem, making development more efficient.

Summary

In this article, Alex Chaffee presents Vegas as an alternative to Rails, emphasizing the limitations and shortcomings of Rails as a web application framework. By utilizing Sinatra, Erector, ActiveRecord, and other tools, Vegas aims to provide a more minimalistic and flexible approach to building web applications in Ruby. The features of Vegas, such as its clear routing DSL, use of gems for plugins, and automatic class reloading, offer developers a different perspective on web development and encourage exploration beyond the traditional Rails framework.