[Grok-dev] Re: final sprint report - please review my branch!

Brandon Craig Rhodes brandon at rhodesmill.org
Tue Apr 8 07:38:40 EDT 2008


Philipp von Weitershausen <philipp at weitershausen.de> writes:

> P.S.: On a technical note, I should add that I'm not entirely
> satisfied with some of the details, for instance the "Context" base
> class that was introduced. So some details may change.

Right now that's how an application stack like Grok "signals" that
certain of its classes are eligible to be automatically picked up as
the context for Adapters (and specializations of adapters like Views)
inside a module - by having things like Model and Container inherit
from Context.

But, you're right, it's probably a waste of resources to use
inheritance to signal something about an object - since inheritance
imposes all sorts of costs, probably including a performance penalty
every time a method is called on a Model or Container.

Are you thinking of, instead, introducing a directive with which
application stacks would mark up their classes as being eligible to be
automatically detected as adapter contexts?  Maybe grok.autodetect()
or something?

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Grok-dev mailing list