Lennart Regebro wrote:
>>"...what gets viewed and for what request as well as the names of the
>>actual browser pages, are intrinsic to the implementation. Why are
>>the page names intrinsic? Because the different method refer to each
>>other in URLs, form handlers and redirect calls."
> But that's no more intrinsic than any other naming. So again, either
> all naming should be in python, or all in ZCML. And I think it should
> be in ZCML, if for no other reason ten that the @-syntax reminds me
> way to much about security.declareProtected shims and I don't like it.
Hehe, you definitely have a point with the declareProtectes junk.
> To me it feel like you are trying to force non-code into the code. So
> then, why not have it in the ZCML? We need to have the ZCML-statements
> there anyway.
> Besides, somebody might like to override a page but keep the old page
> under a new name (although admittedly that would be unusual).
Perhaps not that unusual. It's a good point and actually the only "hard"
case against the name in Python.
>>>>Naaaah. I don't like this, but I can't tell you why. Maybe just
>>>>because it's too complicated.
>>It's not my invention. It's in zope.formlib and it's being used, whether
>>you like it or not :).
> To be clear here, what I'm unsure about is getting rid of the
> automated class generation in the case of page templates with no
> view-class logic.
Ah, ok. Well, I'm not 100% sure myself, but I would tend to say we
should define things in Python first and then register it (Jim seems to
think so too). Of course, we should also look at some of our usecases.
For example, has anyone had people, who don't know or can't handle
Python AT ALL, hook up page templates?
>>>What's the difference between boiler plate class and boiler plate ZCML?
> In this case, the difference is that you have to do it twice. ;-)
> Having these "empty" boilerplate viewclasses does not get rid of the
Yes and no. In some way it's boiler-plate, for example the
zope.formlib.Page superclass. However, it's also very declarative
because Page contains certain essential view logic that would otherwise
be added magically. In other ways, it's not really boiler-plate but
moving information from ZCML to Python, for example the information
contained in adapts().
So, all in all, the boiler-plate isn't useless. It's just declarative,
and I don't think it's overly wordy.
Zope3-dev mailing list