[dev] [cvs] commit: ansel .htaccess gallery.php ansel/docs lighttpd-ansel.conf ansel/lib Ansel.php api.php ansel/lib/Views Abstract.php Gallery.php GalleryLightbox.php ansel/templates/view gallery.inc gallerylightbox.inc
Michael Rubinsky
mrubinsk at horde.org
Sun May 25 13:32:33 UTC 2008
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>
>> - Pass a callback function to the Pager that re-writes the urls to something
>> like: horde/ansel/gallery/1/page/1 instead of tacking the page onto the URL
>> as a GET parameter. If not using "pretty" url generation, the callback is
>> not set, and of course, a callback can also be specified via the api.
>
> These URLs are prettier, but it's worth noting that something like:
>
> /horde/ansel/1/1
I actually did think of going this route, but thought that it would be
ambiguous from a user's point of view...is the second '1' a page, is
it an image? Since we were already doing gallery/x/image/y I thought
that this fit in better.
>
> is prettier :) Doing name/value for everything in the URL shouldn't be
> necessary. Also I've seen some implementations do key=val for keyword
> args, so:
>
> /horde/ansel/slug/page=1
I do agree that it looks cleaner without the 'gallery' qualifier, but
I thought that might cause issues because of the other URLs that are
possible. Example - to list all galleries by a certain user, we do
ansel/user/username. Add the "page" bit to it and you could have
something like:
ansel/user/username/page=1 or ansel/user/username/1 etc... (depending
of course, on how we decide to do the page)
which (to me, anyway) would be difficult to differentiate using
re-write rules from (the way we currently handle image numbers):
ansel/slug/image/imagenumber/page=1 or ansel/slug/image/imagenumber/1
(or taking the image qualifier out):
ansel/slug/imagenumber/page=1 or ansel/slug/imagenumber/1
We also allow listing by category:
ansel/category/Family ... and all the variations with page numbers etc...
I guess we could do something with key=val pairs in the url for a
grouping attribute or something (user/category/tag etc...), but IMO,
this defeats the purpose of doing pretty, (more RESTful?) urls.
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/dev/attachments/20080525/88c7859a/attachment.bin
More information about the dev
mailing list