[Zope] DTML Documents vs. Methods--Again? Yikes!

Michel Pelletier michel@digicool.com
Fri, 20 Aug 1999 12:59:51 -0400


> -----Original Message-----
> From: Tim Wilson [mailto:wilson@chemsun.chem.umn.edu]
> Sent: Friday, August 20, 1999 11:19 AM
> To: hoekstra@fswrul.fsw.leidenuniv.nl
> Cc: Zope@zope.org
> Subject: RE: [Zope] DTML Documents vs. Methods--Again? Yikes!
> 
> 
> On Fri, 20 Aug 1999, Rik Hoekstra wrote:
> 
> Hi Rik. Thanks for your help.
> 
> 
> So, for example, if I create a navigation header to be used 
> in a number of
> pages, a DTML Method would be the ticket, right? It still 
> seems to me that

Yep.

> if DTML Documents are more flexible with their ability to 
> have properties,
> why would you need DTML Methods? I understand some of what 

Because the seperation of content and code is a handy thing.  Granted,
you can put code in your content (DTML in a Document) and content in
your code (stuff in a Method) but the two are there to help you
seperate.  You can of course abuse this as much as you want.  Methods
are useful when you want to write a highly dynamic component that uses
the content found in it's context.  This is why they don't have
properties, you don't want the methods own properties sneaking in on you
and interfereing with what 'looks' like correct code.

> you've written
> above, and I suspect that it explains why DTML Methods are so 
> useful. I'll
> study it more.
> 
> What's the typical DTML Document/DTML Method ratio? 
> 

That depends on your application.

> Also, is it possible to convert a DTML Document to a Method? How about
> vice versa?
> 

Not yet.  But there's allways cut and paste. ;)

-Michel

> -Tim
> 
> --
> Timothy Wilson       | "The faster you  |  Check out:
> Henry Sibley H.S.    |  go, the shorter | http://slashdot.org/
> W. St. Paul, MN, USA |  you are."       | http://linux.com/
> wilson@chem.umn.edu  |       -Einstein  | http://www.mn-linux.org/
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>