Re: Re: HTML_Select

From: Date: Sun, 27 Oct 2002 02:31:55 +0000
Subject: Re: Re: HTML_Select
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10281@lists.php.net to get a copy of this message
There is a good point here - these package embed 'data' into source code - not normally a particually good idea. I would have suggested something like XML with serialized caching for storing the data, then just use the config class (can it handle serialized caching of xml parses?) + the existing HTML_Select. to display it. At present we do not have a very structured (or clear way) to deal with 'data type packages' either a new HTML_Select_Data, could just be a set of XML files with a short example on how to use them with HTML select. or just add it to the HTML package... I'm not sure where the fix is here.. 1) These packages are useful, athough not the 'best solution' to the problem. 2) I'm not sure if anyone has the time/ willingness to create the XML files and examples to do it as mentioned above... The same principles (of mixing data into the code) apply to some degree to stuff like i18N countries, (which is where I got my country list data from). The huge associative array stuff in the Date/TimeZone.php Anyway - some more weekend thoughts.... Regards Alan Bertrand Mansion wrote:
<richard@v-webmail.co.uk> wrote :
As stated before, there is already an HTML_Select class in PEAR. It is in /php4/pear/HTML. I don't understand why you release another HTML_Select class that only output some stupid country names in your own language.
     
Perhaps if you had cared to look at the code you would see that it's not "another HTML_Select", merely some code to accomodate three commonly needed <select> lists. In fact, whilst you're reading the code, try looking also at the package.xml file and you'll magically discover that the dir structure will actually accomodate the HTML_Select class in /php4/pear/ when it (eventually) gets moved across.
FYI, I have looked at the code. Actually, it took me 5 seconds. I especially liked your examples: http://cvs.php.net/co.php/pear/HTML_Select/Select/examples/Country.php?r=1.1 First, I thought it was a joke ! Your classes don't have anything to do with the HTML_Select package. I don't understand why you released them under the name HTML_Select ? They are not even compatible with this package.
I don't see the use of it when all you have to do is an array of country names. Which php user can't do that ?
     
Well if you you think that, then why on earth do you bother with an HTML_Select class at all? Which php user can't write "<select>..." ?
Well, as you said before, "Perhaps if you had cared to look at the code you would see that" HTML_Select handles values from arrays, DB connections, DB results and probably some other datasources. It doesn't only display UK county names...
Furthermore, I don't remember anyone voting for this to be in pear, but I might be wrong as I thought it didn't belong here in the first place so I didn't bother reading the thread.
     
Well you only have yourself to blame then. Any reasonable person had they not read the thread in the first place, would surely have gone and read it before composing such an arrogant message. FYI, a number of people voiced their support for the code.
I don't blame anyone. If some people think these classes belong to pear, so be it. I just think they don't and more importantly, I don't think they should be released under the name HTML_Select when all they do is print uk or us county names. Some people have waited to have 5 positive votes before committing their code. I thought this was the way we would go. I don't remember having seen more than one or two votes for this. And from the beginning I said I was against this. Of course, you might not care about my opinion, doesn't matter, but at least ask us before about what the name of your package should be.
The only thing it adds to pear is a bit more confusion about what the HTML_Select class does.
     
It adds no such confusion. It adds three commonly needed <select> lists.
I don't think everyone needs US state names in their web apps. Not to say about UK counties... I have seen more useful classes before. Bertrand Mansion Mamasam PS: Don't take it personal Richard, I like you a lot and I think your classes are very high standard in general, just not these 3.


« previous php.pear.dev (#10281) next »