incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <>
Subject Re: REST-ful URLs [Was: url rewriting supported?]
Date Tue, 08 Jul 2008 08:15:58 GMT
>> This presents more of a challenge. We need some way of  
>> transforming the inbound URL into a normal request -- with normal  
>> parameters -- so that Stripes can locate the right bean, [etc.]
>> Originally I was thinking we'd need to write our own filter to do  
>> this, or use URLRewrite. It turns out some clever Stripes devs got  
>> there first. They call this the "clean URL" feature. It was  
>> initially a user contribution, but the Gregg and Tim liked it so  
>> much they put it into the trunk.
>> I have been watching the 1.5 builds, but TOTALLY forgot about  
>> this. Needless to day, it completely solves the problem, and it  
>> makes my previous comments about needing an external filter  
>> totally obsolete. Assuming you buy into the Stripes Way, the URL  
>> scheme you describe can be completely accommodated.

BTW, I think this is evil.  It gives you a fixed URI scheme, and  
sooner or later you end up with URLs that look like /foo/-/-/-/ 

You see them all around these days.

>> "Clean URLs support both prefix mapping (/action/foo/{bar}) and  
>> extension mapping (/foo/{bar}.action). Any number of parameters  
>> and/or literals may be omitted from the end of a request URL."

The problem is that you can't do it from the middle of the request.

> Almost all of our present services are in need of an architectural
> overview, and what we're trying to do is (sorry to the use the word
> again, but) rationalize the URL schema.

We can't without breaking the URLs of all the existing websites.   
*And* some of them are using the ShortViewURLConstructor and some of  
them are using the DefaultURLConstructor.  I think this is a design  
parameter which we simply cannot afford to break.

(And no, mod_rewrite is not an answer.)

> What I'm thinking is that Janne doesn't sound all that enthusiastic
> about this so it might have to fit into the application as another

The Stripes stuff is great - IF you are writing a new app.  If you're  
trying to retrofit it to the existing schema, I would very strongly  
hesitate to just use it because it's great and we have it - that'll  
end up in a translation layer in front of the Beans which just muddy  
the waters so that we can use Annotations.  It'll be just like the  
Command superstructure, but in another form ;-)

Note that this CleanURI feature is new in Stripes 1.5 (which isn't  
even out yet in a stable form), and there have been tons of  
successful applications made in Stripes 1.4 and earlier.  I don't see  
it as a strong requirement to enforce this architecture.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message