[Zope-CMF] Re: [dev] Method Aliases API revisited
Tres Seaver
tseaver at zope.com
Wed Sep 1 13:41:36 EDT 2004
yuppie wrote:
> Hi!
>
>
> Don't know if anybody uses the possibility to define Method Aliases for
> paths instead of simple methods. I'm afraid this is YAGNI and makes the
> Method Aliases API more complex than necessary.
>
>
> I propose to replace these two methods:
>
> def getMethodPath(key):
> """ Get reverse relative method path by alias.
>
> Permission -- Always available
>
> Returns -- Tuple of IDs
> """
>
> def getMethodURL(key):
> """ Get relative method URL by alias.
>
> Permission -- Always available
>
> Returns -- Slash-separated string
> """
>
> by:
>
> def getMethodID(key):
> """ Get method ID by alias.
>
> Permission -- Always available
>
> Returns -- String
> """
>
> While it is straight forward to use method paths on publishing
> traversal, it isn't easy to use method paths from scripts. So currently
> code like that for the 'mkdir' hook anyway makes the assumption that the
> method path contains only one ID.
>
> This would also make it easier to replace the deprecated 'getActionById'
> in cases where we want to call the method.
>
>
> Given that people agree this simplification makes sense, I'm not sure
> what would be the right way to make that change:
>
> Do we have to support the current API in CMF 1.5 because the beta is
> already out or would it be ok to break backwards compatibility to the beta?
>
>
> Any feedback is welcome.
+1 to the change. If somebody is already dependent on path stuff, they
need to speak up (I don't think anybody has revved another framework /
product to use the beta, so "users" rather than "developers" shouldn't
be affected anyway).
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list