Camping (microframework)
Encyclopedia
Camping is a web application framework
written in Ruby
which consistently stays under 4kb - the complete source code can be viewed on a single page.
Initially written and updated by why
until version 1.5 (still available as a Ruby Gem
), since his disappearance from the web. It is now maintained by the community. The latest version of Camping (2.0) is available from Github
.
in a single file, like a bundle of many small CGI
scripts, but organizes it as a model–view–controller application as Ruby on Rails
does. Camping applications can stand alone, meet niche requirements as 'the small wheels' that serve larger setups, or easily be ported to Rails
.
(0.3 or higher) and (if you want to write HTML) Markaby
(0.5 or higher), both available as Rubygems
. Further details can be found on the Camping wiki. To use a database (SQLite
by default) you'll also need the ActiveRecord and Sqlite3-ruby
Rubygems. Run
Web application framework
A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development...
written in Ruby
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...
which consistently stays under 4kb - the complete source code can be viewed on a single page.
Initially written and updated by why
Why the lucky stiff
why the lucky stiff is the persona formerly used by an anonymous and prolific writer, cartoonist, musician, artist, and computer programmer notable for his work with the Ruby programming language...
until version 1.5 (still available as a Ruby Gem
RubyGems
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries , a tool designed to easily manage the installation of gems, and a server for distributing them. It is analogous to EasyInstall for the Python programming...
), since his disappearance from the web. It is now maintained by the community. The latest version of Camping (2.0) is available from Github
Github
GitHub is a web-based hosting service for software development projects that use the Git revision control system. GitHub offers both commercial plans and free accounts for open source projects...
.
Overview
Camping stores a complete fledgling web applicationWeb application
A web application is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is coded in a browser-supported language and reliant on a common web browser to render the application executable.Web applications are...
in a single file, like a bundle of many small CGI
Common Gateway Interface
The Common Gateway Interface is a standard method for web servers software to delegate the generation of web pages to executable files...
scripts, but organizes it as a model–view–controller application as Ruby on Rails
Ruby on Rails
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language.-History:...
does. Camping applications can stand alone, meet niche requirements as 'the small wheels' that serve larger setups, or easily be ported to Rails
Ruby on Rails
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language.-History:...
.
Installation
For a basic installation, Camping only requires RackRack (web server interface)
Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between into a single method call.Rack is...
(0.3 or higher) and (if you want to write HTML) Markaby
Markaby
Markaby is a small Ruby library for writing HTML code in pure Ruby. It is an alternative to templating languages such as ERb and HAML which combine Ruby code with some form of markup...
(0.5 or higher), both available as Rubygems
RubyGems
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries , a tool designed to easily manage the installation of gems, and a server for distributing them. It is analogous to EasyInstall for the Python programming...
. Further details can be found on the Camping wiki. To use a database (SQLite
SQLite
SQLite is an ACID-compliant embedded relational database management system contained in a relatively small C programming library. The source code for SQLite is in the public domain and implements most of the SQL standard...
by default) you'll also need the ActiveRecord and Sqlite3-ruby
SQLite
SQLite is an ACID-compliant embedded relational database management system contained in a relatively small C programming library. The source code for SQLite is in the public domain and implements most of the SQL standard...
Rubygems. Run
camping yourappname.rb
to launch the application on port 3301.Tutorials
The introductory tutorial builds a minimal unstyled wiki (download working example wiki code), and the Camping examples contains a tiny but fully functioning css-styled blog. Earlier Camping 1.5 examples will either run without modification or require only slight adjustments to run under Camping 2.0.External links
- Camping 2.0.* on Github
- Camping wiki on Github
- Camping mailing list: messages by thread
- Official Camping Site
- Why Camping Matters by Nathaniel Talbott at rubyconf 2007
- RubyOnRails podcast on Camping
- an archive of things that _why created
- Wild and Crazy Metaprogramming with Camping