Book review: Sinatra Starter
When Ruby newcomers ask me the “best way” to learn RubyOnRails I often repeat that RoR is “only” a web framework with lot of libraries you must learn in order to reach your target (=build your own web application). But before that IMHO is way more important to learn (i) how a web framework work and, in order to keep thing simple, (ii) start small!
Sinatra is a perfect tool to do that (and not only…). In effect the best advantage points of Sinatra reside in education/training and prototyping. Its small footprint and easy to read source code is an excellent starting point from whoever is interested in learning a web framework internals. Moreover, its approach based on simplicity and immediacy help us in producing proof of concept and prototype application.
Seldom I’ve found short to read and quick to be productive resources on that topic; after reading the ebook “Sinatra Starter” by Joe Yates (published by Packt Publishing), I’ve found really (condensed) great stuff inside it.
The book starts with clear instructions on how to install Sinatra and be quickly able to write our own webapp “bare to metal”. But that is not the only thing you’ll learn here…
In fact the book provides us also hints on how to approach building our web app in systematic way. I mean throughout the reading we learn just enough to play with Git and Github to versioning our code, Heroku to deploy our webapp and RSpec to test it.
Moreover, some important aspects are touched (not deeply cause the book short size, but anyway interesting):
- application modularity
- Rack usage
- how to layout a Sinatra project
- how to use sessions
- how to handle forms, route and request parameters
- how to send emails
- how to log application data
- how to connect to a data base
- useful weblinks on Sinatra world
The “Short, Fast, Focused” caption on the cover page is really fitting: have a good read!