The world is moving towards RESTful Web Services and now you can get up to speed quickly and painlessly. This tutorial covers all you need to create your own Web Service applications using the Dropwizard libraries.
The RESTful Web Services concept is constantly growing compared to SOAP technologies. Used by many API providers, RESTful has started to become the architecture of choice for the enterprise SOA as well. Dropwizard combines everything needed to create production ready RESTful Web Services, combining the most powerful, stable and well-known RESTful Java-based libraries.
This practical guide will help you learn how to create, configure, and implement a dynamic Web Service application by showcasing practical examples using the most important modules of Dropwizard and combining them together.
Starting from using Maven to create an empty default Java application to deploying a production-ready scalable Web Service application, this book demonstrates the capabilities of Dropwizard and the advantages of using it.
Discover how to use Jersey to create rest resources, and add them to Dropwizard's bootstrapped environment so they can be served by its embedded Jetty server. Learn how to combine and utilize the Database. Understand more about Configuration, Testing and Monitoring libraries to create a Web Service application in a step-by-step manner using solid examples. Also gain insight on how to secure your Web Services and validate incoming requests with minimum effort.
This book is an invaluable asset to anyone who wants to create a RESTful Web Service application with the combined libraries of Dropwizard.
What You Will Learn
- Build a sample Web Service application powered by Jersey
- Configure your application and externalize your configuration settings
- Use jDBI to interact with databases
- Validate Web Service requests
- Build Web Service clients
- Add runtime health checks to ensure your application's optimal performance
- Ensure your application's stability by creating unit tests using the Dropwizard testing modules
Table of Contents
RESTful Web Services with Dropwizard
- Table of Contents
- RESTful Web Services with Dropwizard
- About the Author
- About the Reviewers
- 1. Getting Started with Dropwizard
2. Creating a Dropwizard Application
- Generating a Maven-based project
- Configuring Dropwizard dependencies and building the configuration
- Hello World using Dropwizard
- 3. Configuring the Application
- 4. Creating and Adding REST Resources
5. Representations – RESTful Entities
- Creating a representation class
- Serving representations through the Resource class
- Mapping the request data to representations
- 6. Using a Database
- 7. Validating Web Service Requests
- 8. The Web Service Client
- 9. Authentication
- 10. The User Interface – Views
- A. Testing a Dropwizard Application
- B. Deploying a Dropwizard Application
- Title: RESTful Web Services with Dropwizard
- Release date: February 2014
- Publisher(s): Packt Publishing
- ISBN: 9781783289530