▶Book Description
Representational State Transfer (REST) is a simple yet powerful software architecture style to create lightweight and scalable web services. The RESTful web services use HTTP as the transport protocol and can use any message formats, including XML, JSON(widely used), CSV, and many more, which makes it easily inter-operable across different languages and platforms.
This successful book is currently in its 3rd edition and has been used by thousands of developers. It serves as an excellent guide for developing RESTful web services in Java.
This book attempts to familiarize the reader with the concepts of REST. It is a pragmatic guide for designing and developing web services using Java APIs for real-life use cases following best practices and for learning to secure REST APIs using OAuth and JWT. Finally, you will learn the role of RESTful web services for future technological advances, be it cloud, IoT or social media.
By the end of this book, you will be able to efficiently build robust, scalable, and secure RESTful web services using Java APIs.
▶What You Will Learn
- Introduce yourself to the RESTful software architectural style and the REST API design principles
- Make use of the JSR 353 API, JSR 374 API, JSR 367 API and Jackson API for JSON processing
- Build portable RESTful web APIs, making use of the JAX-RS 2.1 API
- Simplify API development using the Jersey and RESTEasy 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
▶Key Features
- Build efficient and secure RESTful web APIs in Java..
- Design solutions to produce, consume and visualize RESTful web services using WADL, RAML, and Swagger
- Familiarize the role of RESTful APIs usage in emerging technology trends like Cloud, IoT, Social Media.
▶Who This Book Is For
This book is for Java developers who want to design and develop scalable and robust RESTful web services with the Java APIs. Contents are structured by keeping an eye on real life use cases from the RESTful API world and their solutions. Although the JAX-RS API solves many of the common RESTful web service use cases, some solutions are yet to be standardized as JAX-RS APIs. Keeping this in mind, a chapter is dedicated in this book for discussing extension APIs, which takes you beyond JAX-RS. This book also discusses the best practices and design guidelines for your REST APIs. In a nutshell, you will find this book useful while dealing with many real life use cases, such as dynamic resource
configuration, message broadcasting with the server-sent event, HATEOAS, and so on.
▶What this book covers
- Chapter 1, Introducing the REST Architectural Style, covers the REST software architectural style and the core architectural elements that form a RESTful system.
- Chapter 2, Java APIs for JSON Processing, gives an overview of the JSON messaging format and the popular tools and frameworks around JSON.
- Chapter 3, Introducing the JAX-RS API, introduces the JAX-RS APIs. This chapter will explain how we can build RESTful web services with the JAX-RS APIs.
- Chapter 4, Advanced Features in the JAX-RS APIs, takes a deeper look into the advanced JAX-RS APIs, with many real-life use cases.
- Chapter 5, Introducing JAX-RS Implementation Framework Extensions, discusses some of the very useful JAX-RS implementation framework extension APIs that are not yet a part of the JAX-RS standard.
- Chapter 6, Securing RESTful Web Services, explores how to secure RESTful web services using different authentication and authorization techniques.
- Chapter 7, Description and Discovery of RESTful Web Services, describes the popular solutions that are available today for describing, producing, consuming, and visualizing RESTful web services.
- Chapter 8, RESTful API Design Guidelines, discusses best practices and design guidelines that developers will find useful while building RESTful web services.
- Chapter 9, The Role of RESTful APIs in Emerging Technologies, discusses the applicability of the RESTful API in recent technology trends such as cloud, IoT, single-page applications, and open data protocol.
- Appendix, Useful Features and Techniques, discusses on the tools needed for building and testing JAX-RS application with various packaging or deployment models. Also covers the technique to convert JPA models into OData-enabled RESTful web services.