Re: HTML_Select
| From: | Bertrand Mansion | Date: | Tue, 20 May 2003 12:55:51 +0000 |
| Subject: | Re: HTML_Select | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16503@lists.php.net to get a copy of this message | ||
<klaus@capitalfocus.org> wrote :
>> Pierre-Alain Joye wrote:
>>
>>>> It does exist in pear/HTML_QuickForm/QuickForm/select.php
>>>> Please enlighten me, what was PEAR community's view on redundant
>>>> packages and forks?
>>>
>>>
>>> Please, look at all the codes and historical packages.
>>>
>>> This package is a simple select generation class, which has nothing to
>>> do with any others packages.
>>
>> Let me clarify: most of HTML_QuickForm_select's code is the same as old
>> HTML_Select's.
>> HTML_QuickForm_select *can* be used without loading all 70kb of
>> HTML_QuickForm class.
>>
>> While I can see the use for a separate HTML_Select class, this will be a
>> fork with *no* added value. A usage example for HTML_QuickForm showing
>> how to use standalone select will be most welcome, though.
>
> Thank goodness PEAR isn't made by a certain software corporation based in
> Redmond. Simple elegance is important. I don't want to have to install
> QuickForm if all I need is the select script. It's nice that PEAR is
> modular.
There is already an HTML_Select package in PEAR. Look at it, I don't think
it should have been done this way (we had a long thread about this issue
already) but it's there and there is probably nothing to do about it.
Now people who want to create a custom select can :
- Use HTML_QuickForm_select
- Use HTML_Form
- Use HTML_OOHForm_element_select
- Print '<select>', '</select>' and a loop for options
- Use any other class outside PEAR (hotscript and phpclasses have a lot)
The features of HTML_Select that made it stand out from the others were that
you could pass a DB_Result to it, a SQL query, an array, change its
attributes using HTML_Common API... But these options are still available in
HTML_QuickForm_select if you really need them.
I will just add that it's easier to maintain only one class, knowing that
both HTML_Select and HTML_QuickForm_select codes are the same.
Bertrand Mansion
Mamasam