TY - BOOK AU - Mehta,Bhakti TI - RESTful java patterns and best practices: learn best practices to efficiently build scalable, reliable, and maintainable high performance RESTful services T2 - Community Experience Distilled SN - 9781783287970 AV - QA76.73.J38 .M448 2014eb U1 - 005.2762 23 PY - 2014/// CY - Birmingham, England PB - Packt Publishing KW - Java (Computer program language) KW - Computer science KW - Computer software KW - Electronic data processing KW - Computer programs KW - Java (Langage de programmation) KW - Informatique KW - Logiciels KW - data processing KW - aat KW - computer science KW - software KW - COMPUTERS KW - Programming Languages KW - JavaScript KW - bisacsh KW - VBScript KW - fast KW - Electronic books KW - Llibres electrònics N1 - Includes bibliographical references and index; 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 N2 - 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 UR - https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&db=nlabk&AN=852359 ER -