[Grok-dev] Re: grok.Permission and grok.Role
Philipp von Weitershausen
philipp at weitershausen.de
Sat Aug 25 05:35:15 EDT 2007
Darryl Cousins wrote:
> Just as another thought. In mars.template the components are named as
> factories (TemplateFactory etc) to make it clear that the component is
> *not* the template itself. As I read it the new Permission and Role
> components are in effect factories, they `create` and `register` a
> permission and a role respectively - in the same manner as the
> mars.template factory-style components.
> The current grok Permission and Role could be renamed as
> PermissionFactory and RoleFactory without changing the functionality.
A factory is something you call to create an object (not only in Zope 3
but also in Java land and others). I would expect to be able to call a
PermissionFactory to obtain a permission. That's not the case.
We actually have the chance here to create Permission and Role
components directly. There's no need for a detour so I don't think we
should take a detour :).
http://worldcookery.com -- Professional Zope documentation and training
More information about the Grok-dev