Re: Pager_Sliding - better way to do this.
| From: | Dave Mertens | Date: | Sat, 15 Feb 2003 06:49:54 +0000 |
| Subject: | Re: Pager_Sliding - better way to do this. | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13322@lists.php.net to get a copy of this message | ||
> I know this feature under name "original CGI variables feature". I do not
> know exactly how _getLinksUrl() works, howewer I consider as a more
> desirable way of doing this following approach:
>
> $obj = new Object();
> $obj->setOriginalVariables(array(
> 'order' => $order,
> 'ID' => $ID,
> 'sessid' => $sessid));
> $obj->someOtherMethodCalls();
>
> Autodetection of GET variables can result into ugly URLs containing lot of
> unnecessary garbages and unwanted parameters. It is better to have
> possibility of explicit definition what HTTP GET variables should persist
> in query string accross various page reloads.
Well, that's all sounds great in a (small) controlled project. At my work i'm in a team
that writes modules for our framework.
Implementors use those modules.
The $obj->setOriginalVariables() is very error sensitive. You must exacly know what arguments a
page needs. A side from that we have a presentation framework around the main page.
These are using there own arguments. Besides that we have our own pager object (with works with
XML/XSLT to create the pager line), the PEAR pager would became useless in environments where a
developer/implementor doesn't know which arguments can be given to a page.
If there are functions that just use arguments just to use argumets (like a=1&b=2) than the
developer needs an upgrade ;-)
So, the only save way to handle those arguments, is to only change the pager arguments. Arguments
which are not meant for the pager needs to left alone and should be placed back into the url.
Only then the pager can't break functionality.
But he, this is just my option.
--
With best regards,
Dave Mertens - Senior Development Manager
dmertens@ism.nl
Innovative Solutions in Media
Schiekade 101
3033 BG Rotterdam, Netherlands
T +31-10-2436060
F +31-10-2436066
http://www.ism.nl
Quality Solutions - Reliable Partner