Re: HTML_QuickForm2 / new release
| From: | Alexey Borzov | Date: | Thu, 15 Jan 2009 14:22:39 +0000 |
| Subject: | Re: HTML_QuickForm2 / new release | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51434@lists.php.net to get a copy of this message | ||
Hi,
Daniel O'Connor wrote:
Yeah, that's pretty legitimate, that's how I ended up a QuickForm maintainer: got tired of supporting my own fork with template-based output. The form in which it was stated, though, pissed me off severely.The first ones (ArrayAccess to e.g. use a form easilyHey, that's pretty legitimate - why spend twice the effort maintaining twice the code; if the changes are perceived to be right for quickform.in Smarty, and rules in containers) have been attached to the tracker. We'd like to see them released soon so that we now that a) the direction in which we're going is correct and b) don't have to change our codebase afterwards too much."I want you to apply our changes NOW and release your package IMMEDIATELY so that we won't be burdened by keeping a private fork with the stuff only we need". Ni-i-i-i-ice. No, in fact, re-e-e-e-e-e-e-eally nice.
cweiske certainly thinks they are; you disagree; but it comes across a little bit harshly. I believe the correct way to deal with this kind of thing is to say "I'm ducking the issue", and then insert a variety of pictures of ducks into the email conversation. http://flickr.com/search/?w=all&q=duck&m=textThanks, one of the first photos that came out was that one: http://flickr.com/photos/hard-rain/2055631096/ The duck is in the lower left corner, in case you are wondering. :-D
The Rule for Containers patchOK, $container->addRule('lt', 'Should be less that 4', 4); here we are adding a "less than" rule to a Container (group in HTML_QuickForm terms, it may contain several input fields). That won't work at all in current CVS (will compare array to a number). The patch provided will sum the values of these fields and then compare the sum to 4. While it *may* be useful in certain scenarios, I certainly won't call this behaviour "intuitive".http://pear.php.net/bugs/patch-display.php?bug=15619&patch=Rule_Compare_for_Container.diff&revision=1231775394 does exactly the same: If I do a $container->addRule('lt', 'Should be less that 4', 4); Do i expect 1) Container to contain less than 4 non empty elements? 2) Value of each element's in Container to be less than 4? 3) Sum of Container's elements' values to be less than 4? now, fellow developers, think a bit and either read the patch or scroll downI don't get it. I don't know QF2 well enough; so reading the patch didn't make much sense.
The correct solution to the Smarty problem is of course an implementation ofI kind of addressed the Rules issue in a separate thread, I'll write about the Renderer problem sometime later, need to spend a few hours on research before. In fact, Renderer implementation issues are what keeps QuickForm2 from next release.(some kind of) Array renderer, the correct solution of Rule for Containers problem is, probably, implementation of some kind of iterator for Rules. If you want to discuss the implementation details for these, then let's start by *discussing*, if you want to continue providing valuable contributions of the above quality and make demands, then you are better off with a fork. I even promise to vote for it if you propose it to PEAR.I can has psuedocode for the above two?