Martin Aspeli wrote:
> Christian Scholz wrote:
>
>> What about new developers? Because even me who is somewhat familiar with
>> Zope3 stuff is often lost in the code (like wondering what actually that
>> @implementer decorator is doing and why it is used there).
>
> In that file, you saw:
>
> from zope.interface import implementer
>
> As is conventional, there's an interfaces.py in zope.interface, which
> has this to say about 'implementer':
>
> def implementer(*interfaces):
> """Create a decorator for declaring interfaces implemented by
> a facory
>
> A callable is returned that makes an implements declaration on
> objects passed to it.
> """
>
> I think if you understand the concepts here (decorator, interfaces
> implemented by, factory, callable) then that's straightforward. It'd be
> really great if we could foster some development and introspection tools
> to make this more clear, though. An in-Plone API browser for all
> interfaces in all installed packages would be cool, for example.
> Clouseau is another tool we should embrace more fully.
I looked at this file and I understand the concepts but it still wasn't
clear to me. It became clear to me when I put some debug statements in
there to see when this is actually called.
I also found a blog post from timte which explained this in more detail
with an example.
The more general problem with Zope3 stuff in gneral is maybe also that
it's hard to follow where things are happening as it's so losely bound.
I know this is a feature but it also makes understanding this stuff
somewhat complicated.
So maybe it's also a question of how much indirection is really needed.
I am also using this pattern in the commenting stuff but I also wonder
if in my case I should not simply put the creation of the annotation
into the CommentManager which is the adapter for commentable objects. It
might be there in the __init__ (but this might mean write-on-read) or
maybe in the first write.
> If you *don't* understand those concepts, you need to reference more
> fundamental documentation. Again, there's more to do here, but there are
> at least two books that cover it.
I know and these are very good books. The problem is that they are heavy
(and I noticed at the EuroPython sprint that you are somewhat lost
without them if you want to do something you haven't look into before).
So I also want to blog more about things I encounter in Zope/Plone
source code maybe it's helpful to some people.
-- Christian
--
Christian Scholz video blog:
http://comlounge.tvCOM.lounge blog:
http://mrtopf.de/blogLuetticher Strasse 10 Skype: HerrTopf
52064 Aachen Homepage:
http://comlounge.netTel: +49 241 400 730 0 E-Mail
cs@...
Fax: +49 241 979 00 850 IRC: MrTopf, Tao_T
connect with me:
http://mrtopf.de/connect-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Plone-developers mailing list
Plone-developers@...
https://lists.sourceforge.net/lists/listinfo/plone-developers