RESTful Java Web Services

Contents

  1. Introduction
  2. How This Book Is Organized
  3. What You Need for This Book

Introduction

  • The World Wide Web (also known as WWW) has been the backbone of the information age, connecting distributed systems over networks. It has become an integral part of our day-to-day life; take, for example, reading a newspaper, checking the weather, searching for information via Google, or any other search engine. It is essential to note that all the information used by the systems is dispersed across the networks and transmitted via the WWW. Given the reach of the WWW, have you ever thought what are the architecture or design principles to be considered while developing an application for internet usage? How can you improve the scalability of a web application? With the advent of emerging technologies such as cloud, social media, and the Internet of Things, what considerations must be taken while developing a web application? I believe similar questions may have been in the mind of Roy Thomas Fielding. Roy Thomas Fielding's research on Architectural Styles and the Design of Network-Based Software Architectures comes up with answers to these questions, with a novel architectural style for distributed hypermedia systems, popularly known as REpresentational State Transfer, abbreviated to REST.
  • This book familiarizes the reader with the concepts of REST. It serves as a practical guide for developing web applications following the REST architectural style, using Java APIs. This book is organized with plenty of real-life examples each chapter to help the reader gain hands-on experience and boost their confidence in applying what they have learned.

How This Book Is Organized

  • 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.

What You Need for This Book

  • The examples discussed in this book were built using the following software and tools:
    • The Java SE Development Kit 8, or newer versions
    • NetBeans IDE 8.2 (with the Java EE bundle), or newer versions
    • Glassfish Server 4.1, or newer versions
    • Maven 3.2.3, or newer versions
    • Oracle Database Express Edition 11g Release 2, or newer versions
    • The HR sample schema that comes with the Oracle database
    • The Oracle database JDBC driver (ojdbc7.jar or newer versions)
  • Detailed instructions for setting up all the tools required to run the examples used in this book are discussed in the Appendix.
  • This book includes sample code which is available at here.