Camping, a Microframework

Camping, a Microframework

Camping is a web framework which consistently stays at less than 4kB of code. You can probably view the complete source code on a single page. But, you know, it’s so small that, if you think about it, what can it really do?

The idea here is to store a complete fledgling web application in a single file like many small CGIs. But to organize it as a Model-View-Controller application like Rails does. You can then easily move it to Rails once you’ve got it going.

Short Example

Camping.goes :Blog

module Blog::Models
  class Post < Base; end
end

module Blog::Controllers
  class Index
    def get
      @posts = Post.all
      render :index
    end
  end
end

module Blog::Views
  def index
    @posts.each do |post|
      h1 post.title
      div.content! { post.body }
    end
  end
end

Getting Started

Interested yet? Great, the links below should get you started pretty quickly. If you’re having some problems or there’s something you’re wondering about, don’t hesitate to join the community.

Installation: By using RubyGems it’s just a matter of a few keystrokes to install Camping. There’s also experimental builds if you want the latest features.

The Camping Book: Completely new to Camping? The Camping Book will teach you all you need to know! It’s still a work in progress, but there’s plenty of content in order to get started.

Rules of Thumb: A few best-practice tips for your Camping apps. You don’t have to follow them, but it often makes your app much more easier to write and maintain.

Philosophy: When there’s already Rails, Sinatra, Ramaze, Merb and what-not, I guess you’re wondering what makes Camping so much different. The main difference is probably our philosophy, which is quite different than many other frameworks.

The Camping Wiki The Camping Wiki contains a growing number of useful tips for Camping development.

Upgrading: Already have a Camping app running on 1.5 or 2.0? Don’t worry, by following these instructions, you should be able to upgrade in no time!

Community

Camping has a small, but helpful community and most issues are resolved quickly. Don’t be afraid to ask; there’s no point of trying to figure everything out by yourself when we might be able to answer it in a second. We also love to hear all about how you are using Camping, and maybe you can teach us few tricks you’ve discovered too.

If you have any feature requests or suggestions on how we can improve Camping, don’t feel bad for throwing out suggestions without being able to contribute code. The ideas are just as important as the implementation, and Camping won’t get any further without your feedback. Tell the community what you want, and hopefully someone is able to help you.

Mailing List: The mailing list is the most central part of the Camping community and you should definitly join it right away. This is both where the main development of Camping happens, and where questions are answered quickly. (There’s also a searchable archive if you’re looking for a specific message.)

#camping @ irc.freenode.net: There’s also a few of us who are available at IRC so if you feel like chatting with us, this where you should be. Please hang around if no one answers you right away, and it’s also very helpful if you leave your email so we can get back to you when we’re available again.

Issues: We also have a bug tracker where you can see all of the known (and resolved) bugs and feature requests at the moment. If you have a very specific problem, it might be a good idea to see if it’s been reported before. If not, you might open a new issue or maybe ask the the mailing list.

Source code: The source code of Camping is available freely under the MIT licence, which pretty much give you permission to do anything you want with it.

Contributing Interested in contributing to Camping, either by writing code, documentation or helping people? Everyone are welcome, and we’ll easily give you access to both the wiki, the repo, the homepage and pretty much everything if you want to help.