Plone.autoform vs. plone.directives.*

IIRC, someone told me (I think it was David) the use of plone.directives.* packages is deprecated in favor of plone.autoform because the later doesn't depends on five.grok.

Can anyone confirm this and explain the differences among those packages?

Originally all the schema directives (i.e. widget, mode, omitted, no_omit, etc) were implemented using grok in plone.directives.form. At some point Laurence re-implemented them in a way that does not use grok. So for Dexterity 2.0 I moved those implementations to plone.autoform (leaving backwards-compatibility imports in plone.directives.form) so that it's possible to use Dexterity without depending on grok. plone.directives.form can still do some additional grok-style things, like registering form classes and validators. But that's available to developers who want to use grok; we should not use it in core. plone.autoform is the right place to import the schema directives from these days.

thanks, David; I think it would be a good idea to update the Dexterity documentation at some point to remove references on plone.directives.* packages from it.

see: https://github.com/plone/plone.app.dexterity/search?l=rst&q=plone.directives&utf8=✓

I agree! Please feel free; I don't really have time/interest to work on Dexterity these days.

Help is more than welcome :wink:

yes, I know; I fixed some bugs that were screaming on the documentation last week but now I have no time until next training.

I started some work on this in plone.app.dexterity but then I noticed that the code examples refer to example.conference so I made some work to update that package also.

tests now are passing for Plone 4.3; it would be nice to fix them for Plone 5 also.

this is WIP and it will take me time; if someone wants to join, feel free to push to that branch.