Hi, I am getting started with Zope and really enjoying it. I am reading the Zope book and tumbled over this comment: Anonymous User - Apr. 29, 2004 10:57 am: According to the ZopeWiki, you should NEVER use ZClasses. http://www.zopewiki.org/ZopeDosAndDonts Anonymous User - Sep. 25, 2004 1:10 pm: Why do I learn about ZClasses if I am not supposed to use them? (I checked zopewiki, it really says you aren't supposed to!) Should I use ZClasses? If not what should I use instead? Eddy
--On Freitag, 1. Oktober 2004 9:51 Uhr +0200 Eddy Ilg <eddy@fericom.net> wrote:
Should I use ZClasses?
No.
if not what should I use instead?
Learn about the basic concepts in Zope like ZPT, PythonScripts, ExternalMethods. if you are familiar with Python write your own Python Products -> Zope Developers Guide -aj
I have used ZClasses a few times and was disconcerted by the advice to avoid them. Anyway, having just started on 'real' products I can recommend this How To: http://www.zope.org/Members/maxm/HowTo/minimal_01/ Cliff Andreas Jung wrote:
--On Freitag, 1. Oktober 2004 9:51 Uhr +0200 Eddy Ilg <eddy@fericom.net> wrote:
Should I use ZClasses?
No.
if not what should I use instead?
Learn about the basic concepts in Zope like ZPT, PythonScripts, ExternalMethods. if you are familiar with Python write your own Python Products -> Zope Developers Guide
-aj _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Eddy Ilg wrote at 2004-10-1 09:51 +0200:
I am getting started with Zope and really enjoying it. I am reading the Zope book and tumbled over this comment:
Anonymous User - Apr. 29, 2004 10:57 am: According to the ZopeWiki, you should NEVER use ZClasses. http://www.zopewiki.org/ZopeDosAndDonts
Anonymous User - Sep. 25, 2004 1:10 pm: Why do I learn about ZClasses if I am not supposed to use them? (I checked zopewiki, it really says you aren't supposed to!)
Should I use ZClasses? If not what should I use instead?
There are strong differences in the opinion about "ZClasses". There are still and have been (in the past) some problems with ZClasses. Due to these problems, some people think, ZClasses should not be used. I do not share this opinion. The problem that is still there: you must not inherit from a ZClass defined in a different product. While it apparently work in the first place, it will break as soon as you export your product (the link between deriving and base class is lost). That is nasty, if you are unaware. There are thousands of unit tests for Zope. These unit tests ensure, that the likelyhood it high, that Zope still works in new releases. However, there are almost no unit tests for ZClasses. As a result, ZClasses broke often between releases. Usually, it was only a minor issue -- but maybe, too large that you could fix it yourself. These are the (known) risks. I used to use ZClasses for large projects -- and did not make bad experiences. It is very easy to integrate standard Zope objects in your own ZClasses to create new applications. I even created abstract ZClasses and mixin classes. All worked very well. Nowadays, I no longer use ZClasses. We moved over to the CMF and Archetypes. They provide similar bundling features as ZClasses, are much more efficient (with respect to runtime) and the code is maintained in the file system and thereby subject to standard revision processes. The latter is essential for really large projects. You must learn a lot when you want to follow this route -- much more than when you use ZClasses. To summarize: when you are still learning or you make smaller prototypes, you can use ZClasses. For long living projects or (runtime) resource critical applications, file system based code is superior. It is faster and can be revision/source controlled. -- Dieter
participants (4)
-
Andreas Jung -
Cliff Ford -
Dieter Maurer -
Eddy Ilg