[Zope] Re: [ZWeb] Feedback

Martijn Pieters mj@digicool.com
Tue, 19 Dec 2000 18:46:49 +0100


Hi Martin,

I moved this thread over to the Zope mailinglist; the Zope-Web mailinglist
is intended for discussion related to the Zope.org website itself. You'll
get more feedback on the Zope mailinglist.

On Tue, Dec 19, 2000 at 05:41:34PM +0100, Edwin Martin wrote:
> The last couple of months I developed a dynamic website in Zope.
> 
> You can take a look: http://www.joods.nl/, but be warned: it's Dutch.

Cool, I always like to see more Dutch websites. I never really convinced
my colleagues at my previous employer about the advantages of Zope; they
were/are entrenched in the Java point of view of the world. I did manage
to convince my COO though, who is now starting his own Zope-driven
business.

You may want to tap into the Dutch Zope community as well; see
http://zll.zopatista.com:9673/

> I used  Zope 2.1.6 with python 1.5.2 on Debian Linux 2.2r2.
> 
> While developing in Zope should be fast, unfortunately, it was not.
> 
> Some minor things, which would be no problem in any other
> language, took me hours to do in Zope.
> 
> Here is a list. I'm sure some things are already solved in the newest
> version of Zope. I'm posting this list not to offend, but to help you
> improve the system.

Feedback is always welcome, please keep it up.

Indeed, many issues are already solved in the current release of Zope.
Note that Debian Woody has the most recent version, 2.2.4, packaged as a
.deb distribution. You don't need to upgrade to Debian Woody to be able to
run this; you can download the distribution and use dpkg --install
manually:

  http://packages.debian.org/unstable/web/zope.html

> 1) When I make an error in an DTML-page, all my changes are
> lost! This is really frustrating. And unnecessary.

This is more a browser cache issue, where the browser (esp. Netscape,
IIRC), would re-retrieve the edit form when pressing the Back button.
Try tuning your browser cache parameters.

> 2) Variables with a minus-sign in it! Who came up with that?
> Now I have to write <dtml-var expr="_['sequence-length'] > 10">.

Yep, they are lame. They are a remnant of the times before expressions in
DTML where added, something that many regard as a mistake.

You can use <dtml-var> to create an alias of such variables. Another
option is using external methods to deal with the coding of these areas;
usually you are dealing with logic, not presentation, and that is better
suited for Python code. DTML should only be used for presentation.

In Zope 2.3 you'll be able to use Python Script objects for this as well,
giving you TTW python code.

> 3) sequence-start is only valid at the beginning of <dtml-in>.
> This really limit it's use, for example to print a 'previous'-button
> on the bottom of the page.

You can use a seperate <dtml-in> construct for that, using the 'previous'
or 'next' attributes.

> 4) Zope has an Image object, but you can't ask for the width and
> height (which should be trivial).

You can actually. In DTML:

  <dtml-with image>This image is &dtml-width; wide</dtml-with>

> 5) You can use <dtml-var myImage> to show an image. But it's
> not possible to set border=0, which is also trivial.

Use:

  <dtml-var "image.tag(border=0)">

The tag method generates an <img> tag for you, with the extra attributes
inserted. You can also use this to remove or replace the autogenerated
alt, width and height attributes, or scale the width and height values.

> 6) I invested some time to learn ZClasses. Only to find out the
> query-features are very poor, which made it useless to me.
> Now I only use 'real' databases.

Query features? Could you elaborate?

> 7) The <dtml-let> tag is nested. So how can I remember a value
> I discovered in an <dtml-in> loop?

I am not sure what you mean here. Within a <dtml-let> tag the surrounding
namespace is still available, including the <dtml-in> loop values.

> 8) I made a big HTML-form to post and edit articles.
> To make a form to edit an article, I used:
> <dtml-in getArticle>
> <form..>Big form here</form>
> </dtml-in>
> But how can I use the *same* big form for a new article?
> I think putting the form in another file (as I did) is not the right solution.

Why not? Putting the form into a seperate DTML Document or Method would
make the form a reusable object, which to me looks like the right thing to
do in this case.

> 9) I consider this a bug: <dtml-var expr="objectValues()[0]">
> gives the value HTML-quoted. Very strange.

I can't reproduce this. What object is returned by objectValues()[0]?
(objectValues returns an array of object instances, of which you select
the first, which is then 'represented' in the output stream).

> 10) It's pretty hard to use a checkbox in a form. Browsers don't
> submit unchecked checkboxes, which result in Key-errors.
> Writing wrappers for every checkbox is an ugly way to solve this.

Use a hidden value with ':default' appended to the name. This makes the
variable alwas available, browsers always send hidden fields, even if the
value is empty:

  <input type="hidden" name="a_checkbox:default" value="">
  <input type="checkbox" name="a_checkbox" value="1" checked>

Even if the user now unchecks the 'a_checkbox' box, your object will be
handed a 'a_checkbox' paramater, which will be an empty string.

> 11) Some dates in my (MySQL) database are "0000-00-00 00:00:00".
> I couldn't find a way to handle this in Zope. All I got was errors.
> Even putting the code between <dtml-try> tags didn't solve it.

You may want to contact the author of the MySQL db adapter you are using
and file a bug (with testcase).

> 12) Zope's homepage says: "Zope enables teams to collaborate...".
> But Zope doesn't provide tools to prevent users editing the same
> document at the same time. Check-in and -out mechanisms are
> really important in "collaborating teams".

You can use Version objects; they have a downside in that they lock
objects that have been altered. Not CVS yet, but gives you minimal
checkin-checkout support.

> 13) Zope inserts a <base href=".."> tag in every page. Because I
> put Zope behind a Apache proxy, this is really horrible. I still couldn't
> find a way to turn this off.

You can use the SIteAccess product for this; it'll rewrite Zope's internal
notion of what the base URL should be. www.zope.org runs behind Apache
with this. Many others on the Zope list can help you configure it.

> 14) I saw the documentation has improved last week. Unfortunately
> it was too late for me. It was (excuse me) really bad. I hope someone
> with teaching-skills will rewrite the text.

What documentation are you referring to? The Zope.org documentation page
at www.zope.org/Documentation now also lists status; you can see at a
glance what documentation is new and what isn't. You can also send
detailed comments to docs@digicool.com.

> 15) I and someone else tried to install the MySQL database adapter
> under Red Hat Linux. Using detailed instructions and common
> sense didn't help. Fortunately, installing under Debian was much
> easier. I thinks many others will not change their Linux distribution
> or database system and just forget about Zope.

If you contact the maintainer of the Product, maybe the procedure could be
improved?

> I hope some day we will have a open source content management
> system that can compete with the commercial ones.

If you've ever seen Vignette's and Broadvision's solutions from close by,
you'll agree that that isn't too hard. :) 

I'll let others comment on the competitive strengths and weaknesses of
Zope though, I may be biased. ;)

-- 
Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------