Re: API for setting/getting values on Dexterity content
"Jens W. Klein" <jens-/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Organization | Klein & Partner KG |
| Message-ID | <[email protected]> |
On 2014-10-22 14:09, Asko Soukka wrote: > Hi, > > Andreas Jung wrote: >> The developer experience with Plone and Dexerity - if done the >> right way - is horrible. As developer right now I have to know >> which behavior implements which field in order to set/get >> a value the right way. > > I think, this has been discussed many times before. > > As I see it, the issue it's not the Dexterity framework by itself, but > the way we choosed to use it. If all the default Dexterity content types > would have implemented their default fields in their custom base classes > (maybe using the behavior interfaces and implementations in the > background), everything would have worked as expected by default. > (Unless you want add custom behaviors without integrating them into your > contenttypes custom base class.) > > Maybe Philip can remember, why plone.app.contenttypes was refactored to > go all behaviors. In fact the main_schema vs behaviors is the major problem here. I digged the last weeks through plone.dexterity and now it very very well. Its all half finished in there if it comes to behaviors. I'll write up a PR as soon I fixed the main issues while trying to describe all the problems in there and how I fixed most of them. I have at leats one place whee I have now idea to fix it. Its really worse than most of you think. tl;dr ... but in short: FTI-based behaviors are not taken into account on all places. IBehaviorAssignable is not taken into account on more places. regards Jens-- Klein & Partner KG, member of BlueDynamics Alliance ------------------------------------------------------------------------------