gnuherds-app-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [URI design]: query-string vs PATH_INFO -- mod_rewrite


From: MJ Ray
Subject: Re: [URI design]: query-string vs PATH_INFO -- mod_rewrite
Date: Mon, 29 Oct 2007 01:08:34 +0000
User-agent: Heirloom mailx 12.2 01/07/07

Davi Leal <address@hidden> wrote:
> > > /index.php/ControllerName/ActionName/Param1/Param2/...
>
> > I'd like to add something I just realized about this syntax: It's
> > fundamentally inflexible, because when (not if) you remove or change a
> > parameter, you don't know how to treat old URLs, which will come from
> > bookmarks and search engines.

You need to design the system carefully at the outset, but it need not
be a major problem.

> > Another thing is that optional parameters will lead to some strange syntax,
> > since you'll have either URLs ending like "////value4/"

Not all optional parameters should be part of the URL - you can put
some in, but they have to be on the end of the URL - so some might end
as query strings.  It depends how much you want them to be indexed by
search engines and so on.

> The current URI scheme would raise such kind of cases. When you add a new job 
> offer you use the below URL, with 'id=null':
>
>   /offers?action=edit&id=&section=general
>
>   /offers//edit/general
>
> Ref.: http://lists.gnu.org/archive/html/gnuherds-app-dev/2007-10/msg00117.html

That order makes no sense IMO.  You would visit something like
  /offers/general/new
(or maybe
  /offers/general/0/edit
where 0 is standing in for null, but it's better to have a new
virtual-page rather than a place-holder like that)
to add a new job, while editing an existing job would be
  /offers/general/36/edit
and viewing it
  /offers/general/36/
- hey presto, nice URLs, no problems with basic tasks, at least.

So, I'm not sure that this:

>  cancel task: URI scheme based on query-string or PATH_INFO?
>               http://savannah.nongnu.org/task/?7012

is proposed for the best reasons.

Hope that helps,
-- 
MJ Ray http://mjr.towers.org.uk/email.html tel:+44-844-4437-237 -
Webmaster-developer, statistician, sysadmin, online shop builder,
consumer and workers co-operative member http://www.ttllp.co.uk/ -
Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]