On 11/20/08 10:45 AM, Carsten Senger wrote:
Hi Wichert,
Wichert Akkerman schrieb:
Previously Carsten Senger wrote:
The 'modern' way is to use a local utility registered in a local
sitemanager. You can turn a folder into a local sitemanager if you
need the settings context-dependent. I think Martin describes it in
his book.
An advantage is that you don't have another tool in the zmi. But
that can also be a disavantage.
I think the consensus is now that the modern way you describe is wrong:
persistent utilities introduce a lot of problems. You can easily see
this if you add a persistent utility to your site and then remove the
package from your instance: suddenly your entire instance is broken.
My advise would be to store your configuration in portal_properties and
use a non-persistent utility.
That's good to know. It's hard to follow the state-of-the-art without
a canonical developers manual (but that may change).
Is there good example code that can be used as a reference?
Especially I'm interested in:
- the storage (Annotation, Propertysheet)
My strong preference is a property sheet: those are handled by
GenericSetup and visible & editable through the ZMI. Annotations, as
useful as they are, are magic invisible things.
- formlib or z3c.form (what's will plone core go?)
formlib make property sheets very easy with the help of the field proxy
stuff from CMFDefault. See plone.app.controlpanel for examples.
- the way to bind the form code to the storage without much
boilerplate
See above.
Wichert.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers