Hi, I used to create DTML methods to generate my HTML pages, but several of them are more "logic oriented" than "presentation oriented" (with a lot of <dtml-if...> !). I've seen here and there that Python scripts are really faster than DTML methods to handle such conditions, but I'd like also to keep DTML methods for several ones. Are there any drawbacks to mix DTML methods and Python scripts, calling each other, instead of keeping "pure" DTML methods ?? Thanks for any advise... Thierry -- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
On Mon, 2003-03-24 at 09:05, Thierry FLORAC wrote:
Are there any drawbacks to mix DTML methods and Python scripts, calling each other, instead of keeping "pure" DTML methods ??
I would say that mixing DTML and Python is how DTML *should* be used. DTML is a great tool for templating and for calling other Zope objects... it is typically the wrong tool for significant logic. Ideally (IMO) DTML should do little more than grab a dictionary and insert its values into a template. DTML's branch and loop constructs should only be used to the degree that they are necessary to correctly render an interface. As for "calling each other" you'll probably see the best results if you're using DTML to call Python, not vice versa. It's usually easier to maintain stuff set up this way. HTH, Dylan
participants (2)
-
Dylan Reinhardt -
Thierry FLORAC