[Zope] What is the best way to do this?

Jens Vagelpohl Jens@digicool.com
Tue, 4 Jul 2000 22:09:04 -0400


alex,

IMHO when you try to do stuff using ZClasses and DTML and it starts
looking too complex to you then it is. DTML is made for presentation,
not for driving an application.

a very sound architectural approach, and one that scales very well as
your site and organzation grows, is a base of python-based zope products
with ZClasses that derive from them. all the logic happens in the python
product and all presentation is in the derived ZClasses. this will not
only speed up your code but it will also make it easy to control
presentation because that is stored in the ZODB and can be manipulated
through the web. the only drawback is that a change in the underlying
python product code requires you to restart zope.

if you're like me and can't stand messy and kludgy code you will
appreciate the extra effort spent on writing a real python zope product.

for starters look at "How to create a Boring Product" at
http://www.zope.org/Members/gtk/Boring/HowTo-Boring . this will explain
some of the structure that is needed for a python class to become a
"zope product". another guide is at
http://www.zope.org/Members/Zen/howto/ProductAPITutorial . for the
latest changes that need to be considered when writing a product for
zope 2.2 read brian's guide at
http://www.zope.org/Documentation/How-To/ProductAuthorUpdateGuide .

a good deal of knowledge can be gained from simply looking at the code
of products available in your zope install under
<zope>/lib/python/Products. 


jens

----

Jens Vagelpohl		jens@digicool.com
Software Engineer	      www.digicool.com
Digital Creations 	(888) 344-4332

Got Zope?

---- 
 

> -----Original Message-----
> From: agould@ponzi.oit.umass.edu [mailto:agould@ponzi.oit.umass.edu]On
> Behalf Of Alex Gould
> Sent: Tuesday, July 04, 2000 21:11
> To: zope@zope.org
> Subject: [Zope] What is the best way to do this?
> 
> 
> 	Hello zope-masters, I humbly ask your advice on several 
> matters.  I am
> making an internal website for a statewide student activist group with
> many members.  It will hopefully feature discussion boards, a contact
> database, and a calendar of events.  I want to make the users of the
> site part of the contact database, so that an entry in the database (a
> name, phone number, etc.) can be easily "promoted" into a user with a
> password and varying priveliges based on his/her role (volunteer, core
> member, board chair, etc.)
> 	Another feature I want to include is regional 
> specialization - each
> contact/user, calendar event, and forum has an associated "region" -
> statewide or a specific campus or something in between.  That way a
> user's default view of the statewide calendar won't be cluttered by
> irrelevant events, and a search through the contact database would by
> default only return results pertaining to the user's region.
> 	I've tried building some custom zClasses but when 
> things start to get
> complex the dtml code gets really messy, so I think I should use
> external methods to do most of the work.
> 	Basically I'd appreciate any advice on how to put these 
> ideas into code
> or pointers to relevant documentation.  I don't mean to sound like
> "here's my very complicated plan, write the code for me", I just need
> some tips on how to get started.  Thanks.
> 
>  
> -------------- 
> Building highways to reduce traffic is like 
> loosening your belt to reduce obesity.
>