In a recent question, toutpt said:
Dexterity needs Plone4.1 to play well with archetypes content and have all plone feature (history, diff, lock, ...)
I'm thinking of using Dexterity in a new site, alongside standard Archetypes objects like Pages, Files and so on. However, I've not开发者_Go百科 been able to find a page listing the possible issues this may throw up.
I know there have been issues with Dexterity/Archetypes playing well together on a site, for example referencing between the two styles of content types. I'm wondering whether this is still an issue (it looks like toutpt may have fixed it), and what the other gotchas I should be aware of before diving in with Dexterity.
Initially my thought is to use Dexterity 1.0 and the version of Archetypes that ships with Plone 4.1, but I'm open to suggestions (e.g., versions 1.0-next for Dexterity).
I'd recommend using Dexterity 1.0 with Plone 4.1 if you want a site that mixes Dexterity and Archetypes content. As always you can use 1.0-next if you want the bleeding edge, but I'm not aware of major issues that that would fix at this time.
Regarding references...zc.relation-style relations from Dexterity items to Archetypes have worked for quite some time. In Plone 4.1 it is now also possible to use Archetypes-style references from Archetypes items to Dexterity items if you enable the behavior from plone.app.referenceablebehavior for your Dexterity content type. The Archetypes IReferenceable adapter for Dexterity content doesn't yet provide the full API for adding, removing and retrieving reference information, though.
I wouldn't use both Archetypes and Dexterity based content at the same time in a site.
It might work for very basic needs but there are incompatibilities. For example if any of your content contains non-ASCII characters, Dexterity will index those as Unicode in the catalog, but Archetypes will put utf-8 there. Mixing different types into the same catalog indexes is not supported at all and will break your site.
Using either only Archetypes or only Dexterity is fine. But the mix of the two need more work until they can coexist.
In my mind, the key question is: are your new content types to be based on — or be extensions of — existing Plone content types? If so, start with Archetypes and ATContentTypes. (Also, if you need content-object translation, Dexterity just doesn't have it yet.)
Otherwise, if you've a tolerance for friction, Dexterity-built content types will be faster to develop, cleaner and lighter-weight than Archetypes-based types.
精彩评论