I've improved the component stuff I was playing with (in
Sandbox/ianbicking/Component). It's a loadable plugin, it has some
docstrings, and running examples (user authentication, most
interestingly, though there's a bunch of FormEncode stuff that I've yet
to check in that is also a component).
I feel fairly happy with the result. It's similar to a mixin, but it's
much more clear how multiple components will interact, which is a
mixin's greatest problem. The actual implementation is fairly short,
subclassing Page and introducing a couple new classes for the components
(it's all muddled together in CPage.py for now).
Look in Component/Examples/ to see it in (simple) use.
Ian
|