Sinatra, Datamapper, and Haml

I recently tried Sinatra and what’s a better way to learn a new framework than to create an app.

If you want to learn sinatra, the README will quickly show you what you can do with this framework.

I haven’t used Datamapper so I took this opportunity to learn it as well. You just need to require ‘dm-core’. That’s it. If you want to put your models on a separate file, you have to require that as well. If you’re using Rails, you’re probably used to models being available right away. I also used haml instead of erb.

The code is available at github. The Sinatra book has a list of Real World Applications. I looked at the seinfeld app as a basis for the structure.

There is more I want to learn in Sinatra. Since it uses Rack, I want to try using the different Rack Middleware available.