Hobo != Scaffolding

Posted by Tom on 2007-05-07

I was very pleased recently, to come across this remark in a post about Hobo:

don’t be mistaken that this is another scaffold, it’s not, far from it.

(from Funcoder - thanks!)

IMHO scaffolding is a very widely misunderstood concept and one that has caused a good deal of confusion. The only description of scaffolding I’ve heard that really holds water is from DHH: they’re a learning aid. Ironically, I think DHH unintentionally caused a lot of the initial confusion by featuring scaffolding so prominently in the early build-a-blog screencast. A lot of people saw that screencast and thought “Wow! Rails is building a big chunk of my app for me!”. That was a misconception.

The Hobo screencasts probably give people the same impression, and this time – they’re right! Hobo is trying to eliminate a lot of code that you would otherwise have to write yourself. The result is that many people are putting Hobo in the scaffolding category. Hobo does what people thought scaffolding would do.

If you add ActiveScaffold to the mix things get even more confusing. ActiveScaffold is an example of an “Admin Interface Builder”. From their website:

Most web applications have many more model objects exposed on the backend, or admin side, than they do on the front. Coding interfaces for all those models is redundant and a waste of resources when all you need is CRUD functionality that’s smart enough to handle all your ActiveRecord associations.

So they’re using the “scaffold” term very differently to DHH. But even if this use of scaffolding has become the de-facto meaning, it’s still different from Hobo.

To get some clarity, lets drop the buzz-words and take a look at what’s actually going on here. I can see three very different kinds of things:

Show me how to use the API. This, as I understand it, is the idea behind Rails scaffolds. I think it’s an awesome idea. A live, runnable code example using a model from my own app. Brilliant. It certainly helped me learn Rails. I do wonder though - if the usage of an API is so regular, doesn’t that mean the API is too low-level?

Make me an admin interface. This is ActiveScaffold, Streamlined, and from across the fence, Django (correct me if I’m wrong people). To be honest I can’t get too excited about this idea. Don’t get me wrong - these are all very well executed projects and seem to deliver the goods to a very high standard. It’s just not something I’ve ever felt a need for. There’s an implicit assumption here: “users” need a hand crafted UI, while “administrators” can use an auto-generated UI. I’ve never found myself in a situation where that assumption holds.

Build (part of) my app for me. In this category lies a large number of Rails plugins. Want tagging? acts_as_taggable. Want log-in and sign-up? acts_as_authenticated. Those things are mostly the same every time you need them, so why re-invent the wheel? This is where Hobo lies.

With that description, Hobo sounds very different from the other two categories, so why the confusion? Well, Hobo does so much for you, that, as you’ve seen in the first screencast, it will create a working app with no programming at all outside the model layer. If you use this app as is, you’re effectively using Hobo as a “make me an admin interface” tool. That’s fine, but it’s also kinda missing the point.

The point being, that this “generated” app is customisable. Easily customisable. Completely and totally customisable. No less so that a raw Rails app. The second and third screencasts are trying to point in this direction. So design your app exactly the way you want it. Where your design is very “standard”, Hobo will provide those bits for you. Where your design is unique and specially tailored, you’ll build those bits yourself.

I think the word “scaffolding” captures the point really well. Scaffolding is sometimes a temporary fix - holding things in place while things are under construction. It’s sometimes used more permanently – around the back, for the people that don’t mind the odd rough edge. Either way it’s a perfectly valid and very useful tool. Hobo has features that can be used like this, but it’s definitely not what Hobo is about.



(edit)