Building a RESTful web service with spring a hands-on guide to building an enterprise-grade, scalable RESTful web service using the spring framework

A hands-on guide to building an enterprise-grade, scalable RESTful web service using the Spring Framework About This Book Follow best practices and explore techniques such as clustering and caching to achieve a scalable web service Leverage the Spring Framework to quickly implement RESTful endpoints...

Descripción completa

Detalles Bibliográficos
Otros Autores: Dewailly, Ludovic, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham : Packt Publishing 2015.
Edición:1st edition
Colección:Community experience distilled.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629596506719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Credits
  • About the Author
  • About the Reviewers
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 1: A Few Basics
  • REST principles
  • Uniform interface
  • Client-Server
  • Stateless
  • Cacheable
  • Layered system
  • Code on demand
  • The Spring Framework and REST
  • Our RESTful web service
  • Architecture
  • Data model
  • Summary
  • Chapter 2: Building RESTful Web Services with Maven and Gradle
  • Apache Maven
  • Dependency management in Apache Maven
  • Gradle
  • Dependency management in Gradle
  • The structure of our sample web service
  • The anatomy of a Service Module
  • Local versus Remote Service Invocations
  • Developing RESTful web services
  • Working with your favorite IDE
  • Making services executable
  • Starting services with Maven
  • Summary
  • Chapter 3: The First Endpoint
  • The Inventory service
  • REST and the MVC pattern
  • Request mapping
  • Path mapping
  • HTTP method mapping
  • Request parameter mapping
  • Running the service
  • A few words on data representation
  • Summary
  • Chapter 4: Data Representation
  • The Data-Transfer-Object design pattern
  • The API response format
  • The envelope format
  • Error management
  • Pagination support
  • Customizing JSON responses
  • API evolutions
  • HATEOAS
  • Versioning strategies
  • URI versioning
  • Representation versioning
  • Other approaches
  • Summary
  • Chapter 5: CRUD Operations in REST
  • Mapping CRUD operations to HTTP methods
  • Creating resources
  • Quickly testing endpoints
  • JSON versus form data
  • Updating resources
  • The update endpoint
  • Testing update requests
  • Deleting resources
  • Overriding the HTTP method
  • Summary
  • Chapter 6: Performance
  • HTTP compression
  • Content negotiation
  • gzip or deflate?
  • gzip compression in RESTful web services
  • Spring Boot
  • HTTP caching
  • Cache-Control.
  • Private/Public caching
  • No caching
  • ETags
  • Last-Modified/If-Modified-Since headers
  • Room availability
  • An overview of implementation
  • The REST resource
  • Adding HTTP caching
  • Caching with ETags
  • Summary
  • Chapter 7: Dealing with Security
  • The booking service
  • The REST resource
  • Authentication
  • HTTP Basic authentication
  • Using Basic authentication with Spring
  • HTTP Digest authentication
  • Token-based authentication
  • Other authentication methods
  • Authorization
  • Authorization with Spring
  • URL mapping
  • Resource annotations
  • Input validation
  • Java Bean annotations
  • Regular expressions
  • Validating bookings
  • Encryption
  • Storing sensitive data
  • Summary
  • Chapter 8: Testing RESTful Web Services
  • Unit testing Spring controllers
  • Mocking
  • Simple mocking
  • Implementation stubbing with a mocking library
  • Mockito and Spring
  • Testing security
  • Integration testing
  • Continuous delivery
  • Integration tests with Spring Boot
  • Postman
  • Postman and security
  • Other forms of testing
  • User Acceptance Testing
  • Load testing
  • Summary
  • Chapter 9: Building a REST Client
  • The basic setup
  • Declaring a client
  • Remote versus local clients
  • Availability and booking services
  • Handling security
  • The Basic authentication
  • The Digest authentication
  • HTTP public key pinning
  • Exception handling
  • Summary
  • Chapter 10: Scaling a RESTful Web Service
  • Clustering
  • Scaling up versus scaling out
  • The benefits of clustered systems
  • Load balancing
  • Linear scalability
  • Distributed caching
  • Data-tier caching
  • First-level caching
  • Second-level caching
  • Application-tier caching
  • Asynchronous communication
  • Summary
  • Index.