[Nitro] Og Revisted
transfire at gmail.com
Fri Feb 10 08:50:13 EST 2006
On 2/10/06, Rob Pitt <rob at motionpath.com> wrote:
> I do not like those ideas at all. I do not agree that by default
> instance variables used in the constructor should be database driven.
I agree with that. I should have beem more clear about that. At this
time I'm not advocating any idea there excapet the enchant property
issue. (i.e. take each item one at a time and decided about it)
> I do not think the automated enchanting of property creates too much of a
> CPU drain,
It' not _just_ that though. That just one factor among a others. While
it ceratinly not a major CPU drain, it another contributing factor.
> much worse are things like the pre-compiling of scaffold
> templates (what is the point?). I am not a fan of annotations either but
> I recognise I may be alone in this last point.
How do propose we specify meta-info without annotations?
> If you want to reduce the complexity of the code, it wouldn't be hard to
> do this within the existing syntax as a framework. If you wish to have a
> way of explicitly specifying which classes to enchant (ignoring the
> obvious that property as a keyword is an explicit way of specifying a
> class to be managed), I would suggest something more like:
> class Address
> include Og::Model
> og_property :address_1, String
> og_related :belongs_to, Employee
Yes, #include is the traditional way to do it. And in effect that's
exactly what happens. But I think the idea presented on the wiki page
for being able to do it from the outseide is better b/c it allows the
class to stay clean, which is in the spirit of Og. And it allows a
very nice convience for enchanting many classes at once via a module
More information about the Nitro-general