Classy Web Development with Sinatra
screencasts with Adam Keys
Sinatra is a small Ruby web application framework that packs a big punch. It’s also a lot of fun! You can use Sinatra to write tiny, focused web applications and lightweight REST services very quickly. And sometimes a lean and mean web app is all you need. If you haven’t given Sinatra a look, now’s a great time to get a fresh perspective on web development. Learn how to get the most out of Sinatra from Adam Keys, an experienced Ruby and Sinatra developer.
After watching these video tutorials, you’ll know everything you need to write, test, and deploy your own Sinatra applications. All the information is distilled down and indexed for you, so you can get right to the good stuff. These screencasts are the most up-to-date way to learn Sinatra from an expert. The example applications are based on the latest and greatest major release of Sinatra (0.9.0.3).
-
Watch a free sampler movie of this screencast series.
(4 min, QuickTime | iPhone/iPod | Ogg)
- Download and watch DRM-free episodes when and where it's convenient for you
- You get QuickTime, iPod/iPhone, and Theora Ogg formats.
- All the source code is available
Buy Now
All the episodes in this screencast series have been released.
Contents
In addition to the videos, you can also download the source code for each episode so you can follow along and experiment on your own.
-
Episode 1: A Tiny Web App (36 minutes)
Sinatra makes it easy to write simple web applications in a hurry. In this episode, we’ll write a URL shortener application to learn the essential Sinatra features, test the application, and deploy it to a production server. You’ll learn how to:
- Create a simple web application with Sinatra
- Write handlers and ERB templates
- Handle form parameters
- Use multiple files and custom Ruby libraries
- Define arbitrarily complex routes
- Write helper methods
- Create a layout file and use static assets
- Write and run tests
- Make a Rackup file
- Deploy Sinatra apps using Passenger and Capistrano
-
Episode 2: A REST Service (26 minutes)
Sinatra is also great for writing (lots of) small REST services. In this episode, we’ll write a simple REST service that lets us create, read, update, and delete quips and quotes. You’ll learn how to:
- Create a basic REST service with Sinatra
- Write handlers to create, read, update, and delete resources
- Use Active Record with Sinatra for database persistence
- Respond to requests with XML or JSON formats
- Use the RestClient library to interact with the REST service
- Make an Atom feed
- Protect resources with basic HTTP authentication
- Use the
last_modifiedhelper to improve performance - Define a custom 404 and error handler
Audience
These screencasts are ideal for web developers who are new to Sinatra and REST concepts. Basic Ruby code is used throughout. No prior experience with Rails or Capistrano is required.
About the Screencaster
Adam Keys is is a software developer, entertainer, and lover of animals. He’s written software in too many languages to name at startups, small businesses and Fortune 100 giants. His philosophy of coding is to write less code and have more fun writing it.
Special thanks to Ryan Tomayko (a Sinatra contributor) for technical help and review!
