May 2008

DataMapper: A Better ORM for Ruby

One of the things that’s always irritated my about rails’ ActiveRecord framework is the way that the domain model lives in the database.Don’t get me wrong: it’s very clever, and a great showcase for ruby’s metaprogramming features, which will blow average C# / Java mind the mind when they first see it.

In rails, you build a database of your domain model, and create empty classes with the names of the domain entities (conventionally the singular of a database table name) which inherit from ActiveRecord. ActiveRecord then looks at your database, and using the magic of metaprogramming, hydrates your object with a bunch of properties that map to the database fields.

But I prefer to write my models in the code, and if you do too, you might want to take a look at DataMapper.

Agile / Lean Software Development

Comments (3)

Permalink

Hire Me

I bring you good news and bad news, dear reader.

The bad news is that it looks as if my present client may be running out of interesting work for me to do, for the time being, which is a real shame as I’m greatly enjoying working there.

The good news though is that this means I’m now available for hire again! If you need an experienced, charismatic programmer, technical architect or coach to join or lead a team of programmers, and you’re serious about that team producing high-quality code that delivers maximum value to its users and enjoying it as they do so, then I think it’s time we had a little chat.

Read more here: http://mattwynne.net/work/cv/programmer/

Uncategorized

Comments (3)

Permalink