A couple of questions from a newbie
Hello, everyone. I've been reading up on Zope, and it's quite interesting; I still have a couple questions that The Zope Book doesn't answer, though. First of all, is there any reason to use a relational database instead of the ZODB? I would think that the ZODB would get bad performance when filled with too many user-created objects, like forum posts; is that true? Also, is it better for a Python script to call a page template or vice-versa? I would think that it would be better for the template to call the script so that other scripts and templates can use the script's output, and so that it can be cached without caching the template's header and footer which might be user-specific, but The Zope Book usually has the script calling the template.
Hi Leif, Leif K-Brooks wrote:
First of all, is there any reason to use a relational database instead of the ZODB? I would think that the ZODB would get bad performance when filled with too many user-created objects, like forum posts; is that true?
The ZODB performs very well for such data text-oriented data, although more structured data is perhaps best held in an RDBMS. Zope has good RDBMS connectivity, so you have the choice to handle the data in the most appropriate way - but with the RDBMS as well as the ZODB rather than instead of.
Also, is it better for a Python script to call a page template or vice-versa? I would think that it would be better for the template to call the script so that other scripts and templates can use the script's output, and so that it can be cached without caching the template's header and footer which might be user-specific, but The Zope Book usually has the script calling the template.
I'd like to know if there is a one-size-fits-all answer to this question myself - I always call scripts from templates, but that has more to do with my own understanding of it than anything else. The predominant mind-set in the Zope community seems to be that of a Python programmer, and from that perspective calling the template from the script makes sense. I am a refugee from ASP, so once I had been re-educated to stop trying to mix code and mark-up I found myself calling scripts from templates. -- Regards, PhilK Email: phil@xfr.co.uk / Voicemail & Facsimile: 07092 070518 "Work as if you lived in the early days of a better nation." - Alasdair Gray
participants (2)
-
Leif K-Brooks -
Philip Kilner