[Zope-CMF] RFC: first stab at viewification
Tres Seaver
tseaver at palladion.com
Fri Oct 21 19:27:38 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I just checked in a preliminary pass at viewifying the
'full_metadata_form' (now 'metadata.html' as a view):
svn+ssh://svn.zope.org/repos/main/CMF/branches/tseaver-viewification
A couple of things to note:
- I adopted a "don't generalize too soon" approach on this,
rather than trying to come up with a perfect reuse example.
I have two views registered, 'metadata.html' for the template
and 'metadata.py' for the controller to which it POSTs (since
it needs to do redirects). This is a sort of "hybrid" strategy.
- Performance on the view version is nearly twice the "classic"
version (14.2 ms vs 24.2 ms on my box).
- The view code *does* have tests, although they aren't exhaustive.
- Making Document objects five:traversable broke some other unit
tests, so I left that commented out in CMFDefault/configure.zcml.
To actually exercise the view TTW, you will need to uncomment it.
I need to review Yuppie's branch for folder_contents as well:
svn+ssh://svn.zope.org/repos/main/CMF/branches/goldegg-folder_contents
Feedback on both branches would be appreciated; we have folks gathering
here in FXBG to hammer out the remaining viewification plan for CMF 2.0
next week.
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDWXlp+gerLs4ltQ4RAoI6AJ9xhMySPf/1CkaULV/Z22IifE+0QACgp9PK
1VKDaRqGVuLp7X/EO5ChAP8=
=ofQ3
-----END PGP SIGNATURE-----
More information about the Zope-CMF
mailing list