[Zope3-dev] RFC: View Methods as Views
Jim Fulton
jim@zope.com
Fri, 10 May 2002 19:44:43 -0400
Tim Hoffman wrote:
>
> Hi Jim
>
> Wouldn't the second option be more future proof, from a design point of
> view
>
> <browser:view
> for=".IContactEdit."
> factory=".IContactInfoView.">
> permission_id=".Contacts.ManageContacts"
> >
> <page name="editForm.html" method="index" />
> <page name="edit.html" method="edit" />
> </browser:view>
>
> I can imagine over time you may want to add further directives to each
> of the view methods in the zcml file, using the second method each
> view has an explicit element, whereas to add additional view attributes
> you would have to add new tags.
>
> e.g over riding the general browser:view permission with a specific view
> permission (OK maybe you may never want to do this, but just as an
> example)
>
> <browser:view
> for=".IContactEdit."
> factory=".IContactInfoView.">
> permission_id=".Contacts.ManageContacts"
> >
> <page name="editForm.html" method="index" />
> <page name="edit.html" method="edit"
> permission_id=".Contacts.SomeSpecialPermission"/>
> </browser:view>
I think that's a pretty good argument.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org