[LUNI] REST url
sean-lynch at sean-lynch.com
Tue Jul 28 09:13:53 CDT 2009
You are correct.
One of the links I sent was about just this problem in the Rails framework.
Ending up with URLs like:
and adding configuration options to side step the defaults and end up
with URLs like:
For Rails people to choose configuration over convention is a really big
deal! So you have identified one of the drawbacks of REST. Simple to
understand, once you get the pattern in your head, but very wordy.
Stripes is a Java MVC framework that I believe has RESTful URLs:
Jay Strauss wrote:
> I understand what you are saying, but what if you need more
> parameters? Like begindate, enddate, ticklength (ie weekly, daily,
> Would I end up with a url like:
> Seems kinda hairy.
> I'm just starting this whole adventure into java and rest. I haven't
> decided if and which framework to use. (I can only learn so much at
> On 7/27/09, sean lynch <sean-lynch at sean-lynch.com> wrote:
>> Jay Strauss wrote:
>>> Be considered a valid REST url? I'm not sure if parameters are
>>> "allowed" on a GET. It seems like all the examples do NOT use parameters.
>> Probably should look like:
>> so parameters are allowed as part of the parsing of urls.
>> Here's a nice discussion about it:
>> but I would suggest that you choose a framework that supports truly
>> restful urls, then the url formation for that framework will naturally
>> be restful.
>> If your framework has to jump through hoops to produce restful url's
>> then forget the REST or, if you must have REST, switch frameworks.
>> People don't type in url's, they click on them embedded in hyperlinks.
>> Don't try to shoehorn in a RESTful interface.
>> If you work in Rails you will get RESTful URL's. Some PHP and Python
>> frameworks use REST are have good routing mechanisms.
>> I'll note that even frameworks, like Rails, that have truly embraced
>> REST still have trouble handling all cases. Correctly nesting the
>> routing information can get complex if you want super strict RESTful
>> URLs. The Rails people are adding more configuration options to make
>> more sensible choices:
>> That is a big leap for a framework whose mantra is convention over
>> Work with a framework that already uses REST for a few weeks and the
>> naming will become more natural to you and seem less forced.
>> Linux Users Of Northern Illinois (Chicago) - Technical Discussion
More information about the LUNI