-----Original Message----- From: Ben Glazer [mailto:glazer@scicomp.com] Sent: Tuesday, September 07, 1999 6:08 PM To: zope@zope.org Subject: [Zope] Zope vs. PHP
I have a few questions about Zope.
1. Do any tools exist to make it easy to upload/download an entire website? What about transferring the Zope database over FTP? (The real question here is "How do people backup their remotely-hosted Zope websites?")
The Zope database can be imported/exported in it's native format or XML. There are gobs of ways to put content into Zope via any one of a number of means to detailed to go into here. The answer is 'Yes'.
2. Is it easy to have multiple Zope databases?
Yes. Why?
3. Is there an easy way to do a global search-and-replace over an entire Zope-based web site?
The Zope database contains much more infrastructure than either a flat file or a relational database. The concept of 'search and replace' has no easy definition in such an object system. Of course, you can 'export' the database to XML, munge it, and re-import it, but it would be far saner to understand your problem and programaticly 'search' and 'replace' what you care about, as apposed to some global specification. As an example, lets say you had two objects who both had properties 'author'. And you wanted to globably search and replace 'author' with 'creator'. Ok, no big deal. Now, lets say you also had an object *named* author. Should it be replaced too? It has no semantic relationship to the other two objects who have *properties* named 'author'. The three objects may be completely unrelated.
4. Is there a way to write DTML macros? For example, presume that in my site, I always open tables like this:
<table cellpadding="0" cellspacing="0" border="0" width="100%">
Is there any way to write a dtml tag, say "dtml-table", to abbreviate this? I'm not very familiar with Zope yet; is there a better way to accomplish this task?
Yes, just create a DTML method called 'dtml_table' containing: <table cellpadding="0" cellspacing="0" border="0" width="100%"> and call it in another DTML Method or Document: <dtml-var dtml_table>
Additionally, how easy is it to code new DTML tags? I'm relatively well-versed in Python.
Very easy. As a trivial example, see the Zippy tag: http://www.zope.org:18200/Members/michel/Products/Zippy and MIMETools.MIMETag, which comes standard with Zope in lib/python/Product/MIMETools/MIMETag.py. I use these two as an example because I wrote them. Most of the 'standard' tags can be found in lib/python/DocumentTemplate/*.py
Also, if anyone has used both Zope and PHP, I'd be very interested to see a (more or less) objective comparison of the two. Clearly, this forum favors Zope. Are there situations in which PHP is a better choice? Has anyone yet written a detailed comparison of the two products?
PHP is just code in your layout. Zope has: standard persistence system, abstractions of data into standard objects, standard security model, standard database-transparent Object Relational Integration, web managment interface, FTP, WebDAV, IMAP and XML-RPC native protocol integration and much more. I don't know what PHP has, because I've never used it. Your right, I'm biased. But how about I make a biased prediction? If your versed in Python, after using Zope to the point of 'enlightenment' you use Zope for every project thereafter and not PHP (unless someone pays you, of course ;). -Michel
participants (1)
-
Michel Pelletier