|
|
/ Hathaway Weblog / Zope 3 View Report |
I had a flash of inspiration today. Here is a mocked-up page that reports what views are registered for an object, class, or interface in Zope 3.

This is designed for both Zope newcomers and experts. You select an object and a presentation type and it tells you every view available for that object. It also tells you how the views were registered, and perhaps you can click to see registration details. Once you have this information, you can confidently add more views, modify / override views, or remove views that were not intended.
The headers on the left and at the top display complete class and interface hierarchies with multiple inheritance. If this chart were applied to Zope 2, the chart would be very tall and skinny due to the large class hierarchies and absence of presentation type hierarchies. The coding principles behind Zope 3, however, hopefully keep the hierarchies small enough to keep this chart manageable.
This chart could be enhanced without cluttering it too much. It could display permissions using icons next to the view names. Permission registrations could specify an icon, or an icon shape and color could be generated based on a hash of the permission name.
A similar chart might be applied to adapters as well. I don't know whether the chart ought to be generated using HTML, SVG, or a GUI toolkit. Maybe the fancy graphics aren't even needed. The exciting thing to me is discovering a good way to present this information.
Comments
Is this a picture you created from parsing the configure.zcml file, or did you make it by hand?
