Re: [Zope3-dev] RFC: abolishing python: expressions in ZPT TALES
--On 28. Dezember 2005 17:29:11 +0100 Andreas Jung [EMAIL PROTECTED] wrote: --On 28. Dezember 2005 11:04:09 -0500 Jim Fulton [EMAIL PROTECTED] wrote: What do you all think? +1 Views make it much easier to keep Python code in Python modules. python expressions should be strongly discouraged in ZPT, IMO. -0.5 - there a situations especially when prototying things when view classes are just overhead and counterproductive. Another argument against removing python expressions: in Zope 2 scripters could directly modify and test templates, script etc. (also using the skins tool). In Z3 you have to restart the server at least for view classes (but not for templates). -aj pgp4b3r3tr8eh.pgp Description: PGP signature ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: RFC: abolishing python: expressions in ZPT TALES
Andreas Jung wrote: Another argument against removing python expressions: in Zope 2 scripters could directly modify and test templates, script etc. (also using the skins tool). In Z3 you have to restart the server at least for view classes (but not for templates). Personally I would say implement logic that allows view classes to be reloadable rather than relying on zpt for exactly this reason if this is indeed something developers need/want (I would love for such a feature). This was also one of the nice things about writing python scripts as a skins item with CMF as it was instantly reloadable. - Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com ServerZen Hosting -- http://www.serverzenhosting.net News About The Server -- http://www.serverzen.net ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] RFC: abolishing python: expressions in ZPT TALES
On Dec 28, 2005, at 5:00 PM, Igor Stroh wrote: Rocky Burt wrote: ... Its my personal opinion that anytime a page template requires logic complicated enough to warrant using a 'python:' expression, that logic should be re-thought and placed into a view class. ... First, I have sympathy with those who want this to be a documentation change, possibly with a permanent default-but-configurable warning, rather than ripping out the feature. I think python: has been around too long to change without a full reinvent TAL for 2.0 or switch to an competing templating technology discussion. It's too much a part of standard in-the-trenches TALES usage. +/-0 I'd give it a +1 if TAL would support boolean operators :) Second, I agree with Igor than booleans are the time when I still pull out the python: bit of the TALES toolbox. If we remove or deprecate python:, I'd like to have a replacement. The other replacements people have mentioned for the python: feature are list item access and calling with arguments. I don't care as much about the list item access, but wouldn't object to it. I'm opposed to a new TAL syntax that allows calling with arguments: that's the core of the python: feature, and what many are opposed to. Gary ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] RFC: abolishing python: expressions in ZPT TALES
-1. I use them very rarely, and expect to use them less with Viewlets now in the picture. But there are still little situations where Python expressions are handy, especially on big-macro templates where there's not a backing view. I'm not advocating programming in page templates, but there are some boolean or quick-transformation (ensuring a potential iterator/generator is a list and has length) that needs to be done out in this phantom land. As I mentioned above, I really believe that Viewlets and Viewlet Managers will help with these big complex templates which provide the look and feel of the front page or the basic template. But I know that sometimes, when putting those pages together from a designers input on a tight deadline with multiple browsers to test, the quick math and other small expressions we can squeeze into those spots have been a life-saver, even in recent weeks. On 12/28/05, Rocky Burt [EMAIL PROTECTED] wrote: Hi all, Please don't mistake this as a proposal or anything of the sort but I was just curious what the rest of the zope3 community thought on this particular topic. (Please forgive me if this topic has been exhaused to death already) Its my personal opinion that anytime a page template requires logic complicated enough to warrant using a 'python:' expression, that logic should be re-thought and placed into a view class. I know that some python: expressions are fairly simple, but for an HTML designer, *any* python: portions are dangerous to touch (and shouldn't be touched by the HTML designer). What do you all think? Regards, Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com ServerZen Hosting -- http://www.serverzenhosting.net News About The Server -- http://www.serverzen.net ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/eucci.group%40gmail.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com