Quantcast

Rewrite old cpt forms to new technology like z3cform

classic Classic list List threaded Threaded
59 messages Options
123
toutpt toutpt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rewrite old cpt forms to new technology like z3cform

Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

It's very old technology and doesn't play well with ZCA, browser views, ... 

I have already reported a bug that concern every CPT when using linguaplone (navigationroot)  https://dev.plone.org/ticket/12265

Plus we have many forms technologies:
* z3cform + plone.autoform (based on it but still an other one)
* zope.formlib
* CMFFormController

I really would like to get ride of any CMFForm from Plone.

Regards
JeanMichel FRANCOIS



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli Martin Aspeli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform



On 12 March 2012 20:37, Jean-Michel FRANCOIS <[hidden email]> wrote:
Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

+1 - long overdue IMHO.

Martin

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Eric Steele Eric Steele
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by toutpt
On Monday, March 12, 2012 at 4:37 PM, Jean-Michel FRANCOIS wrote:
Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

It's very old technology and doesn't play well with ZCA, browser views, ... 

I have already reported a bug that concern every CPT when using linguaplone (navigationroot)  https://dev.plone.org/ticket/12265

Plus we have many forms technologies:
* z3cform + plone.autoform (based on it but still an other one)
* zope.formlib
* CMFFormController

I really would like to get ride of any CMFForm from Plone.
Oh, please. Yes. This.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Elizabeth Leddy-2 Elizabeth Leddy-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by toutpt


On Mar 12, 2012, at 1:37 PM, Jean-Michel FRANCOIS wrote:

Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

FWIW, I think z3c is better supported than formlib these days...


It's very old technology and doesn't play well with ZCA, browser views, ... 

I have already reported a bug that concern every CPT when using linguaplone (navigationroot)  https://dev.plone.org/ticket/12265

Plus we have many forms technologies:
* z3cform + plone.autoform (based on it but still an other one)
* zope.formlib
* CMFFormController

I really would like to get ride of any CMFForm from Plone.

Me to! my only concern is that it is still difficult to replicate some of that functionality as a plone developer.  Even though its esoteric at least I know how to make a form in HTML, write a validator, and redirect to a finish page.  If I get shoehorned into using z3c (or gabillions of browser views) for everything I will turn into angry plone developer and smash things.

Liz


Regards
JeanMichel FRANCOIS


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli Martin Aspeli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform



On 12 March 2012 20:52, Elizabeth Leddy <[hidden email]> wrote:


On Mar 12, 2012, at 1:37 PM, Jean-Michel FRANCOIS wrote:

Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

FWIW, I think z3c is better supported than formlib these days...


It's very old technology and doesn't play well with ZCA, browser views, ... 

I have already reported a bug that concern every CPT when using linguaplone (navigationroot)  https://dev.plone.org/ticket/12265

Plus we have many forms technologies:
* z3cform + plone.autoform (based on it but still an other one)
* zope.formlib
* CMFFormController

I really would like to get ride of any CMFForm from Plone.

Me to! my only concern is that it is still difficult to replicate some of that functionality as a plone developer.  Even though its esoteric at least I know how to make a form in HTML, write a validator, and redirect to a finish page.  If I get shoehorned into using z3c (or gabillions of browser views) for everything I will turn into angry plone developer and smash things.

More than anything, I think we just need more/better examples of 'good' z3c.form practice. It doesn't have to be hard. I imagine many of the CMFFormController views will be replaced with z3c.form forms with custom .pt templates, for example, which is something a lot of people don't know how to do.

Martin 

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
David Glick (GW) David Glick (GW)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by Elizabeth Leddy-2

On Mar 12, 2012, at 1:52 PM, Elizabeth Leddy wrote:



On Mar 12, 2012, at 1:37 PM, Jean-Michel FRANCOIS wrote:

Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

FWIW, I think z3c is better supported than formlib these days...


It's very old technology and doesn't play well with ZCA, browser views, ... 

I have already reported a bug that concern every CPT when using linguaplone (navigationroot)  https://dev.plone.org/ticket/12265

Plus we have many forms technologies:
* z3cform + plone.autoform (based on it but still an other one)
* zope.formlib
* CMFFormController

I really would like to get ride of any CMFForm from Plone.

Me to! my only concern is that it is still difficult to replicate some of that functionality as a plone developer.  Even though its esoteric at least I know how to make a form in HTML, write a validator, and redirect to a finish page.  If I get shoehorned into using z3c (or gabillions of browser views) for everything I will turn into angry plone developer and smash things.


There are a couple directions we could go for modernizing our CMFFormController forms.

One is quite simple: move the logic of the form's scripts into the __call__ method of a BrowserView, and move the form's template to be the template of that view.

A much bigger project would be to rewrite all the forms to be schema-based. I don't think we should do that unless there's a clear benefit, which I'm not sure there is. (There would be benefits, like making it possible to have a standard way of extending all forms in Plone. But they'd be offset by the tradeoffs of making these forms less hackable and the usual risks associated with bugs introduced during refactoring.)

David

 

David Glick
Web Developer
[hidden email]
206.286.1235x32

The NPO Engagement Party 2012. So much more fun than the wedding reception.



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Eric Steele Eric Steele
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by toutpt
Also, I'll point out https://dev.plone.org/ticket/10359 which was closed for lack of Hanno. It can certainly be reopened and picked up again.



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Elizabeth Leddy-2 Elizabeth Leddy-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by Martin Aspeli

On Mar 12, 2012, at 1:56 PM, Martin Aspeli wrote:



On 12 March 2012 20:52, Elizabeth Leddy <[hidden email]> wrote:


On Mar 12, 2012, at 1:37 PM, Jean-Michel FRANCOIS wrote:

Hi,

Before writing a PLIP on this I would like to have your opinion on it. I have forms done with CMFFormController.

I would like to move forms from CMFFormController to formlib or z3cform.

FWIW, I think z3c is better supported than formlib these days...


It's very old technology and doesn't play well with ZCA, browser views, ... 

I have already reported a bug that concern every CPT when using linguaplone (navigationroot)  https://dev.plone.org/ticket/12265

Plus we have many forms technologies:
* z3cform + plone.autoform (based on it but still an other one)
* zope.formlib
* CMFFormController

I really would like to get ride of any CMFForm from Plone.

Me to! my only concern is that it is still difficult to replicate some of that functionality as a plone developer.  Even though its esoteric at least I know how to make a form in HTML, write a validator, and redirect to a finish page.  If I get shoehorned into using z3c (or gabillions of browser views) for everything I will turn into angry plone developer and smash things.

More than anything, I think we just need more/better examples of 'good' z3c.form practice. It doesn't have to be hard. I imagine many of the CMFFormController views will be replaced with z3c.form forms with custom .pt templates, for example, which is something a lot of people don't know how to do.

This is the real problem, yes. I will make sure to bring this up at the cioppino sprint. A general "how to make real world forms in plone" section with the preferred easy options detailed would be awesome. 

Liz



Martin 


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Roberto Allende Roberto Allende
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by toutpt
El 12/03/12 17:37, Jean-Michel FRANCOIS escribió:
> Hi,
>
> Before writing a PLIP on this I would like to have your opinion on it. I
> have forms done with CMFFormController.
>
> I would like to move forms from CMFFormController to formlib or z3cform.
>

Hello

I'm looking ideas for a GSoC project and thanks to Jon Stahl, who
suggested me to read Plone's roadmap, I found one titled: "R12
Standardise on z3c.form for all generated forms", which seems to include
what you're suggesting.

Quoting roadmap:

*R12 Standardise on z3c.form for all generated forms*

*Rationale*
Forms in Plone currently use a mixture of CMFFormController,
zope.formlib and z3c.form. The latter is most modern and forms the basis
for Dexterity and tiles.

*Description*
Rewrite existing forms in Plone core using CMFFormController and
zope.formlib to use z3c.form and deprecate the other libraries.

*Status*
Some work has been done by various contributors, but needs a champion
and a PLIP.

----

I was studying it futher, in fact i was making a list with all the forms
in Plone, but since this subject came up on the list I thought it was
better to share it.

So, I'd like to ask some questions:

1. May I join to the task and would it make sense to think a GSoC
project still ?

2. Any suggestion about defining scope of it ?. If we could have this
conversation in "real world" I would ask to do a brainstorming because
there are a lot of knowledge about this subject.

Any questions, comments or suggestions are very welcome!

Kind Regards
Roberto Allende

--
http://robertoallende.com
http://menttes.com

--
http://menttes.com

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Malthe Borch-2 Malthe Borch-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

On 13 March 2012 04:22, Roberto Allende <[hidden email]> wrote:
> 1. May I join to the task and would it make sense to think a GSoC
> project still ?

It's a bit broad in scope and difficult in execution – perhaps we
could limit it to the login sequence and associated functionality:

  - log in
  - log out
  - forget and reset password
  - change e-mail

In an ideal situation, the last two involve sending out an e-mail with
a time-limited token, then on the way in present the user with a form
to complete the action.

For an alternative scope, there's also the forms in "/skins/plone_forms".

\malthe

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
yuri-2 yuri-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by Elizabeth Leddy-2
Il 12/03/2012 21:52, Elizabeth Leddy ha scritto:

>> I really would like to get ride of any CMFForm from Plone.
>
> Me to! my only concern is that it is still difficult to replicate some
> of that functionality as a plone developer.  Even though its esoteric
> at least I know how to make a form in HTML, write a validator, and
> redirect to a finish page.  If I get shoehorned into using z3c (or
> gabillions of browser views) for everything I will turn into angry
> plone developer and smash things.
>
> Liz
>
>

+1

Or, at least, make form easy.

BTW, Archetype edit is all based on CMFFormController, how would you get
rid of it? :)

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Luca Fabbri Luca Fabbri
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

On Tue, Mar 13, 2012 at 8:25 AM, Yuri <[hidden email]> wrote:

> Il 12/03/2012 21:52, Elizabeth Leddy ha scritto:
>>> I really would like to get ride of any CMFForm from Plone.
>>
>> Me to! my only concern is that it is still difficult to replicate some
>> of that functionality as a plone developer.  Even though its esoteric
>> at least I know how to make a form in HTML, write a validator, and
>> redirect to a finish page.  If I get shoehorned into using z3c (or
>> gabillions of browser views) for everything I will turn into angry
>> plone developer and smash things.
>>
>> Liz
>>
>>
>
> +1
>
> Or, at least, make form easy.
>
> BTW, Archetype edit is all based on CMFFormController, how would you get
> rid of it? :)
>

You get the point Yuri, this is the same fear I have... I think this
will be difficult until Archetypes will not be anymore the main
framework.

For all other element I think can be simpler


--
-- luca

twitter: http://twitter.com/keul
linkedin: http://linkedin.com/in/lucafbb
blog: http://blog.keul.it/

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
toutpt toutpt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by yuri-2
I don't want to get ride of Archetypes if this is the question :)

But I don't want to have any forms done with CMFFormController in Plone.

Archetypes is a framework that depends on CFC and it works. This is not the case with reset password and some others. 

Regards
JeanMichel FRANCOIS


Le 13 mars 2012 08:25, Yuri <[hidden email]> a écrit :
Il 12/03/2012 21:52, Elizabeth Leddy ha scritto:
>> I really would like to get ride of any CMFForm from Plone.
>
> Me to! my only concern is that it is still difficult to replicate some
> of that functionality as a plone developer.  Even though its esoteric
> at least I know how to make a form in HTML, write a validator, and
> redirect to a finish page.  If I get shoehorned into using z3c (or
> gabillions of browser views) for everything I will turn into angry
> plone developer and smash things.
>
> Liz
>
>

+1

Or, at least, make form easy.

BTW, Archetype edit is all based on CMFFormController, how would you get
rid of it? :)

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Jens W. klein-2 Jens W. klein-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by David Glick (GW)
On 12.03.2012 22:03, David Glick (GW) wrote:
> [...]
> One is quite simple: move the logic of the form's scripts into the
> __call__ method of a BrowserView, and move the form's template to be the
> template of that view.

A big +1 for this approach. As some of you may know I hate z3cforms
because of its unnecessary complexity (even if I may be almost alone
with this opinion in the Plone universe).

> [...]

Jens
--
Klein & Partner KG, member of BlueDynamics Alliance


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
toutpt toutpt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by David Glick (GW)


 
There are a couple directions we could go for modernizing our CMFFormController forms.

One is quite simple: move the logic of the form's scripts into the __call__ method of a BrowserView, and move the form's template to be the template of that view.


I have already try this and it doesn't solve anything except adding complexity. In my case reset password will not work after that change. I already have tried this way and having more trouble than solutions:  you have to keep the cpt file validators, ... only the action can be moved to real python, but the vpy and cpy must be their. Performance will not be better, ...

-1 for this way.
 
 
A much bigger project would be to rewrite all the forms to be schema-based. I don't think we should do that unless there's a clear benefit, which I'm not sure there is. (There would be benefits, like making it possible to have a standard way of extending all forms in Plone. But they'd be offset by the tradeoffs of making these forms less hackable and the usual risks associated with bugs introduced during refactoring.)


Being schema based can be hard. Some forms depends on Plone configuration. In that case what is the best way ? Having a global schema and display/hide some fields according to the configuration ? or having many schema/forms and choosing the good one ?


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
yuri-2 yuri-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

Il 13/03/2012 11:07, Jean-Michel FRANCOIS ha scritto:

>
>
>     There are a couple directions we could go for modernizing our
>     CMFFormController forms.
>
>     One is quite simple: move the logic of the form's scripts into the
>     __call__ method of a BrowserView, and move the form's template to
>     be the template of that view.
>
>
> I have already try this and it doesn't solve anything except adding
> complexity. In my case reset password will not work after that change.
> I already have tried this way and having more trouble than solutions:
>  you have to keep the cpt file validators, ... only the action can be
> moved to real python, but the vpy and cpy must be their. Performance
> will not be better, ...

  I think we should add support for browser view in CMFFormController.
CMFFormController can be very powerful as a tool, I would keep and
improve it.

About performance, nobody knows where (if?) the problem came from...

>
> -1 for this way.
>
>     A much bigger project would be to rewrite all the forms to be
>     schema-based. I don't think we should do that unless there's a
>     clear benefit, which I'm not sure there is. (There would be
>     benefits, like making it possible to have a standard way of
>     extending all forms in Plone. But they'd be offset by the
>     tradeoffs of making these forms less hackable and the usual risks
>     associated with bugs introduced during refactoring.)
>
>
> Being schema based can be hard. Some forms depends on Plone
> configuration. In that case what is the best way ? Having a global
> schema and display/hide some fields according to the configuration ?
> or having many schema/forms and choosing the good one ?
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
>
>
> _______________________________________________
> Plone-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-developers


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Wichert Akkerman Wichert Akkerman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by toutpt
On 03/13/2012 11:07 AM, Jean-Michel FRANCOIS wrote:
A much bigger project would be to rewrite all the forms to be schema-based. I don't think we should do that unless there's a clear benefit, which I'm not sure there is. (There would be benefits, like making it possible to have a standard way of extending all forms in Plone. But they'd be offset by the tradeoffs of making these forms less hackable and the usual risks associated with bugs introduced during refactoring.)


Being schema based can be hard. Some forms depends on Plone configuration. In that case what is the best way ? Having a global schema and display/hide some fields according to the configuration ? or having many schema/forms and choosing the good one ?

It isn't about schemas. z3c.form has problems with a) far too many abstractions for any normal use case, b) no useful documentation. That makes it an typical example of the Zope software stack I suppose.. Recent form libraries such as WTForms, deform (to a lesser degree imho) and flatland (unfortunately no longer actively maintained) are all much more pleasant to use. You can use them within a Zope context as well.

Wichert.




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
johannes raggam johannes raggam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by Jens W. klein-2
On Tue, 2012-03-13 at 10:50 +0100, Jens W. Klein wrote:
> On 12.03.2012 22:03, David Glick (GW) wrote:
> > [...]
> > One is quite simple: move the logic of the form's scripts into the
> > __call__ method of a BrowserView, and move the form's template to be the
> > template of that view.
>
> A big +1 for this approach. As some of you may know I hate z3cforms
> because of its unnecessary complexity (even if I may be almost alone
> with this opinion in the Plone universe).

+1

z3cforms are a good example how to over-componentize code with the
result of good flexibility (if you exactly know where to hook something
in and are willing to write tons of code) and little flexibility (if you
don't find such a point to hook in) at the same time. i see the power of
z3cforms, but it's much too complicated and verbose for my taste. we
should start to avoid it - there are better solutions out there.

johannes

>
> > [...]
>
> Jens


--
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: [hidden email]
web:  http://programmatic.pro
      http://bluedynamics.com

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

signature.asc (205 bytes) Download Attachment
Malthe Borch-2 Malthe Borch-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by Wichert Akkerman
On 13 March 2012 11:52, Wichert Akkerman <[hidden email]> wrote:
> It isn't about schemas. z3c.form has problems with a) far too many
> abstractions for any normal use case, b) no useful documentation. That makes
> it an typical example of the Zope software stack I suppose.. Recent form
> libraries such as WTForms, deform (to a lesser degree imho) and flatland
> (unfortunately no longer actively maintained) are all much more pleasant to
> use. You can use them within a Zope context as well.

I agree with this.

It's hard to get it right with z3c.form. You quickly end up with > 100
lines for a non-trivial form – and if you care about your users, most
forms end up being non-trivial.

The solution might be to contribute to the z3c.form project itself –
with better and more expressive base classes, better widgets and more
flexible default patterns (i.e. "do what I probably mean"). It might
still simply be too complex for the typical Plone-developer.

I wrote a small form library a few years ago – and I'm going to link
to it here because it illustrates quite well how simple it can be:

   http://pypi.python.org/pypi/repoze.formapi

There's a formatted introduction to the library on that page.

I don't think there's been much take-up of this particular library,
but there's definitely ideas in there that are sound, i.e.

 - Simple is good
 - Less is more
 - It has to be fun
 - HTML isn't an enemy

Chris McDonough has a different take on it in Colander:

   http://pypi.python.org/pypi/colander

It's a lot like Zope's schema. The serialization logic is a little
daunting. It works well in practice, but it also breaks easily if you
try to do something that wasn't intended from the beginning (and this
is a very real scenario).

Note that Deform (mentioned by Wichert) uses Colander for
schema-support. It's a nice layered approach I think.

\malthe

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
dmoro dmoro
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rewrite old cpt forms to new technology like z3cform

In reply to this post by Jens W. klein-2
Il 13/03/2012 10:50, Jens W. Klein ha scritto:
> On 12.03.2012 22:03, David Glick (GW) wrote:
>> [...]
>> One is quite simple: move the logic of the form's scripts into the
>> __call__ method of a BrowserView, and move the form's template to be the
>> template of that view.
> A big +1 for this approach. As some of you may know I hate z3cforms
> because of its unnecessary complexity (even if I may be almost alone
> with this opinion in the Plone universe).

We should consider the complexity factor in such decisions: z3cform or
not z3cform it is not important, but in both cases I think we should
give to normal people a simple way to override simple things like simple
customizations.

For normal people I mean integrators, software selection guys, people
that knows a bit of zmi and zpt after a couple of days of training with
html/sql/basic programming skills.

For example I don't like what happened to
plone/app/users/browser/personalpreferences.py because now you should be
a Plone engineer in order to make some simple changes to registration or
preference form (instead a simple and well working cpt we have a formlib
mixed with old vpy validator if I remember well, every customization
costs a lot of unnecessary work).

Anyway, the risk is: if someone needs to make a simple customization in
order to evaluate Plone and he feels things too hard (translated: 2
hours or more of an expert Plone consultant just for customize a sendto
form), he may consider Plone too difficult to customize and abandomn it.

So the reponse could be: no more formlib and no changes just for moving
to newer technologies without keeping in mind these side effects

PS: I am a happy z3cform user.

Regards,

davide


--
Davide Moro
Technical Development Manager
http://linkedin.com/in/davidemoro82

Redomino Srl
http://redomino.com
HQ Largo Valgioie 14, Turin IT
Phone +39 0117499875


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
123
Loading...