[Grok-dev] the megrok.form plan

Martijn Faassen faassen at startifact.com
Fri Apr 17 11:47:04 EDT 2009


Hi there,

The problem:

megrok.form depends on z3c.widget, which only exists in older releases 
on pypi. Newer releases exist in the evilll download.zope.org/distribution.

Worse yet, z3c.javascript is a dependency of z3c.widget, and 
z3c.javascript only got released in the aforementioned place of evilll, 
not on pypi.

One way to resolve this mess is to release newer versions, but we don't 
have the pypi access for z3c.widget. And Behrang Dadsetan wisely pointed 
out that z3c.javascript contains an absolute pile of random javascript 
libraries of various license provencance: not a nice thing to depend on.

Some analysis of megrok.form was in order. The conclusions:

z3c.widget only seems to be used in megrok.form in a very minimal way. 
It hooks up the HTML field (defined by megrok.form.interfaces) to 
z3c.widget.tiny.widget.TinyWidget, a rich text editing widget. 
Undoubtedly given the name this uses tinymce, which in turn is in 
z3c.javascript.

Now as to the Plan, which only needs some brave hacker to execute it:

* drop the dependency on z3c.widget in megrok.form

* Copy the code from z3c.widget.tiny into megrok.form. Only the code we 
actually use, and perhaps some tests.

* rearrange the ZCML so it will use that.

We're still stuck with the dependency on TinyMCE. One way to deal with 
this is to use hurry.tinymce instead.

Before this is done we'd probably need to merge the rather superfluous 
hurry.zopetinymce (only a configure.zcml) into it for easier management, 
but you could make it work by depending on hurry.zopetinymce instead today.

Then you can do hurry.tinymce.tinymce.need() in the widget and get 
tinymce that way instead.

megrok.form will gain a dependency on hurry.resource and 
hurry.zoperesource, but that is hardly a disaster, especially since 
z3c.widget and z3c.javascript (which is a minor licensing disaster) will 
go away.

Any takers?

Regards,

Martijn



More information about the Grok-dev mailing list