Wrapping Up

Sinatra is a Ruby framework that provides a simple and natural DSL for developing web applications. Why should things be complicated when they can be simple? With Sinatra, you can get started quickly and without the complexity of a large framework.

Because Sinatra is so nimble, it offers a compelling solution to turn your existing Ruby applications into web applications. As we saw in this chapter, Sinatra is also very easy to unit test, whether with RSpec or with another testing framework of your choice.

Sinatra’s Strengths

Developing a RESTful API is particularly sweet in Sinatra. Handling routes, clean URIs with parameters, using regular expressions, and so on, is effortless, as is returning HTTP status codes, messages, and JSON ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.