B.2. Camping

Camping is a Ruby web framework, written in 60 lines of extremely dense code. Its home page is http://code.whytheluckystiff.net/camping. You can download Camping as a gem, either by itself or in a bundle that includes SQLite, ActiveRecord, Mongrel, RedCloth, and the Acts As Versioned plugin.

A Camping application is a Ruby script that calls the framework via a line such as Camping.goes :MyController. When the script is run, the Camping framework does some massive metaprograming on itself, changing its names to match the controller created by the goes call.

Modules within the script define controllers with actions as well as views. Camping uses Markaby as its view language.

Camping is designed for small web applications that could reasonably fit in a single file. Complex applications that use Camping are expected to be built out of the smaller applications.

Get Professional Ruby on Rails™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.