RE: [Zope] ZPublisher/ZTemplate questions
James wrote:
My first question has to do with using templates with ZPublisher: Will I still get to use all the nifty "var", "expr" and flow control constructs in my dtml, or will I be limited because my stuff in not running within Zope? Do I need to get the ZTemplate package to do this, or does ZPublisher have this stuff built in?
You can use ZPublisher and ZTemplate. This is what Skip is doing at MusiCal with good results.
Second, where can I get documentation and examples on using ZPublisher and ZTemplate on their own?
Uhh, that's a different point :^) http://www.zope.org/Documentation/Reference/ObjectPublishingIntro http://www.zope.org/Documentation/Reference/Trinkets
Third: Will ZPublisher run with the embedded Python/Apache system, or do I need to use pcgi?
Can't comment on PyApache. You can use PCGI or you can do as Skip and Andreas do an use mod_proxy to connect Apache and ZPublisher.
Fourth: If I want to maintain state/session information inside my code, which of the above solutions will work better? I know that Apache instances only last for N requests, does Python/Apache have a shared memory system to handle this. (Sorry if this is off topic, but I figure someone here must have played with it)
That's why you don't want to use PyApache. Have a separate ZPublisher long-running process.
Thanks for all the help, I'm really excited to get started with Python. ColdFusion is frustrating because it's so limited, and Java Servlets are frustrating because they are too much work.
Oh you're just sweet talking us :^) --Paul
Paul Everitt wrote:
James wrote:
My first question has to do with using templates with ZPublisher: Will I still get to use all the nifty "var", "expr" and flow control constructs in my dtml, or will I be limited because my stuff in not running within Zope? Do I need to get the ZTemplate package to do this, or does ZPublisher have this stuff built in?
You can use ZPublisher and ZTemplate. This is what Skip is doing at MusiCal with good results.
Second, where can I get documentation and examples on using ZPublisher and ZTemplate on their own? Third: Will ZPublisher run with the embedded Python/Apache system, or do I need to use pcgi?
Can't comment on PyApache. You can use PCGI or you can do as Skip and Andreas do an use mod_proxy to connect Apache and ZPublisher.
Wow, that seems interesting ;) Is mod_proxy usable as a replacement for PCGI (pcgi-wrapper) ? Where can I learn more about it ? ---------------------- Hannu
On Fri, 19 Feb 1999, Paul Everitt wrote:
You can use ZPublisher and ZTemplate. This is what Skip is doing at MusiCal with good results.
cool.
Second, where can I get documentation and examples on using ZPublisher and ZTemplate on their own?
Uhh, that's a different point :^)
http://www.zope.org/Documentation/Reference/ObjectPublishingIntro http://www.zope.org/Documentation/Reference/Trinkets
I've read both of these documents, and they provide a good tutorial on writing code. What they are both missing is how to actually invoke a ZPublisher object. What do I do after I've written Hello.py? I guess this is related to using pcgi, but there doesn't seem to be a document on how to set it up to work with ZPublisher. I think I need something similar to Zope.cgi that invokes ZPublisher instead.
Third: Will ZPublisher run with the embedded Python/Apache system, or do I need to use pcgi?
Can't comment on PyApache. You can use PCGI or you can do as Skip and Andreas do an use mod_proxy to connect Apache and ZPublisher.
How does this work, does the proxy forward requests to ZHTTPServer?
Thanks for all the help, I'm really excited to get started with Python. ColdFusion is frustrating because it's so limited, and Java Servlets are frustrating because they are too much work.
Oh you're just sweet talking us :^)
Oh, and I hate NT too. =) [] James A. Hillyerd <jamesh@altavista.net> Java Developer [] HyperGlyphics: http://www.hyperglyphics.com/ [] GPG Public Key Fingerprint for 1024D/9F956CDE (Expires 2000-02-01): [] C86F B073 92DF 1E24 EF0B 0118 6061 0FEC 9F95 6CDE
On Fri, 19 Feb 1999, James A. Hillyerd wrote:
I've read both of these documents, and they provide a good tutorial on writing code. What they are both missing is how to actually invoke a ZPublisher object. What do I do after I've written Hello.py? I guess this is related to using pcgi, but there doesn't seem to be a document on how to set it up to work with ZPublisher. I think I need something similar to Zope.cgi that invokes ZPublisher instead.
The easiest is to call ZopeHTTPServer on your module ie: ZopeHTTPServer Hello.py Medusa has a bobo_publisher which I have used a lot. It is very stable and impressively fast. Pavlos
participants (4)
-
Hannu Krosing -
James A. Hillyerd -
Paul Everitt -
Pavlos Christoforou