Design scalable and robust RESTful web services with JAX-RS and Jersey extension APIs
About This Book
- Get to grips with the portable Java APIs used for JSON processing
- Design solutions to produce, consume, and visualize RESTful web services using WADL, RAML, and Swagger
- A step-by-step guide packed with many real-life use-cases to help you build efficient and secure RESTful web APIs in Java
Who This Book Is For
If you are a web developer with a basic understanding of the REST concepts but are new to the idea of designing and developing RESTful web services, this is the book for you. As all the code samples for the book are written in Java, proficiency in Java is a must.
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
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.
Style and approach
This book is written as a step-by-step guide to designing and developing robust RESTful web services. Each topic is explained in a simple and easy-to-understand manner with lots of real-life use-cases and their solutions.
Table of Contents
Chapter 1. Introducing the REST Architectural Style
Chapter 2. Java APIs for JSON Processing
Chapter 3. Introducing the JAX-RS API
Chapter 4. Advanced Features in the JAX-RS API
Chapter 5. Introducing the Jersey Framework Extensions
Chapter 6. Securing RESTful Web Services
Chapter 7. The Description and Discovery of RESTful Web Services
Chapter 8. RESTful API Design Guidelines