struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Wong <laz...@gmail.com>
Subject Re: Some Idea On REST mapping
Date Wed, 03 Sep 2008 01:39:52 GMT

Thanks so much for those replys

I got much clear about the URL patterns I could use with the plugin.


Jeromy Evans - Blue Sky Minds wrote:
> 
> Ryan Wong wrote:
>> But there is still a question.
>>
>> With the namespace we have to place the parameter like prefix...
>> eg.  http://example.org/namespace/page/1/posts to call postsController
>> index() method.
>>
>> It seems it cannot handle urls like
>> http://example.org/namespace/posts/page/1
>> The follow one is more easily to accept by user, isn't it?
>>
>>
>>   
> 
> Correct, it's just for the namespace, so it can't handle URLs like your 
> parameter handling does.
> 
> I agree your URL looks better. 
> 
> My preference is the following:
> 
> The first page of the first post
> 
> http://example.org/namespace/posts/1?page=1
> 
> 
> the first page of posts:
> 
> http://example.org/namespace/posts?page=1
> 
> 
> the index of posts:
> 
> http://example.org/namespace/posts
> 
> 
> And, although this isn't a good example, using the 
> NamedVariablePatternMatcher:
> 
> The first page of the first post:
> 
> http://example.org/namespace/posts/1/page/1
> 
> in which case a PageController is being invoked (useful for genuine 
> parent-child relationships between resources).
> 
> But it really doesn't matter that much.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


-----
Blog: http://www.ryanwong.name
Can Use: English, Chinese
-- 
View this message in context: http://www.nabble.com/Some-Idea-On-REST-mapping-tp19263471p19281518.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message