[Zope] Possible new user questions

Chris McDonough chrism@digicool.com
Thu, 13 Jan 2000 20:44:27 -0500


Derek Simkowiak wrote:
> 
>     Howdy,
>         I'm just about to start a large web-based project.  Lots of files,
> SQL backend, user logins, etc.  Something like themes.org, slashdot.org,
> or freshmeat.net.
> 
>         I'm considering starting it with Zope, which I have only recently
> discovered.  However, I have the following "fears":
> 
> 1) It will be too slow
>         How does the integrated ZServer compare to, say, Apache or
> Netscape Enterprise Server?  Is ZServer the fastest way to use Apache?

ZServer's HTTP server is probably the fastest way to use Zope, yes...
but as I understand it, Zope with an Apache front-end is pretty fast
with FastCGI too.  Depending on your hardware, you can probably expect
to be able to sustain between 15-80 hits/sec.  Not nearly as fast as
static pageserving, probably not as fast as mod_perl or ASP, but not too
bad considering Zope's level of dynamicism.  If a majority of page hits
come in a 10-hour period, even if Zope limped along at 15 hits/sec, this
would mean you could serve 540,000 page hits in that period.  Bruce
Perens reports that his Zope site (technocrat.net) went through a number
of Slashdottings and served nicely.

For all the magazine talk about everybody needing something capable of
sustaining some ridiculous number of page hits/sec, I don't personally
know anyone operating a site that Zope couldn't keep up with.  If you're
Amazon.com, maybe you'd look into ZEO or something, but if you're
putting up a Linux user group page or something along those lines,
Zope's probably going to frequently be tapping its fingers waiting for
the next request.

> 
> 2) I will get trapped into the product
>         I don't know Python.  I *do* have experience with Perl and some
> PHP. If I spend a bunch of time learning DTML, will I still wind up
> getting forced into using Python, a language I have no experience with?

Unfortunately, TANSTAAFL ("there aint no such thing as a free lunch"). 
It helps a lot to know some Python when using Zope, but it's not
strictly a requirement.  You can do a *lot* with DTML and ZClasses but
you'll ultimately produce better apps and conquer the Zope learning
curve faster if you know a little Python.  So, the literal answer is no
but the effective answer is probably yes.  The good news is that if
you're learning Zope, you're really learning Python in a fashion because
all the objects in Zope are actually Python objects.  So learning one is
complementary to learning the other.  There's been some talk at DC of
aiming to create interfaces to other languages inside Zope (e.g. Perl),
but no promises.

Probably more importantly though, one of the fundamental differences
between Zope and PHP/Perl (as indicated by the name "Zope" -- the Z
Object Publishing Environment) is that Zope (and Python) take a much
more object-oriented view of app development.  This doesn't necessarily
make it harder.  OO development makes a lot of things a lot easier and
more maintainable.  But it does require an investment in time to learn
some new terminology (e.g. what's a method?, what's inheritance?)

> 
> 3) I won't be able to do what I'm used to
>         I read that ZServer doesn't support virtual hosts.  So if I want
> to manage several websites through Zope, does that mean I need a separate
> IP Address for each website?  Or would all of my URLs need to look like
> 
> http://server/Site1
> http://server/Site2
> etc.

I must admit I've never used them, but Evan Simpson has come up with
SiteAccess, which is some sort of virtual-hosting-capable product for
Zope.  Additionally, Michel Pelletier at Digital Creations has authored
another one that is probably going to be included in the DC "Portal
Toolkit" (which will be demoed at the upcoming International Python
Conference).  I may be way off base here as to the intent of these
products, so you should check them out yourself if you plan on virtual
hosting.

> 
>         Also, is there anyway to use PHP on a Zope-managed website?  Is
> it possible to use regular CGI programs through ZServer as well as the
> Zope Objects?

The answer to both those questions is probably one in the same:  Not
with ZServer.  Instead, use Apache to front-end Zope instead.  With some
clever planning and configuration, I imagine it's possible to use
mod_php, mod_perl, mod_whatever, plus normal CGI as well as Zope all
front-ended by Apache.  I know for a fact that it's at least possible to
use both vanilla CGI and Zope frontended by Apache.  Netscape Enterprise
Server works well in this capacity too.

-- 
Chris McDonough
Digital Creations, Inc.
Zope - http://www.zope.org