users@jersey.java.net

[Jersey] Re: Support fur API Design Patterns

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Mon, 12 Nov 2012 01:26:18 -0500

Mathias,

     Jersey is a lower-level library than you seem to think. You would
have to implement most of these features yourself. One of the beautiful
things about Jersey (in my view) is that it doesn't force a design on
you. It's almost like a library instead of a framework (which is ideal).
Almost :)

Gili

On 11/11/2012 2:58 PM, Mathias wrote:
> Hi,
>
> when following Apigee's experiences in creating pragmatic APIs, there
> are some recommended design patterns that should be supplied by an API
> provider. Which of these patterns does Jersey 2.0 support in scope of
> JAX-RS 2.0 or beyond:
>
> - Associations (GET|POST /resource/identifier/resource)
> - Complexity behind "?" (attribute oriented selection)
> - Error Handling (POST dogs/1234 --> Error; PUT dogs/1234 if not
> exists --> Error)
> - Error Supressing (suppress_response_codes = true --> always returns
> status 200)
> - Error-Message (statusCode, errorCode, developerMessage, userMessage,
> info)
> - Configuration of Status-Codes (200,400,500,201,304,404,403,401)
> - Versioning (v1/docs/1)
> - GET Partial Responese (attribute oriented projection in addition
> with dot navigation)
> - GET Pagination (configure default, only for get, Metadata with each
> paginated response: total number of records available)
> - GET Formats (configure default, /dogs/1234.json, /dogs/1234.xml,
> HTTP request header, Path rules over HTTP request header)
> - Global Search Across Resources (/search?q=fluffy+red,
> /search.xml?q=fluffy+red)
>
> Regards
> Mathias Schneider
> mathias4u_at_gmx.net