This screencast series is not being sold as they are out of date—the example applications are based on the 0.9.0.3 release of Sinatra.
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.
About this Title
Available in: DRM-free iPod/iPhone 3 Video, Quicktime Video, Theora Ogg, and iPad/iPhone 4 Video
Download and watch when and where you want
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 0.9.0.3 release of Sinatra.
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_modified helper to improve performance
Define a custom 404 and error handler
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.
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!