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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access