RESTful Java Web Services - Second Edition

Design scalable and robust RESTful web services with JAX-RS and Jersey extension APIs
Preview in Mapt

RESTful Java Web Services - Second Edition

Jobinesh Purushothaman

1 customer reviews
Design scalable and robust RESTful web services with JAX-RS and Jersey extension APIs
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


RESTful Java Web Services - Second Edition Book Cover
RESTful Java Web Services - Second Edition
$ 35.99
$ 25.20
RESTful Java Web Services - Third Edition Book Cover
RESTful Java Web Services - Third Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781784399092
Paperback354 pages

Book Description

REST (REpresentational State Transfer) is a simple yet powerful software architecture style to create scalable web services and allow them to be simple, lightweight, and fast. The REST API uses HTTP and JSON, so that it can be used with many programming languages such as Ruby, Java, Python, and Scala. Its use in Java seems to be the most popular though, because of the API's reusability.

This book is a guide to developing RESTful web services in Java using the popular RESTful framework APIs available today. You will begin with gaining an in-depth knowledge of the RESTful software architectural style and its relevance in modern applications. Further, you will understand the APIs to parse, generate, transform, and query JSON effectively. Then, you will see how to build a simple RESTful service using the popular JAX-RS 2.0 API along with some real-world examples. This book will introduce you to the Jersey framework API, which is used to simplify your web services.

You will also see how to secure your services with various authentication mechanisms. You will get to grips with various solutions to describe, produce, consume, and visualize RESTful web services. Finally, you will see how to design your web services to equip them for the future technological advances, be it Cloud or mobile computing.

By the end of this book, you will be able to efficiently build robust, scalable, and secure RESTful web services, making use of the JAX-RS and Jersey framework extensions.

Table of Contents

Chapter 1: Introducing the REST Architectural Style
The REST architectural style
Introducing HTTP
The core architectural elements of a RESTful system
Description and discovery of RESTful web services
Java tools and frameworks for building RESTful web services
Summary
Chapter 2: Java APIs for JSON Processing
A brief overview of JSON
Processing JSON data
Using JSR 353 – Java API for processing JSON
Using the Jackson API for processing JSON
Using the Gson API for processing JSON
Summary
Chapter 3: Introducing the JAX-RS API
An overview of JAX-RS
JAX-RS annotations
Returning additional metadata with responses
Understanding data binding rules in JAX-RS
Building your first RESTful web service with JAX-RS
Client APIs for accessing RESTful web services
Summary
Chapter 4: Advanced Features in the JAX-RS API
Understanding subresources and subresource locators in JAX-RS
Exception handling in JAX-RS
Reporting errors using application exceptions
Introducing validations in JAX-RS applications
Supporting custom request-response message formats
Asynchronous RESTful web services
Asynchronous RESTful web service client
Managing HTTP cache in a RESTful web service
Understanding filters and interceptors in JAX-RS
Understanding the JAX-RS resource lifecycle
Summary
Chapter 5: Introducing the Jersey Framework Extensions
Specifying dependencies for Jersey
Programmatically configuring JAX-RS resources during deployment
Modifying JAX-RS resources during deployment using ModelProcessor
Building Hypermedia as the Engine of Application State (HATEOAS) APIs
Reading and writing binary large objects using Jersey APIs
Generating chunked output using Jersey APIs
Supporting Server Sent Event in RESTful web services
Understanding the Jersey server-side configuration properties
Monitoring RESTful web services using Jersey APIs
Summary
Chapter 6: Securing RESTful Web Services
Securing and authenticating web services
HTTP basic authentication
HTTP digest authentication
Securing RESTful web services with OAuth
Authorizing the RESTful web service accesses via the security APIs
Input validation
Summary
Chapter 7: The Description and Discovery of RESTful Web Services
Introduction to RESTful web services
Web Application Description Language
RESTful API Modeling Language
Swagger
Revisiting the features offered in WADL, RAML, and Swagger
Summary
Chapter 8: RESTful API Design Guidelines
Identifying resources in a problem domain
Transforming operations to HTTP methods
Naming RESTful web resources
Fine-grained and coarse-grained resource APIs
Using header parameter for content negotiation
Multilingual RESTful web API resources
Representing date and time in RESTful web resources
Implementing partial response
Implementing partial update
Returning modified resources to the caller
Paging resource collection
Implementing search and sort operations
Using HATEOAS in response representation
Versioning RESTful web APIs
Caching RESTful web API results
Using HTTP status codes in RESTful web APIs
Overriding HTTP methods
Documenting RESTful web APIs
Asynchronous execution of RESTful web APIs
Microservice architecture style for RESTful web applications
Using Open Data Protocol with RESTful web APIs
Summary

What You Will Learn

  • Introduce yourself to the RESTful software architectural style and the REST API design principles
  • Make use of the JSR 353 APIs and Jackson API for JSON processing
  • Build portable RESTful web APIs, making use of the JAX-RS 2.0 API
  • Simplify API development using the Jersey extension APIs
  • Secure your RESTful web services with various authentication and authorization mechanisms
  • Get to grips with the various metadata solutions to describe, produce, and consume RESTful web services
  • Understand the design and coding guidelines to build well-performing RESTful APIs
  • See how the role of RESTful web services changes with emerging technologies and trends

Authors

Table of Contents

Chapter 1: Introducing the REST Architectural Style
The REST architectural style
Introducing HTTP
The core architectural elements of a RESTful system
Description and discovery of RESTful web services
Java tools and frameworks for building RESTful web services
Summary
Chapter 2: Java APIs for JSON Processing
A brief overview of JSON
Processing JSON data
Using JSR 353 – Java API for processing JSON
Using the Jackson API for processing JSON
Using the Gson API for processing JSON
Summary
Chapter 3: Introducing the JAX-RS API
An overview of JAX-RS
JAX-RS annotations
Returning additional metadata with responses
Understanding data binding rules in JAX-RS
Building your first RESTful web service with JAX-RS
Client APIs for accessing RESTful web services
Summary
Chapter 4: Advanced Features in the JAX-RS API
Understanding subresources and subresource locators in JAX-RS
Exception handling in JAX-RS
Reporting errors using application exceptions
Introducing validations in JAX-RS applications
Supporting custom request-response message formats
Asynchronous RESTful web services
Asynchronous RESTful web service client
Managing HTTP cache in a RESTful web service
Understanding filters and interceptors in JAX-RS
Understanding the JAX-RS resource lifecycle
Summary
Chapter 5: Introducing the Jersey Framework Extensions
Specifying dependencies for Jersey
Programmatically configuring JAX-RS resources during deployment
Modifying JAX-RS resources during deployment using ModelProcessor
Building Hypermedia as the Engine of Application State (HATEOAS) APIs
Reading and writing binary large objects using Jersey APIs
Generating chunked output using Jersey APIs
Supporting Server Sent Event in RESTful web services
Understanding the Jersey server-side configuration properties
Monitoring RESTful web services using Jersey APIs
Summary
Chapter 6: Securing RESTful Web Services
Securing and authenticating web services
HTTP basic authentication
HTTP digest authentication
Securing RESTful web services with OAuth
Authorizing the RESTful web service accesses via the security APIs
Input validation
Summary
Chapter 7: The Description and Discovery of RESTful Web Services
Introduction to RESTful web services
Web Application Description Language
RESTful API Modeling Language
Swagger
Revisiting the features offered in WADL, RAML, and Swagger
Summary
Chapter 8: RESTful API Design Guidelines
Identifying resources in a problem domain
Transforming operations to HTTP methods
Naming RESTful web resources
Fine-grained and coarse-grained resource APIs
Using header parameter for content negotiation
Multilingual RESTful web API resources
Representing date and time in RESTful web resources
Implementing partial response
Implementing partial update
Returning modified resources to the caller
Paging resource collection
Implementing search and sort operations
Using HATEOAS in response representation
Versioning RESTful web APIs
Caching RESTful web API results
Using HTTP status codes in RESTful web APIs
Overriding HTTP methods
Documenting RESTful web APIs
Asynchronous execution of RESTful web APIs
Microservice architecture style for RESTful web applications
Using Open Data Protocol with RESTful web APIs
Summary

Book Details

ISBN 139781784399092
Paperback354 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Building a RESTful Web Service with Spring Book Cover
Building a RESTful Web Service with Spring
$ 23.99
$ 16.80
Learning Reactive Programming with Java 8 Book Cover
Learning Reactive Programming with Java 8
$ 35.99
$ 7.20
Spring Microservices Book Cover
Spring Microservices
$ 39.99
$ 28.00
Spring MVC: Designing Real-World Web Applications Book Cover
Spring MVC: Designing Real-World Web Applications
$ 69.99
$ 49.00
Mastering Microservices with Java Book Cover
Mastering Microservices with Java
$ 35.99
$ 25.20
Spring: Developing Java Applications for the Enterprise Book Cover
Spring: Developing Java Applications for the Enterprise
$ 67.99
$ 47.60