users@jersey.java.net

Re: Beginners questions on Uri's and templates etc.

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 11 Dec 2007 17:22:42 +0100

Jeff Gortatowsky wrote:
> Jakub and Paul...
>
> Thank you both for you replies. I guess using "/" as a resource root never dawned on me.
> Paul I will give your UriTemplate tips a try. I'll report back if I get stuck otherwise
> just lurk and learn. :)
>
> I think I should also look at my domain model and try come up with URIs
> that are unambiguous. That is don't repeat concepts. I did a bit of re-reading in the
> the book "RESTful Web Services".
>
> I have to admit, a few well placed logging statements
> in the resolver code would be grand. Just to see what it is 'thinking'.

I just realized i am guilty as charged of knocking out Jakub's logging
code... i completely changed the URI matching algorithm and as a result
lost Jakub's code in the original. Sorry!


> :D I see others
> have mentioned that in the archives, and I see the response. I have the source...
> so I am free to do so if I wish aye? ;)
>

Happy to accept a patch :-)

One thing that annoys me about logging code is that it "pollutes" the
logic of the code. So i was thinking about how we may support such
logging in a manner that does not "pollute". Two possible alternative
solutions to direct logging could be:

1) Use DTrace providers. Unfortunately that won't work on Windows and
    some Linux distros. But it would be my favorite approach to
    investigate.

2) Provide logging specific UrlRule and UrlRules adapters that
    performing logging and defer to the under the underlying
    implementations. I am not sure if this will provide the degree of
    logging granularity required.

Paul.

> Best wishes,
> Jeff
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109