Chapter 1Sinatra

The Tower of Hanoi is a puzzle game where you have three rods and a number of disks of different sizes. The game starts with the disks on the first rod, and the goal is to move all the disks to the third rod without ever putting a larger disk on top of a smaller disk. It’s not particularly difficult to solve the puzzle, but the real challenge is to find the simplest solution—completing the task in the least possible number of moves.

Web frameworks solve the problem of writing web applications. Sinatra takes on the additional challenge of being a particularly simple and lightweight framework, allowing you to write a web application with the least possible amount of code.[2] Case in point, “Hello, world” in Sinatra is strikingly ...

Get Seven Web Frameworks in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.