[Nitro] OG vs Active Record
john at oxyliquit.de
Wed Sep 19 05:04:21 EDT 2007
>> Well, the ORM can't go around 'guessing' your intentions. There must
>> be a clever way to tell the ORM what exactly you need. Best is, for
>> one purpose only 1 query, not 250.
> Sure, by adopting some conventions the chances that OG 'gets it right'
> are better. Correct? - I'm assuming Nitro/OG adopt the preference for
> convention over configuration?
I would have to think about that.
ActiveRecord is said to be all about 'convention over configuration'.
AR uses conventions to look up 'stuff' in the database. Og uses
a kind of 'configuration' to create that database to begin with.
That said, I'm not sure at all if Og schema creation is 'configuration'.
>> For more sophisticated SQL there is just more information needed, and
>> where does that information come from if not from the programmer.
> I may be wrong but my current understanding is that OG could
> eventually 'acquire' some of that information from the database/or OGs
> managed objects and their inter-relations. It wouldn't always be
> optimal, but it could get quite sophisticated - right?
Og has all information the database has. It knows the DB, its managed
objects and their relations. It doesn't need to ask the DB for that
kind of information. In fact, Og created the DB with that knowledge. :P
If you come up with information which helps to create more performant
queries automatically, shoot. The guys from `sequel` have a few very
nice sql-creation routines. (A few of us even had the idea of using
sequel to write an even better Og...) But I'm off the track.
What I mean is:
How can we aggregate Og-Models in a way that is non-obstrusive, elegant
and performant with the information we have?
 #nitro at irc.freenode.net
Feel the love
More information about the Nitro-general