Class::DBI and Ruby ActiveRecord::Associations ER diagram/macros

Class::DBI and Ruby ActiveRecord::Associations ER diagram/macros

am 09.06.2006 09:22:28 von Jean-Marc Molina

Hello,

I would appreciate Perl developers comments on the
"ActiveRecord::Associations ER diagram/macros" [1] Ruby Forum topic and
"Ruby on Rails Associations macro-methods for tying objects together through
foreign" [2] Usenet message. I don't know much about Ruby and Perl and
wonder how and why the Class:DBI [3] Perl module is related to the
"ActiveRecord::Associations::ClassMethods" [4] Ruby module. They both use
the same terminology and I don't think it's a coïncidence.

In fact it's a comment to the "Simplify Business Logic with PHP DataObjects"
[5] ONLamp.com article that led me on this Perl community : « The greatest
part about it is that you can declare relationships between classes/tables
by indicating that a certain column in your table either is a foreign key
(has_a) or that your table's primary key is referenced from another one
(has_many). All the joins will then happen behind the scenes and you can use
simple accessors to navigate your relations. ». The full comment references
the Class:DBI Perl module and strongly recommand reading the "How to Avoid
Writing Code : Using Template Toolkit and Class::DBI" [6] Perl.com article.

JM.

Notes :
* [1] http://www.ruby-forum.com/topic/66010#new
* [2] news://446af2f0$0$8017$626a54ce@news.free.fr
* [3] http://www.class-dbi.com
* [4]
http://ar.rubyonrails.org/classes/ActiveRecord/Associations/ ClassMethods.html
* [5] http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html
* [6] http://www.perl.com/pub/a/2003/07/15/nocode.html