incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray Altheim <murra...@altheim.com>
Subject REST-ful URLs [Was: url rewriting supported?]
Date Mon, 07 Jul 2008 21:24:20 GMT
One of the things I've been working on (both related and unrelated to
JSPWiki) is a web service URL schema providing read and write access
to the wiki, in particular the wiki's page provider. Without going
into detail about that I thought I might at least mention the idea
of REST-fully regularizing *all* of the URLs used by JSPWiki to a
common approach, i.e. (optional components in square brackets):

    baseURL collectionHierarchy [objectId] action ['?' parameters]

e.g.,

    http://www.acme.org/wiki/  pages/  PageName/  get/

This would in the future permit a collection hierarchy where 'pages/'
currently exists, with 'PageName' as object ID (oid) potentially
replaced by any kind of identifier (pages may be identified by name
or by some other kind of identifier that survives across renames --
title).

    http://www.acme.org/wiki/pages/PageName/get/
    http://www.acme.org/wiki/pages/PageName/edit/
    http://www.acme.org/wiki/pages/PageName/put/
    http://www.acme.org/wiki/pages/search/?q=term

(the actual action names aren't important) or alternately, including
the action name as a parameter:

    http://www.acme.org/wiki/pages/PageName/?action=get
    http://www.acme.org/wiki/pages/PageName/?action=edit
    http://www.acme.org/wiki/pages/PageName/?action=put
    http://www.acme.org/wiki/pages/?action=search&q=term

allowing things like:

    http://www.acme.org/wiki/pages/PageName/?action=get&format=html
    http://www.acme.org/wiki/pages/PageName/?action=get&format=xml
    http://www.acme.org/wiki/pages/PageName/?action=get&format=text

etc., with advantages and disadvantages to each.

Has there been any thought amongst other members of the team in writing
a more REST-ful URL constructor? Perhaps as the default? While I do
understand dealing with legacy issues it'd be nice to just have a simple,
REST-ful URL that just worked. It's been one of those things I've never
been able to get working consistently in JSPWiki across all
installations.

I don't have it working yet but I basically have been writing a web
service that would provide complete access to the wiki's functionality
using a schema similar to the above. The question for me is how
difficult it'd be in rewriting the JSPs to generate URLs as according
to the web service instead of the existing setting, which of course
led me to think that the whole web service is really just an alternative
URL constructor...

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Mime
View raw message