[Zope] Tutorial request
Andreas Kostyrka
andreas@mtg.co.at
Thu, 21 Oct 1999 17:12:38 +0200 (CEST)
On Thu, 21 Oct 1999, Tom Deprez wrote:
> Hi everybody,
>
> I'm wondering if somebody already created this and wants to learn it to
> everybody. It's about a very basic thing, but which lot's of people could
> learn from.
>
> I want to creat a Address-book in Zope. A person can add, edit or delete
> his address. He can view all adresses and sort them by first/last name,
> zip-code. How will we have to start implementing this?
>
> What's the best way? Put all the addresses into Zope or into a database? Do
> we need Python? Or can everything be done with ZClasses?
Well, it can be done:
1.) in python.
2.) in ZClasses/ZCatalog.
3.) with the help of a SQL server and with SQLmethods.
Well, depending upon a number of criteria, you'll need to decide how to
proceed:
-) readability. This is a personal thing, but I'd consider the python or
SQL solution more readable than having the logic in DTML.
-) number of addresses. It might be reasonable to keep 1000 (or 10000)
adresses in ZClasses, 100000 are propably not reasonable anymore.
-) usage pattern. With ZClasses/ZCatalog you can create objects that
can be put at any place in the hierarchy of your site. With SQL
you get rather one big list ;)
(Not necessarily, you can also put additional logic into your SQL
solution.)
-) distribution. Sorting on ease of distribution, I get python, followed
by ZClasses, and as a last ZSQL. (Why? SQL implies that the deployer
will need the same or a compatible SQL server.)
Andreas
--
Andreas Kostyrka | andreas@mtg.co.at
phone: +43/1/7070750 | phone: +43/676/4091256
MTG Handelsges.m.b.H. | fax: +43/1/7065299
Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA