Sinatra: 29 Links and Resources For A Quicker, Easier Way to Build Webapps
Sinatra, a Ruby "micro framework" for developing Web applications, is hot stuff! Despite being over a year since we first mentioned Sinatra (as used on a 100 line blogging app called Reprise), only now does Sinatra seem to have reached critical mass - it's on the cusp of becoming really popular. This is a good time, then, to check it out and see where it could fit into your own projects (with the new Rails Metal functionality (in edge/2.3 only) you can ever run a Sinatra app as a lightweight companion integrated with your Rails apps!)
Sinatra's official homepage provides an incredible number of alluring examples. Just install the sinatra gem or clone its git repository and you can have an ultra basic webapp running in just five lines of code:
require 'rubygems' require 'sinatra' get '/' do 'Hello world!' end
Lots of awesome articles about Sinatra, Sinatra apps, and various links and resources have cropped up over the past few months. The remainder of this post links to the best we've found - most of which you should find useful as you start to explore Sinatra in detail. If you know of any others, please post links in the comments! Of course, if you ultimately agree with Ross Lawley that Sinatra's a "horrid looking ruby web framework that looks its born straight from the worst PHP frameworks" then you might also want to check out Ramaze!
Tutorials and Presentations
Building an iPhone Web app in under 50 lines with Sinatra and iUI - A comprehensive walkthrough of developing an iPhone friendly Web application based on Sinatra. Even if developing an iPhone app doesn't interest you much, this tutorial is so well written that it could act as a good introduction for anyone.
Lightweight Web Services with Sinatra and RestClient - A presentation (in slide form) by Adam Wiggins and Blake Mizerany on using Sinatra and RestClient to build lightweight Web services. Not much of depth in here but helps tie together some of the concepts.
The Sinatra Book - A page full of Sinatra reference joy.
How to use RSpec to describe a Sinatra application - Jesse Hallett looks at how to improve the RSpecability of Sinatra apps if you're into speccing.
Rails Meets Sinatra - Pratik Naik (of the Rails core team) shows how you can mount a Sinatra app into a Rails app (not just at the metal, as mentioned before) so that you can write Sinatra methods directly within Rails classes!
Sinatra Tutorial - A basic Sinatra tutorial by Ari Lerner (for Sinatra 0.1.7 however).
git-wiki - A "quick and dirty" Git-powered wiki built on Sinatra by Simon Rozet.
rifgraf - "Fire-and-forget" data collection and graphing service by Adam Wiggins.
gaze - A quick way to serve up Markdown files.
sinatra_wiki - An "ultralight, ultraminimal" wiki system that uses Markdown for formatting.
toopaste - A Pastie clone in Sinatra - uses DataMapper.
notable - Listens on Jabber and then relays messages back to you (on the Web).
rash - Extremely small and simple app to display results of a hashtag search on Twitter.
snail - A Web interface to Amazon Web Services.
yaml_micro_chat - A basic YAML-powered "micro-chat" system by Karel Minarik.
capinatra - A tool to quickly deploy Sinatra apps to a Phusion Passenger installation
Deploying Sinatra on Dreamhost with Passenger - A tutorial by John Nunemaker that shows how to use Capistrano and Dreamhost to deploy your Sinatra apps.
Sinatra Blogging Engines
Marley - A blog engine by Karel Minarik. It works by publishing posts that you write in your favorite text editor, stored as plain files. This link goes to a post that explains Marley's operation in detail - well worth looking at.
scanty - A tiny blogging tool by Adam Wiggins. It uses Sequel for ORM, supports Ruby syntax highlighting, tags, and uses Markdown.
sin - A mini blog engine in Sinatra with hAtom and MetaWeblog API. All in a single file! Particularly interesting for the MetaWeblog API support. Uses Active Record.
Sites Built on Sinatra
Calendar About Nothing - A "Seinfeld Calendar" based upon public Github feeds. The principle is simple.. commit something to Github every day and you get a streak. Long streaks are celebrated. Hurrah!
Follow Cost - Find out how annoying it will be to follow specific people on Twitter, as measured in milli-scobles!
Stuff - A random collection of mostly Ruby stuff..
Support from: 1st Easy offers UK Rails hosting (dedicated and shared) running Phusion Passenger (mod_rails) and LAMP stack. If you want to get to know us first, or simply want to evaluate the performance of your Rails applications running on Passenger, we'll arrange a trial hosting account for you (full technical support included!)