[Grok-dev] Problem with Annotations
ejucovy at gmail.com
Thu Sep 24 16:15:09 EDT 2009
On Wed, Sep 23, 2009 at 3:44 PM, Paul Wilson <paulalexwilson at gmail.com>
> 2009/9/23 Ethan Jucovy <ejucovy at gmail.com>:
>> On Wed, Sep 23, 2009 at 9:57 AM, Paul Wilson <paulalexwilson at gmail.com>
>> --- actually, having written that out, the named adapters look like
>> they are just views -- IMetadataProvider's get_metadata and
>> put_metadata could just interact with a browser request & response
>> directly, and each plugin would define a view that knows how to get
>> the right annotation. Hand-waving furiously here, I think most of the
>> logic (looking up the annotation, de/serializing, error handling)
>> could be centralized in a base class. Each plugged-in subclass could
>> then house all the knowledge about that plugin's URL component and
>> annotation key & format, and register itself as a view.
>> Not sure if this is making any sense, or is relevant to your problem.
>> :) At any rate, good luck!
> Hehe. Wow - firstly it looks like you've understood me, and secondly I
> like your solution. I think I've been over engineering my solution and
> worrying too much about naming issues. I should have realised this
> when I started talking about 'pluggable named adapters' :-)
> Thanks for clearing it up for me!
Happy to help! I've been trying to think through a similar conceptual
problem on my backburner for a while now, but it's been hard for me to get a
handle on it in the first place, so you've helped me too by spelling out the
It's funny how often I'll think through a solution that sounds overly
complex and hand-rolled, only to discover at the end that it's already a
pretty fundamental Zope/Grok feature, just seen from a different angle.
"Grok is informed by a *lot* of hard-earned wisdom" indeed. :)
Anyway, good luck with the project! It sounds very interesting,
domain-specific or no.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Grok-dev