users@jersey.java.net

[Jersey] Support fur API Design Patterns

From: Mathias <mathias4u_at_gmx.net>
Date: Sun, 11 Nov 2012 20:58:14 +0100

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