On Wed, Sep 23, 2009 at 3:44 PM, Paul Wilson <<a href="mailto:paulalexwilson@gmail.com">paulalexwilson@gmail.com</a>> wrote:<br>> 2009/9/23 Ethan Jucovy <<a href="mailto:ejucovy@gmail.com">ejucovy@gmail.com</a>>:<br>
>> On Wed, Sep 23, 2009 at 9:57 AM, Paul Wilson <<a href="mailto:paulalexwilson@gmail.com">paulalexwilson@gmail.com</a>> wrote:<br>>> [snip]<br>><br>>> --- actually, having written that out, the named adapters look like<br>
>> they are just views -- IMetadataProvider's get_metadata and<br>>> put_metadata could just interact with a browser request & response<br>>> directly, and each plugin would define a view that knows how to get<br>
>> the right annotation. Hand-waving furiously here, I think most of the<br>>> logic (looking up the annotation, de/serializing, error handling)<br>>> could be centralized in a base class. Each plugged-in subclass could<br>
>> then house all the knowledge about that plugin's URL component and<br>>> annotation key & format, and register itself as a view.<br>>><br>>> Not sure if this is making any sense, or is relevant to your problem.<br>
>> :) At any rate, good luck!<br>><br>> Hehe. Wow - firstly it looks like you've understood me, and secondly I<br>> like your solution. I think I've been over engineering my solution and<br>> worrying too much about naming issues. I should have realised this<br>
> when I started talking about 'pluggable named adapters' :-)<br>><br>> Thanks for clearing it up for me!<br><br>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 problem. :)<br>
<br>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 <i>lot</i> of hard-earned wisdom" indeed. :)<br>
<br>Anyway, good luck with the project! It sounds very interesting, domain-specific or no.<br><br>Regards,<br>Ethan