Bug 18410 - Koha should use cool URIs
Summary: Koha should use cool URIs
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-10 14:29 UTC by Pablo AB
Modified: 2022-12-06 03:21 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo AB 2017-04-10 14:29:16 UTC
Right now Koha use a very volatile URI scheme. If we seek having not ephemeral URIs they should be completely different. Take a look to this article from 1998 of a guy called Tim Berners-Lee:

"Cool URIs don't change" https://www.w3.org/Provider/Style/URI

A normal Koha URI looks like this: 

https://catalog.bywatersolutions.com/cgi-bin/koha/opac-detail.pl?biblionumber=117351


This URI is doomed to die in the short term, is not designed thinking in long-term. We have a lot of information about the tools and technical things used to put it there, like "cgi-bin", "koha" and "pl".

Is not even consistent about using always en_US (american English): "/cgi-bin/koha/cataloguing/addbooks.pl" (cataloguing !=  cataloging).

As the article say we shouldn't forget about domain name. We could encourage the use of more permanent words like "catalog" for the host part of the FQDN.

PS: This may be related to the robust RESTful URI.
Comment 1 Owen Leonard 2017-04-10 15:47:15 UTC
I have always been bothered by the fact that I can't go to a URL like

https://intranet.bywatersolutions.com/cgi-bin/koha/circ/

...and get to the home page for that module. I agree that even better would be 

https://intranet.bywatersolutions.com/circ/
Comment 2 Pablo AB 2017-05-29 02:07:13 UTC
This could be done with some URI rewrite (Apache mod_rewrite) directives. Someone give an example on wiki: https://wiki.koha-community.org/wiki/Linked_Data_RFC#Canonical_URL.2FURI_for_records
Comment 3 David Cook 2022-12-06 03:20:28 UTC
URIs are a tough one. If you really wanted non-ephemeral URLs, you'd want to use a link resolver like Handle.net to have "permanent identifiers".

If/when we move to a framework like Mojolicious which has a router to map URIs to controller actions, it'll be easier to create nicer looking URIs. 

I don't think it would be particularly sustainable to hack this using Apache rewrite.
Comment 4 David Cook 2022-12-06 03:21:16 UTC
(In reply to Pablo AB from comment #2)
> This could be done with some URI rewrite (Apache mod_rewrite) directives.
> Someone give an example on wiki:
> https://wiki.koha-community.org/wiki/Linked_Data_RFC#Canonical_URL.
> 2FURI_for_records

I think that was the product of a conversation Magnus and I had together a long time ago. 

It never really took off...