A Couple of Things From Here...

It’s been some time since my last post but here I am! Where? In Spain, of course! Having a great time, I must say.

I arrived last week in Madrid and the past 2 weeks before that I spent basically packing my stuff. There is still some paperwork going on but everything is flowing well.

Besides this little feedback, I was reading this week’s issue of the excellent series This Week In Ruby, from my friend Antonio Cangiano. I found something quite interesting, a plugin called HoboFields.

One of the things that bothers me in rails is the fact that by looking at your model classes, you can’t tell the fields you have there. Sure, you can look at the migration script. Yeah, you can also load the development environment and inspect the object. It’s a pain in the @zz! But this is the way ActiveRecord works…

Other ORM solutions like DataMapper, allows you to define the fields directly in the class. It’s a much cleaner and clear way to maintain your models. And you get to know what properties you have just by looking at your classes.

That’s exactly what HoboFields adds to ActiveRecord.

You define your properties and its types straight into your model class, and the plugin creates the migration scripts for you. Coming from a java world my self, I find it rather interesting, useful and it also reminds me of the way Hibernate works. You define your mappings with anotations in your class and hibernate just generate the schemas from there.

It’s worth a try.