Sinatra, Datamapper, and Haml

Posted by Christopher Rigor on February 13, 2009 
Filed Under Web Development

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.

Comments

  • Christopher Rigor
    @Dan, I haven't done anything beyond connecting to a db and selecting records. The docs helped me with these. Thanks.
  • Dan Kubb
    As the maintainer of DataMapper, I'm curious to know your first impressions. Was it easy to get up and running? Did you find everything you needed in the docs?

    We're in the process of improving these things in DM even further, but I like to get more impressions from first time users.
blog comments powered by Disqus