[Zope3-dev] Proposal: More obvious TALES namespaces
Steve Alexander
steve@cat-box.net
Sun, 24 Mar 2002 16:00:28 +0000
I proposed this a couple of weeks ago. I've summarised replies below the
quoted text.
Steve Alexander wrote:
> This is a proposal to change the names of the TALES namespaces in Zope 3
> to make their meaning more obvious.
>
> This came out of a discussion at the NIP sprint, where Jim was
> simplifying some unnecessarily hairy code I'd written, simply because
> I'd not realised what "container" meant in Zope 3.
>
>
> At present, a page template in Zope 3 provides (among others) these
> namespaces:
>
> here the content component
>
> container the view component that is the view currently presented
>
>
> I suggest renaming these to be:
>
>
> context the content component
>
> view the view component that is currently being presented
>
>
> Actually, perhaps view should be "presentation", as it could be a
> resource or other presentation component that is being presented.
> However, "view" is nice because it is short and easy to remember.
>
> Having "context" represent the content component is consisitent with
> other uses of "context" and "getContext" in Zope 3.
>
>
> If this proposal gets widespread support, and a nod from the pope, I
> volunteer to make the required changes throughout the zope 3 branch.
Martijn Faassen replied positively, and recommended using the same names
for Python Scripts (when they are implemeted). He preferred "view" over
"presentation".
Jeffrey P Shell replied expressing no preference, but saying that
"context" for the content component would be better than "content", as
not everything is content. "Context" is a more flexible term.
No-one else replied on the mailing list. I had a couple of chats on IRC
with people, and feedback for the proposal was positive.
So, unless there are any objections, I'll go ahead and do this next week.
--
Steve Alexander