[aur-dev] AUR Variable Names
eliott at cactuswax.net
Sat Jan 5 14:24:29 EST 2008
On 1/5/08, Callan Barrett <wizzomafizzo at gmail.com> wrote:
> I'd like some suggestions on how we deal with the issue of this:
> I've seen suggestions of mod_rewrite but really nothing further, I'll
> start us off but I really want opinions from at least a few different
> people. To begin I'm not really thrilled with the idea of mod_rewrite
> at all and I can't find much of a point to using it, I've been told it
> will be amazing because then we can have urls like /search/foo/ but so
> what? People don't search using urls they search with the search form
> and the fact we can start going /package/1337/ instead of say
> packages.php?id=1337 is so incredibly minor why should we bother?
> I propose that at the very least (that is even if we decide to use
> mod_rewrite for some crazy reason) we change the variable names to
> something that's actually descriptive and try get rid of as many
> variables as possible. If you take a look at tardo's repo you can see
> the details page now only requires the package id variable and nothing
> else which is a great step in the right direction, we can also get rid
> of the sorting options in the search form because you can already sort
> via the links in column names and the variables do_Search is just as
> pointless as do_Details. With just these changes we get something like
> O=0&L=&C=&K=&PP=&SeB= which we could probably make even smaller and
> nicer if we changed variable names to be descriptive.
> Anyway, most of all I want to hear what other people have to say about
> this because I think choosing the right names and issues like
> backwards compatibility are pretty important.
I recommend something similar to what Loui said.
Split packages.php into separate files, such as search.php and details.php.
Then the long ugly url goes away in the search result package links
(just a ?pkgid=100 or whatever).
The search page will still have a marginally ugly url when you click a
column to sort, but that can certainly be reduced.
As to reasoning behind 'pretty urls', they are generally used for two reasons:
1. Search engine results
2. Human readability
Search engines give a higher page rank to urls that are descriptive
regarding the page. So /packages/exaile would have a higher rank than
/packages.php?pkgname=exaile. They may disregard get args, but I don't
As for #2, that one is obvious. If someone types a url in by hand,
they may have a chance at going right to the page they want.
I don't know if we care about #1, and #2 may be a non issue in our
case...because people are using the system just fine now.
More information about the aur-dev