Get Rid of ActiveRecord Situps
Rails fans are understandably proud of the magic metaprogramming facilities of Ruby, the database introspection capabilities of ActiveRecord, and the fact that the most basic model class is only two lines long (at least in every tutorial I've seen).
I say that's two lines too many.
Here's how to have zero-line model modules in Perl -- as many as you want. (If you have a complete CRUD application, you can use the same idea to generate RESTful controllers, too.)
Heya chromatic! Fortunately, Bryan Evans is on the case with the DrySQL plugin for Active Record.
|DrySQL to the rescue: http://drysql.rubyforge.org/|
|Man, years of submerging in perl still leave me in a desert when looking at your code. Another reason for me to like ruby and ror. I like simplicity and clearness.|
|Interesting and perhaps a bit far out there with seeing GenModel.Have you reviewed Data::ObjectDriver?|
|Why is using eval so bad in this case? What you get is code (classes) generated at run time. Isn't whether that is done via an eval or meta model poking just a (language specific) implimentation detail?|
|i really enjoyed this article and am hoping you post the follow-up about GenModel soon ...|