[Zope] DTML calendar widget

Amos Latteier amos@aracnet.com
Wed, 10 Feb 1999 11:33:28 -0800


At 03:06 PM 2/9/99 -0600, Kent Polk wrote:

>> It should be possible to click on a link to see a more detailed listing
>> for an event. This might actually involve creating a separate 'Event'
>> product/class/lever/whatzit and dropping it in, although I'm not sure
>> how you would create events that spanned several dates.
>
>This is where we want to go with this stuff, however, a 'calendar
>product' appears a bit too limiting, thus why Ty implemented the
>calendar wrapper in dtml.

The calender is very cool! However, I would advise against using a DTML
tag. I think that using a real Product would be much more flexible and useful.

If you are concerned about the display of your object, and think that using
a DTML tag will buy you more flexibility, think again ;-) IMO the best way
to flexibly display an object is to allow the creation of different DTML
methods to display it. One slick way to do this is to make your Product as
a Folderish. Then you can create different view of it inside it! Otherwise,
you can always create DTML methods outside your object and use acquisition
to bind your DTML methods to your object.

Another argument in favor of using a Product rather than a tag is that a
Product exposes its methods to other Python objects. I would love to be
able to write an external method that did something like import my desktop
calender data and updated my Calender object. By creating a reasonable
interface to your Product, you allow people to extend it and use it in ways
which you do not explicitly expect. This is good and easy--just write
methods, add doc strings, and permissions--bingo you've got an extensible,
documented, customizable, object!

Just my two cents.

-Amos

P.S. Keep up the great contributions you guys rock!