Front Page

ie7 Scripts

The ie7 scripts from http://dean.edwards.name/IE7/ are an indispensable tool to make ie5-6 behave. They allow to use stanard HTML and CSS and remove the necessity for most CSS hacks. I would never do complexer CSS layouts without them.

Hosting gotchas

It's extremely important, that the ie7 scripts are served with a content-type of application/x-javascript; charset=iso-8859-1. At least a charset of utf-8 does not work. So, wehen hosting with Zope, I have not got it to work with a default-zpublisher-encoding other than iso-8859-1

Zope

Zope, IE and file downloads

IE (sometimes? always? often?) has problems offering the 'save as' popup to safe files to download from links. A proposed solution (which I have not yet had the time to verify) is, to set 'Content-Disposition' to 'attachment; filename=blabla.ext' in addition to the 'Content-Type'

Debugging

Developing on the Filesystem

Up to Zope 2.7, I have been using Ape and it's filesystem ZODB storage to manage ZODB code on the filesystem. However, since Zope 2.7 Ape has not been developed further and is not compatible with current Zope versions. Here a new Product comes in. This is from a mail from Paul Winkler on the zope mailinglist:

Here's my off-the-cuff attempt at "How To Safely Move A Big Legacy App
Out of the ZODB".

First, get and install FSDump (google for it).

Add a Dumper to a folder containing DTML (it works recursively on
child folders too), configure the Dumper, click the "Save and dump"
button, and voila, there's your code on the filesystem. It'll store
properties too, in files named like *.metadata.

Then you need a way to use the stuff from the filesystem.
FileSystemSite would be ideal, because it understands those .metadata
files: http://www.infrae.com/download/FileSystemSite

Using it is a bit non-obvious if you're not familiar with CMF, from
which it was extracted. You'll need to create a minimal Product on
the filesystem that consists of:

 from Products.FileSystemSite.DirectoryView import registerDirectory
 registerDirectory('mysubdir, globals())

That's it. Restart Zope, add an instance of Filesystem Directory View,
and you'll be prompted for the directory to choose; the only choice
will be the "mysubdir" you registered above. Click OK and you're done.

Check this new Product into source control and rejoice.

One gotcha - files ending in .dtml will be treated as DTML Methods,
not DTML Documents. So if you relied on the semantic difference
between those, you will have some issues to sort out.

Another gotcha - you'll need another plan to deal with those External
Methods, since AFAIK neither Dumper nor FileSystemSite will handle
them.

Testing

Selenium

This tool provides a fully automatic web-app test-suite which runs in a client browser. Looks to be incredibly powerful
-> http://www.openqa.org/selenium/

Additionally, there even is a nice Zope integration called Zelenium at
-> http://www.zope.org/Members/tseaver/Zelenium

ZopeTestCase

This tool can be used to test Products and file-system code. It cannot test user interaction, that's done with selenium.
-> http://zope.org/Members/shh/ZopeTestCase