[Zope] Zclass VS ZSQL,Which is easier!

Kuraiken arashi1@pd.jaring.my
Wed, 29 Sep 1999 01:37:48 +0800


chas wrote:
> 
> At 03:37 PM 9/28/99 +0800, Victor Zhai wrote:
> >Hello: all
> >      Can Zclass provider some method of it's own.
> 
> Yes. A Zclass is, wait for it, a class.
> It has properties and methods.
> 

That's right. ZClasses are more general than the Zope classes (like folder etc)
- a ZClass can have DTML methods, external methods and (now) python methods.

> >      Whick is more easy to operate ,Zsql or Zclass.
> 
> This is a strange question. It's like asking 'which is better -
> a battle-tank or a bicycle ?' ... it all depends what you want
> to do.
> 
> ZSql and Zclasses serve different purposes.
> Your Zclass may use ZSQL methods.

I may be wrong but I think he's asking "for storing stuff in a db". Well, if
this is the case, I'd like to say that I prefer ZClasses since I can use the
ZODB without using an "external" (sql) db. This makes "installation/setup"
simpler. And also has the advantage of OO. (you get inheritence, for example)

I think for using the ZODB as your _own_ db, you'll need to understand Zclasses
as well as the ZCatalog (and Zcatalog_aware). Of course, you need to learn DTML. 

With this knowledge and skill set you can then build your database system with
ZODB. If you want to use an SQL db, you can skip ZClasses and ZCatalog (maybe?)
and use DTML plus ZSQL and your prefered sql dbms to implement your project.

ZSQL is pretty simple since it's pretty much "straight" SQL statements placed in
a (what else?) ZSQL method. You'll need to know some dTML to display the data
etc...

Which method is simpler/better? It depends...on your own familiarity (or lack
of) and time and effort. And taste? :-)

-- 
-----------------------------------------
Kuraiken - Python fanatic.
-----------------------------------------
Python. Try it. It'll swallow you whole!
-----------------------------------------