[Zope-CMF] Re: Method Aliases

Kapil Thangavelu k_vertigo at mac.com
Tue Sep 30 14:46:06 EDT 2003


On Tuesday, September 30, 2003, at 01:39  AM, Yuppie wrote:

> Hi!
>
>
> Kapil Thangavelu wrote:
>
>> i've been away from cmf dev for several months so maybe i'm a bit 
>> behind the times, but why is this even in CMF? is it adding features 
>> for the sake of adding features? are users really typing in urls, is 
>> it that much trouble to query a ti for action urls or abstracting 
>> that? is there a proposal for this anywhere? i say this because it 
>> breaks several things i've worked on, static deployment and 
>> subversion/fs integration ( the latter being a place where traversal 
>> hooks are actually needed) and i dont see the rational.
>
> This is the proposal:
> <http://mail.zope.org/pipermail/zope-cmf/2003-June/018836.html>
> See the related thread for dicussion.
>
> Please let me know if you have further questions.

looking over the thread i still don't see the problem that this is 
trying to solve.. at least the logic given seems circular.

from the original proposal email

> The view method allows to add a simple +'/view' to urls.
>
> www.example.org/foo/view
>
> is an alias for
>
> www.example.org/foo/document_view
> -or-
> www.example.org/foo/newsitem_view
> -or-
> www.example.org/foo/whatever_the_default_view_is
>
>
> But we can't get rid of these urls, because we can't use them in
> actions.

why is getting rid of these urls a good thing? what use cases does it 
solve?

> If we would add an action like that,
>
> { 'id':'view',
>    'name':'View',
>    'action':'string:${object_url}/view',
>    'permissions':(View,) }
>
> there would be no way to find out that /view is an alias for
> /document_view, because actions are currently used to look up these
> method aliases.

ok, so in this  one particular case of 'view', where basically a method 
is defined on content objects that will return the default view, the 
logic seems to be that this is bad because the method name can't be 
used in the definition of an action with a target of view? that logic 
seems circular to me, and an incredibly minor issue besides. i mean its 
not like overriding 'view' behavior isn't a matter
of setting a property within the preexisting infrastructure anyways.

the only justification i'm seeing for this feature is that pretty urls 
are good for being pretty, or features for features sake. if i'm 
missing something please enlighten me.

cheers,

-kapil




More information about the Zope-CMF mailing list