[Product-Developers] Best practice for portal tools now-a-days?

Wichert Akkerman wichert at wiggy.net
Wed Nov 19 07:54:54 UTC 2008


Previously Carsten Senger wrote:
> Hi Alex,
> 
> Alex Clark schrieb:
> >Hi all,
> >
> >Is adding a singleton ('portal tool') still the best way to persist 
> >settings for
> >add-on products?
> >
> >For example, for Products.todo 0.4, I want to add a preference panel that 
> >allows
> >the user to store various application behavior settings, and I'm wondering 
> >if
> >the 'old skool' way is still the best/only/etc.
> >
> >Thoughts?
> >
> >Thanks!
> >
> 
> 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.

Wichert.

-- 
Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.




More information about the Product-Developers mailing list