From: rubyhacker@... Date: 2005-10-29T06:57:05+09:00 Subject: Re: The "perfect" ORM? George Moschovitis wrote: > > I dislike putting the metadata for my objects into the objects > > themselves. > > The metadata is stored in the object class not the actual instances. Yes, I realize that. > > In addition, my memory of Og is that it encourages thinking in > > database terms (like "has_many") -- true or not? > > I dont think that has many is a database term, it just decribes object > relations amd allows Og to automagiaclly generate some useful methods. > This is an abstraction. I think it was originally a database term which then found its way into things like UML. In classic (non-UML) discussions of OOP, I have never seen these terms. > I think, using Og you almost forget that you are using a database. In > fact you dont need an RDBMS store. I like Og, it just feels verbose to me. But I am the type who would rather do arr.mapf(:downcase) instead of arr.map {|x| x.downcase } And I feel that with Og, I am coupling my classes to the persistence mechanism. Rather than "teaching my objects to persist" I would like to give information to a persistence framework, and then just pass in pristine objects (undecorated, unannotated, no tattoos or bumper stickers). > > 2. To specify the minimum information necessary in order to marshal > > each of my types. > > Og supports this. > > > 3. To store the metadata separately from my classes/objects so as to > > minimize impact on them. (But probably not in a separate file.) > > You can do this in the latest version. OK, I didn't know that at all. :) > Og is constantly evolving stay tunned for even better abstractions. > Even better you can help us with suggestions and/or patches. Join the > mailing list ;-) I will try first to produce something of my own that I like. If I fail, then Og will be my favorite framework. ;) And then I suppose I would join the list and so on. Thanks, Hal