On Wed, Dec 28, 2005 at 12:26:13PM -0330, 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.  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?


It would make the developers' job harder.  I would have to bite the
bullet and write methods for all the little 'python:foo and bar'
snippets (no boolean operations in TALES).

The most difficult part will be to change expressions like

   tal:content="python:view.someMethod(arg1, arg2)"

where arg1/arg2 come from nested tal:repeats etc. You would have to
write a view method to wrap the inner objects deep inside lists of lists
of lists.

I think in the end you would get better code, and better page templates.
"Better" here means "more readable, more maintainable, less buggy,
better tested".

Marius Gedminas
Professionalism has no place in art, and hacking is art.  Software Engineering
might be science; but that's not what I do.  I'm a hacker, not an engineer.
        -- jwz

Attachment: signature.asc
Description: Digital signature

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to