At the time of this writing, this is the farthest I've gotten with this experiment in Zope 3. What this file, browser.zcml does is wire up some basic views for the Todo List and Todo items. At this point, we have not written any HTML templates or any view controllers. At this stage, we don't really need to. This is all that is needed to use automatic add and edit forms, complete with code validation. The interfaces we defined go a long way to providing these forms with their display. We also define some containerViews for the Todo List. Since the TodoList subclasses and sub-interfaces a standard Zope 3 container implementation (think 'Folder', but much simpler. More like a dictionary), it would be nice to reuse the basic container views for the Todo List. This is how we'll get away with adding Todo items:
<configure xmlns="http://namespaces.zope.org/browser">
<!-- Allow adding of the Todo List -->
<addMenuItem
class="todo.TodoList"
title="Todo List"
description="A Todo List"
permission="zope.ManageContent"
/>
<!-- Allow basic Zope 3 container views for the Todo List -->
<containerViews
for=".interfaces.ITodoList"
index="zope.View"
contents="zope.View"
add="zope.ManageContent"
/>
<!-- And now add / edit forms for the Todo list -->
<addform
label="Add Todo"
name="addtodo.html"
schema="todo.interfaces.ITodo"
content_factory="todo.Todo"
permission="zope.ManageContent"
/>
<addMenuItem
class="todo.Todo"
title="Todo"
description="A Todo Item"
permission="zope.ManageContent"
view="addtodo.html"
/>
<editform
schema="todo.interfaces.ITodo"
for="todo.interfaces.ITodo"
label="Edit Todo"
name="edit.html"
permission="zope.ManageContent"
menu="zmi_views" title="Edit"
/>
</configure>
There is more that these ZCML declarations can do - filter out specific fields from a Schema definition, wire into custom classes that override widget definitions or provide other help, or use alternate templates than the ones the system uses. This allows the add/edit functionality to be used in custom applications that don't make use of the ZMI but could otherwise benefit by what these editform and addform view controllers provide.
Screen shots of the views generated by these declarations are in the extended entry.