Learning Camping only requires basic Ruby skills.
require 'camping' Camping.goes :Blog module Blog end
Camping is simpler than Rails, but yet still follows the MVC pattern unlike Sinatra and Padrino.
require 'camping' Camping.goes :Blog module Blog module Models end module Controllers end module Views end end
Camping is built on Rack and is very compact making web apps fast to load/run and memory efficient.
The whole web microframework source code consistently stays at less than 4kB. You can probably view the complete source code on a single page.
Although Camping has an affinity for ActiveRecord, you can use your favorite ORM with it (e.g. MongoMapper to acces MongoDB)
If you choose ActiveRecord, Camping will manage a default Sqlite database and let you define schema migrations using classes.
class BlogInitialSchemaCreation < V 1.0 def self.up create_table :blog_posts, #... end def self.down drop_table :blog_posts end end
You can mix and match different view engines such as:
Controller routes are declared at the same time as the controller definition:
class Edit < R '/post/(\d+)/edit' def get(post_id) end def post(post_id) end end
Camping is extensible, allowing you to add functionality using plugins such as:
Camping is great for:
Why The Lucky Stiff originally created Camping. The community is active and continues to evolve the framework.
IronRuby can run Camping web apps on IIS using IronRack
gem install camping