A quick look at Hobo

Having just installed Rails on Ubuntu tonight, and reminded myself how utterly horrible the Rails scaffold looks (it’s supposed to!) i thought i might have a look at Hobo.

Hobo builds upon Rails, brings in a few plugins, makes it even faster to do things, and looks pretty good right from the start.

So get it installed:

sudo gem sources -a http://gems.github.com
sudo gem install hobo
cd ~/rails_apps/
hobo hobotest
cd hobotest/

This is how you make a model using Hobo:

./script/generate hobo_model_resource lollipop flavour:string date_eaten:date rating:integer

Hobo generates migrations from the model:

./script/generate hobo_migration

Whoops! I don’t have sqlite installed.

sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby

Try that again:

./script/generate hobo_migration

I choose ‘migrate now’. Oh wow! It automatically generates a users table for me! This feels promising!

Let’s see some examples of what the interface looks like.

Initial welcome screen

Initial Hobo welcome page

No link to create anything when not logged in

Cannot create anything when not logged in

A log in screen

Hobo log in screen

Hobo gives you user account management right out of the box!

A signup screen

Hobo signup screen

Index page of all lollipops

Hobo index page

Less detailed than Rails default scaffolding, but much nicer to look at.

View a single lollipop

Hobo view page

I like lollipops, okay?! :)

Edit a lollipop

Hobo edit page

I was curious as to what the Hobo generated users table looks like:

SQLite Manager showing the Hobo users table

I see it has things such as remember tokens, user status (active) and an administrator flag. Looks really useful!

However, i don’t know where all the code is!

Hobo - where's all the code?!

The most code i could find is the bit about user authorisation. Which is very useful, definitely. But hardly any controller code or views. It just makes me wonder how easy it is to change away from the Hobo default opinions.

Anyway, it looks pretty good. I’ll probably write some sort of vaguely useful application with Hobo to see how it works out. Apparently AJAX is really easy using Hobo, and views are much easier to write with their DRYML. I also noticed a ‘themes’ directory so i bet it’s quite easy to reskin the site. Those kind of things are nice to have. Just so long as the convention over configuration doesn’t go too far and make it hard to configure anything other than the convention!

Oooh, the Hobo manual looks useful … :)

Advertisements

8 comments on “A quick look at Hobo

  1. Pingback: A little place of calm » Blog Archive » Rails on Ubuntu in 14 minutes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s