On 5/2/10 14:13 , mnieper wrote:
>
>
> Wichert Akkerman wrote:
>>
>> You could also simply add a method to the content type class itself.
>> There is no requirement to use adapters - python has a nice class system
>> you can use as well. Writing an adapter when you will never adapt more
>> than one specific class is needless overhead imho.
>>
> This would mean that I had to subclass Dexteritiy's folder or item class in
> order to create a custom class, wouldn't it? But isn't this discouraged?

Opinions differ. Martin seems to prefer that people never do that in 
order to reduce the number of persisted classes in the ZODB and use 
adapters instead. While that is a laudable goal, I personally prefer to 
create a subclass and add methods there. Using an interface and adapter 
pair for a single class feels like needless overuse of the ZCA to me.

Wichert.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to