[Zope3-dev] Proposal: More obvious TALES namespaces

Jeffrey P Shell jeffrey@cuemedia.com
Fri, 15 Mar 2002 11:07:17 -0700


On 3/15/02 6:56 AM, "Martijn Faassen" <faassen@vet.uu.nl> wrote:

> Steve Alexander wrote:
>> I suggest renaming these to be:
>> 
>> 
>>   context    the content component
>> 
>>   view       the view component that is currently being presented
> 
> Sounds a lot better. Does Zope 3's current 'container' have anything
> to do with 'container' in Zope 2? Note that I also strongly recommend
> using the same names for Python Scripts. :)
> 
> You could also name 'context' to 'content', but I understand 'context'
> is in current use in Zope 3.

Content is terrible in my opinion.  Everything != Content (and I personally
am not fond of the 'content' object being the name for the common business
object in Zope, but I'll not complain so long as Zope 3 doesn't take too
much of a content focused view.  I tried writing a CRM/Project Tracking app
using the CMF, and too many content-focused aspects of the CMF got in the
way of my objects which had a slightly different purpose in life than most
documents/forms/image types).

> If you did the latter, it'd be almost the same as the thing I've hacked
> together in Zope 2 to do something like this. :)
> 
>> 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.
> 
> Yes, view is nicer.
> 
>> Having "context" represent the content component is consisitent with
>> other uses of "context" and "getContext" in Zope 3.
> 
> Right, which is why we're not calling it 'content'. I imagine also because
> sometimes you're not talking to a content component directly but to something
> else layered above the content.

Exactly.  The word 'context' is flexible enough to be used in multiple
situations, while 'content' binds it (no pun intended) too tightly to a
particular one. 

-- 
Jeffrey P Shell 
www.cuemedia.com