RESTful java patterns and best practices : learn best practices to efficiently build scalable, reliable, and maintainable high performance RESTful services /
This book is aimed at novice developers who want to gain insights into building RESTful services and improve productivity, as well as for advanced developers who want to delve into more complicated topics.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, England :
Packt Publishing,
2014.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: REST
- Where It Begins; Introduction to REST; REST and statelessness; The Richardson Maturity Model; Level 0
- Remote Procedure Invocation; Level 1
- REST resources; Level 2
- more HTTP verbs; Level 3
- HATEOAS; Safety and idempotence; Safe methods; Idempotent methods; Design principles for building RESTful services; Identify the resource URIs; Identifying the methods supported by the resource; HTTP verbs and REST; PUT versus POST
- Identifying the different representations of the resourceImplement the APIs; The Java API for RESTful Services (JAX-RS); Deploy the RESTful services; Test the RESTful services; The Client API with JAX-RS 2.0; Accessing RESTful resources; Best practices when designing resources; Recommended reading; Summary; Chapter 2: Resource Design; REST response patterns; Content negotiation; Content negotiation using HTTP headers; Content negotiation based on URL patterns; Entity providers and different representations; StreamingOutput; ChunkedOutput; Jersey and JSON support
- POJO-based JSON binding supportJAXB-based JSON binding support; Low-level JSON parsing and processing support; API versioning; Version in the URI approach; Version as part of the request query parameter; Specifying the version in the Accept header; Response codes and REST patterns; Recommended reading; Summary; Chapter 3: Security and Traceability; Logging REST APIs; Best practices for the logging REST API; Including a detailed consistent pattern across service logs; Obfuscating sensitive data; Identifying the caller or the initiator as part of the logs; Do not log payloads by default
- Identifying meta-information related to the requestTying the logging system with a monitoring system; Validating RESTful services; Validation exception handling and response codes; Error handling with RESTful services; Authentication and authorization; What is authentication?; SAML; What is authorization?; OAuth; Differences between OAuth 2.0 and OAuth 1.0; An authorization grant; Refresh tokens versus access tokens; Jersey and OAuth 2.0; Best practices for OAuth in the REST API; Limiting the lifetime for an access token; Support providing refresh tokens in the authorization server
- Using SSL and encryptionOpenID Connect; REST architecture components; Recommended reading; Summary; Chapter 4: Designing for Performance; Caching principles; Caching details; Types of caching headers; Strong caching headers; Weak caching headers; Expires and Cache-Control
- max-age; Cache-Control header and directives; Last-Modified and ETag; The Cache-Control header and the REST API; ETags; The ETag header and the REST API; Types of ETags; The Facebook REST API and ETags; RESTEasy and caching; Asynchronous and long-running jobs in REST; Asynchronous request and response processing