Unobtrusive JavaScript Presentation with Sinatra

I love new technology. Since I always wanted to try out Sinatra, my Unobtrusive JavaScript presentation on our retreat seemed like a perfect fit. Wouldn’t it be nice to not use Keynote for this? Why not just present it in the browser?

Some hours later, I came up with a little presentation app. Everybody can connect to the Sinatra instance via the browser and the presenter can choose which chart they are looking at. They don’t have to reload the page, it updates itself. Pretty slick.

Download it if you’d like to try it out. If you’re interested in the presentation I gave, you can just view the slides.

How to use it

1. Install Sinatra via Rubygems

gem install sinatra

2. Run the application

ruby keynote.rb

That’s it.

Now everyone can connect to it via the browser on port 4567 (default). To access the chart selector, just browse to http://localhost:4567/god_mode. You can actually change this behavior, just open the keynote.rb file and adjust it. Looks pretty clean, does it?

I can’t wait to use Sinatra for production purposes. Sometimes, you don’t need all that stuff Rails provides. Less means more.

Comments

Our products