[Zope3-dev] RFC: death to getView, getDefaultViewName, and getResource

Steve Alexander steve@cat-box.net
Thu, 16 May 2002 00:22:37 +0100


Tres Seaver wrote:
> On Wed, 2002-05-15 at 18:21, Gary Poster wrote:
> 
>>I think I noticed absolute url was implemented as a view; I thought it was an 
>>odd choice, but is there a good reason for it to be a view?  If so, whatever 
>>the reason is might be an argument to keep the non-request version.
> 
> 
> Unlike physical path, 'absolute_url' needs to be adjusted to correspond
> to any virtual hosting which is in place;  hence, it depends on the
> request, and is therefore a view.

I can't fault the reasoning.

However, I do not like the idea of having certain "magical" view names, 
such as url;view, which have particular meaning for core parts of Zope 
3, and which should not naively be used as normal names for views on 
content.

What if I have a legitimate use for a view called "url" for my content?

Solutions that come to mind:

   * Ignore it (yagni)

   * Naming convention:  _url;view

   * Different namespace: url;builtin_view

--
Steve Alexander