incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray Altheim <murra...@altheim.com>
Subject Re: REST-ful URLs [Was: url rewriting supported?]
Date Tue, 08 Jul 2008 08:16:23 GMT
Janne Jalkanen wrote:
>> I have a strong requirement for a REST-ful scheme, with some
>> flexibility on the definition of REST-ful. One thing I didn't
> 
> Remember that we can't break existing URL schemes.  So essentially we 
> are talking about replacing the current URLConstructor scheme with 
> another URLConstructor scheme, which may or may not rely on Stripes 
> artifacts.

Yes, understood. I'm thinking it might be a fourth URLConstructor scheme
since it won't completely replace (plug-and-play wise) any of the
existing schemes. And as I mentioned to Andrew, I'd like to be able to
literally re-use it to invoke another web service layer on top of
JSPWiki (for preservation, interwiki, and other potential services).

> IMO RESTful has become an overloaded hypeword these days.  You can look 
> at it this way: we already *are* RESTful.  *All* applications which use 
> the browser are RESTful.  REST does not mean "we will not use query 
> string".  REST means that every resource is accessible through an unique 
> link (and that it's stateless, which we mostly are anyway).

I'm not much on hype myself, and while I do agree that the ShortURLConstructor
is either very close to or exactly matching the URL schema I'm considering,
there are some problems with the existing implementation *and* I believe
I may have a requirement to load the verb on as the latter token rather
than being included in the query string. I don't want to quibble over the
definition of RESTful either, but I may need to replace that latter URL

    ShortURLConstructor - uses path-like reference style:

          http://mywiki.com/jspwiki/wiki/Main
          http://mywiki.com/jspwiki/wiki/Main?do=Edit

with

          http://mywiki.com/jspwiki/wiki/Main/edit/

(both lowercased and potentially a different choice than "edit" (it won't
be up to me though I'll have some influence).

> When it comes to the machine-accessible APIs, then REST becomes a far 
> more useful paradigm (as opposed to things like XML-RPC and SOAP).  
> There is no single endpoint, but you use the same kind of an API to 
> access your data as with the regular browser.

Yes, certainly. We're dealing with government/corporate cooperative team
designing and implementing an enormous application that is entirely built
on this principle. There are RESTful URLs all through the application and
I've got a requirement to hook JSPWiki into that. It would be lovely if
the URLs that the user sees when using the wiki are the *same* ones (or
are from at least the same schema) as the ones hooking the wiki into the
preservation system, which is why I'm excited by Andrew's latest missive.

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