Why do most (not all!!) Zope developers avoid ZClasses?
The process is hard in the long run.
You can't easily use your favorite development tools for source code control etc. The more complex the Product, and the more people on your team, the more awkward through-the-web development becomes.
Restricted (ThroughTheWeb) code is frustrating.
You can't get access to arbitrary Python modules except by writing External Methods, and if you're creating a lot of those, it's actually easier and cleaner to write the whole thing as a Disk-based product in the first place.
Restricted code is slower too.
Testing is a pain.
How do you write unit or functional tests for ZClasses? I have no idea. Tests are good. Write tests.
Converting ZClasses to Disk-based product is a pain.
If at any time you regret the decision to write a ZClass?, you're faced with an almost total rewrite. Save the pain and write a Disk-based product from day one.
Bit-rot.
ZClasses are not popular nowadays, and rarely get the focus of core Zope developers: Thus, the likelihood of bugs and forward compatibility problems increases over time, while the pool of people who can really help you with your ZClasses decreases over time.
What should I do instead of writing ZClasses?
Write Disk-based products.
But the Zope 2 Book tells me all about ZClasses and doesn't say anything about how to write a Disk-based product!
That is arguably a problem with the Zope Book. Hopefully this will be rectified some day.
Further reading
- Death to zclasses! post to zope mailing list
- Philipp von Weitershausen's opinion on through-the-web development