Re: Idea for a new Package - Chained Selectors
| From: | Klaus Guenther | Date: | Sat, 18 Sep 2004 18:13:55 +0000 |
| Subject: | Re: Idea for a new Package - Chained Selectors | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33438@lists.php.net to get a copy of this message | ||
Alexey Borzov wrote:
Hi, Klaus Guenther wrote:As I noted above, it wouldn't be a good idea to do this, which is why I left HTML_Select in its original state. And both of you are doing an excellent job maintaining HTML_QuickForm. There are certainly no complaints about the code, its stability or usability from my side. I greatly appreciate the package.It is a non-trivial job to make HTML_QuickForm depend on HTML_Select. All QF elements are (and should be) subclasses of HTML_QuickForm_element. Now, PHP (even PHP5) does not support multiple inheritance, so we can't just go ahead and make HTML_QuickForm_select a subclass of both HTML_QuickForm_element and HTML_Select. One possible approach is making HTML_QuickForm_select a Decorator using HTML_Select object internally. But it will require a big amount of code and will definitely *not* improve performance. Seems like both Bertrand and myself have better things to do than to write such code.You know, you're absolutely right. I tried to give you HTML_Select, though, but you didn't want it. I assume that is because you consider it unnecessary when HTML_QuickForm has such excellent support for select (including hierselect) and adding a dependency isn't such a brilliant idea (or duplicating the code, for that matter). In this you are perfectly right. Which is why I left HTML_Select in its original state.Probably this would be the best thing to do.Certainly not.
So for now we are stuck with two copies of essentially the same class. Well, that was your choice so it will be honest if you assume the responsibility as well.No we are not. HTML_Select was there earlier. It was part of PEAR when PEAR was bundled with PHP. It never was my intention to make something that would duplicate HTML_QuickForm. However, there is legacy code out there that needs it. That's why I made the release (in beta status). I fully intended and still intend that it should go to Siberia. However, not everyone uses HTML_QuickForm even though it is a brilliant package and having built-in validation rules makes things so easy I wouldn't want to create a form with any level of complexity without QuickForm. However, not everyone agrees. And I think for those people, they can choose to use the old (read orphaned) HTML_Select package. If someone wants to update HTML_Select to include optgroup support and perhaps a class for hierselect (as Ammar wants to), that's fine with me. But as I said before, if nothing happens, it will go to siberia as soon as that option is available. Please read the notice on the package page. Thanks, Klaus