[Zope] number of days of a month

J Cameron Cooper jccooper at jcameroncooper.com
Sun Oct 5 19:03:38 EDT 2003


>
>
>But such a simple calculation needs an ExternalMethod ?
>
It's the easiest way. But if you trust the python module, you can allow 
its import into Zope, and use it from a Python script which can be 
called from DTML or ZPT.

>DTML is not so useful, isn't it.
>
It's useful for rendering web pages. It's not very useful for programming.

Python, on the other hand, is very useful for programming, and dreadful 
for rendering web pages.

>I'm a beginner of Zope,
>and feel that DTML is not so powerful to
>develop my custom application.
>  
>
It's not. And it shouldn't be. DTML, in fact, may be too powerful, which 
leads into the trap of mixing logic and presentation. Which will 
invariably make a terrible mess of your code and make redesigning either 
the logic or the presentation a pain. One of the reasons ZPT was 
invented was to be better at being less useful for programming.

The developers of Zope have come to believe that separation of 
presentation of logic and presentation is a good thing, and have been 
gradually making this the most obvious way to do things. Having seen the 
results of having fallen into that trap, I totally agree with this approach.

            --jcc




More information about the Zope mailing list