users@jsr311.java.net

How to handle resource uris (simple atom server)

From: Jo Størset <jo.storset_at_usit.uio.no>
Date: Wed, 27 Aug 2008 10:27:53 +0200

Hi,

I've asked similar questions before, but I'm still not satisfied with
the solutions I've come up with. So :)

Looking at the simple atom server, the resource uris are reflected in
a lot of places, partly as duplication and partly as unique pieces
needed to know resource uris:

- path annotations
- java URIBuilder handling
- hardcoded string constants
- stored in the data store

On an architectural/design level, I don't really see any consistent
pattern to how the urls are handled (to me this seems like a bit a
mess :).

So I've, unsuccessfully, been trying to come up with a set of
guidelines or practices, preferably with help from the framework, on
how to handle this really important piece of a rest application.

Is this clearer to anyone else? Am I trying to fix something that
should rather be left alone for now?

I would really appreciate any ideas on this, as I'm kind of stuck :)

Jo