struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <jeromy.ev...@blueskyminds.com.au>
Subject Re: Some Idea On REST mapping
Date Wed, 03 Sep 2008 00:37:10 GMT
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


Mime
View raw message