Michael R. Cook Ruby and Golang Developer

Category: Padrino

Padrino Blog Tutorial using Postgres & DataMapper

Post Image

Recently I’ve been wanting to experiment building websites with Ruby, but without using Rails. I’ve built a few small Sinatra applications, but I really miss having those basic MVC tools that Rails provides. It’s amazing how much easier things are when you have some nice routing and controller helpers. This led me to trying out Padrino, and I have to say it’s looking quite interesting.

Although the Padrino website does have a build-your-own-blog tutorial, it is using ActiveRecord and the HAML view template language. It’s not that I dislike either of these, but I did want try some other tools, such as DataMapper and straight up ERB for the views. As I couldn’t find any good tutorials out there I decided to use that Padrino tutorial as inspiration for my own post. Hopefully you will find it useful.

I will be borrowing heavily from the original Blog Tutorial, so if you’re happy enough using ActiveRecord and HAML, then please do go read that.

Okay, enough of the introductions, let’s get stuck in.

Read more...

About Me

Hi, my name is Michael and this is my personal blog. Here I’ll be posting my coding thoughts and experiments, specifically in regards to building websites in Ruby (Rails, Roda, Sinatra, etc). This site is powered by Thunderaxe, a blogging platform I’m building using the Roda Ruby framework, which I hope to be open sourcing in the near future.