[Jersey] Re: Adding grammar to the resources

From: Tatu Saloranta <>
Date: Fri, 9 Aug 2013 12:17:34 -0700

On Fri, Aug 9, 2013 at 7:08 AM, Nick Khamis <> wrote:

> > I think it is rather that as per JAX-RS (and, I would argue, most all
> > frameworks) routing by query parameter is something that should not be
> > done. There are many practical reasons for this, including the fact that
> > whereas path is hierarchic, and lends itself to relatively easy mapping,
> > and state machines, query parameter set is an unordered bag of things.
> And
> > operating on such dynamic, heterogenous data is difficult from otherwise
> > static handler.
> >
> > So really it's better to leave that to either app developer, or to
> another
> > framework/library/abstraction.
> How would leaving it to yet another framework be any different than
> having it implemented within jersey. We can push off the separation of
> concern to the next guy however, at some point it still needs to be
> implemented. Enriched routing algorithm that allows for added grammar,
> along with HATEOAS which I believe has a JSR is something that needs
> to be ironed out and made clear to developers.

You seem to believe that big monolithic systems are good. I don't.
Proper boundaries and separation of concerns is one of corner stones of
good software design. It is sometimes hard to push back against adding
features that conceptually are out of scope; and that's why I suggest this
might be one of those cases.
Then again, use of query parameters for routing smells wrong to me, to
begin with.

Pushing things out of scope does not necessarily mean no support. It could
also mean adding extension points to help integration, without implementing
logic. But given that there is sufficient access already, I don't know if
even this is necessary here.

-+ Tatu +-