[Grok-dev] Bonked

Paul Wilson paulalexwilson at gmail.com
Fri Dec 12 06:00:16 EST 2008


Hi!

Okay, I've bonked. :-/

I'm trying to write a web application/mini-framework upon grok that is
pluggable. I intend users of this app can write their own components
package containing classes that inherit from a baseclass I've written
and that contain directives that describe their place in some
hierarchy. My custom grokkers I hope will 'detect' this new package,
grok all the modules/classes within (martian.scan!!), for each grokked
class create an instance of some ComponentPlugin (that contains
information about the plugged in component such that a factory can
later create instances of it), and add this to a subcontainer of my
application root (e.g. app_root['components']) such that it can be
found, used and perhaps configured at runtime. Also, it would be very
cool if I could distribute such plugin components as eggs and have
them included into the system using setup.py/buildout.

My questions are - is this even possible? If so, how do I write
packages that are grokked by my grokker? I know (thanks to a previous
question on Grok-Dev) I can register my grokker through meta.zcml, so
will something similar need to be included in the component plugin
packages that says "I'm a plugin package that is to be grokked by
'MyGrokker'!". I think ZCML is going to be the answer, but I haven't
found any documentation covering how ZCML works in Grok.

All this abstractness is hurting my brain!! :) I think I'm trying to
do something that Grok may have not been intended for; I've had no
issues getting web applications running, using templates (ZPT/genshi),
writing views/models/containers etc..., Grok has worked very well for
all this and I'm very pleased with it, so thank you!

Any help appreciated! (Ideally, there's something out there that's
already achieving this that I can learn from...)

Regards,
Paul


More information about the Grok-dev mailing list