[PLIP-Advisories] [Plone development workspace] #10359: Convert control panels to use z3c.form

Change notifications for Plone PLIPs on Trac. plone-plip-advisories at lists.plone.org
Sat Aug 4 08:38:42 UTC 2012


#10359: Convert control panels to use z3c.form
-----------------------+----------------------
  Reporter:  hannosch  |      Owner:
      Type:  PLIP      |     Status:  reopened
  Priority:  minor     |  Milestone:  Future
 Component:  General   |    Version:
Resolution:            |   Keywords:
-----------------------+----------------------
Description changed by timo:

Old description:

> '''Proposer:''' Hanno Schlichting[[BR]]
> '''Seconder:''' Timo Stollenwerk
>
> == Abstract ==
>
> Convert all formlib based control panel screens in plone.app.controlpanel
> to use z3c.form instead. Converting control panels currently not using
> formlib to z3c.form might be inside the scope of this PLIP, but only
> actual implementation will show.
>
> == Motivation ==
>
> Our standard control panels, as found in plone.app.controlpanel are
> implemented using zope.formlib / zope.app.form. While formlib has been
> helpful to have an Archetypes independent form framework, it has proven
> to be too inflexible in real customer projects. Learning from the short-
> comings of formlib, z3c.form has been written and has meanwhile seen a
> major adoption in the community - both inside the Plone and the wider
> Zope communities.
>
> The Zope 2 integration of zope.formlib has been moved to a separate
> package called five.formlib for Zope 2.12. In Zope 2.13 this package
> isn't shipped anymore. This reflects the dwindling mindshare that
> zope.formlib has seen. For Plone 5.x this could allow Plone to no longer
> ship with formlib at all.
>
> == Assumptions ==
>
> This PLIP is dependent on PLIP #9473 - the general readiness of the Plone
> - z3c.form integration. It assumes that customizations of the Plone
> control panels are infrequent and changes to the internals of the control
> panels aren't seen as breaking public API's of Plone.
>
> == Proposal & Implementation ==
>
> The aim of this PLIP is to re-implement all formlib based control panels
> inside plone.app.controlpanel on top of z3c.form. A new base class for
> add-on control panels will be provided, so add-ons can opt-in to the new
> approach. The old formlib based base classes would be deprecated and
> removed in Plone 5.0.
>
> The implementation will use the plone.app.z3cform and plone.autoform
> packages. It will not use plone.directives.form and thus avoid a
> dependency on Grok.
>
> == Deliverables ==
>
>  * A branch of plone.app.controlpanel with the new implementation
>  * Documentation for writing your add-on control panel based on the new
> classes
>
> The localization strings should be kept as close to the current code as
> possible, so no major new translation effort will be required. The actual
> UI should also stay very similar to the current state, so no major end-
> user documentation changes will be needed.
>
> == Risks ==
>
> This PLIP doesn't consider the risks for including z3c.form itself.
> Specific risks for this PLIP are seen as minor. Only for the unlikely
> case that someone has customized the control panels or has code based on
> one of the specific panels breakage is to be expected. The only known
> add-on doing this is LinguaPlone, which extends the language control
> panel. It would be part of this PLIP to ensure LinguaPlone continues to
> work.
>
> == Participants ==
>
> Timo Stollenwerk <tisto>
>
> == Progress ==
>
> Not yet started.

New description:

 '''Proposer:''' Hanno Schlichting[[BR]]
 '''Seconder:''' Timo Stollenwerk

 == Abstract ==

 Convert all formlib based control panel screens in plone.app.controlpanel
 to use z3c.form instead. Converting control panels currently not using
 formlib to z3c.form might be inside the scope of this PLIP, but only
 actual implementation will show.

 == Motivation ==

 Our standard control panels, as found in plone.app.controlpanel are
 implemented using zope.formlib / zope.app.form. While formlib has been
 helpful to have an Archetypes independent form framework, it has proven to
 be too inflexible in real customer projects. Learning from the short-
 comings of formlib, z3c.form has been written and has meanwhile seen a
 major adoption in the community - both inside the Plone and the wider Zope
 communities.

 The Zope 2 integration of zope.formlib has been moved to a separate
 package called five.formlib for Zope 2.12. In Zope 2.13 this package isn't
 shipped anymore. This reflects the dwindling mindshare that zope.formlib
 has seen. For Plone 5.x this could allow Plone to no longer ship with
 formlib at all.

 == Assumptions ==

 This PLIP is dependent on PLIP #9473 - the general readiness of the Plone
 - z3c.form integration. It assumes that customizations of the Plone
 control panels are infrequent and changes to the internals of the control
 panels aren't seen as breaking public API's of Plone.

 == Proposal & Implementation ==

 The aim of this PLIP is to re-implement all formlib based control panels
 inside plone.app.controlpanel on top of z3c.form. A new base class for
 add-on control panels will be provided, so add-ons can opt-in to the new
 approach. The old formlib based base classes would be deprecated and
 removed in Plone 5.0.

 The implementation will use the plone.app.z3cform, plone.autoform and
 plone.app.registry packages. It will not use plone.directives.form and
 thus avoid a dependency on Grok.

 == Deliverables ==

  * A branch of plone.app.controlpanel with the new implementation
  * Documentation for writing your add-on control panel based on the new
 classes

 The localization strings should be kept as close to the current code as
 possible, so no major new translation effort will be required. The actual
 UI should also stay very similar to the current state, so no major end-
 user documentation changes will be needed.

 == Risks ==

 This PLIP doesn't consider the risks for including z3c.form itself.
 Specific risks for this PLIP are seen as minor. Only for the unlikely case
 that someone has customized the control panels or has code based on one of
 the specific panels breakage is to be expected. The only known add-on
 doing this is LinguaPlone, which extends the language control panel. It
 would be part of this PLIP to ensure LinguaPlone continues to work.

 == Participants ==

 Timo Stollenwerk <tisto>

 == Progress ==

 - A branch has been created:
 https://github.com/plone/plone.app.controlpanel/tree/plip10359-z3cform

 - Three formlib control panels (editing, mail, security) have been
 converted to use plone.app.registry as a proof-of-concept (p.a.registry
 forms and storage work, changes are synchronized with the "old" storage.
 BBB is ensured by re-implementing the old adapters.):
 https://github.com/plone/plone.app.controlpanel/tree/plip10359-z3cform/plone/app/controlpanel/browser

 - A jenkins job for the PLIP has been created:
 https://jenkins.plone.org/me/my-
 views/view/All/job/plone-4.3-plips/PLIP=plip10359-z3cform-
 controlpanel.cfg,label=Master/

--

-- 
Ticket URL: <http://dev.plone.org/ticket/10359#comment:16>
Plone development workspace <https://dev.plone.org/>
Plone Enterprise Content Management System


More information about the PLIP-Advisories mailing list