Chapter 1. Building a Web Service

This chapter will cover the following topics:

  • Bootstrapping a Play project
  • Understanding the different pieces of a Play project
  • Mapping URLs to your service entry points
  • Serving JSON responses and reading and validating JSON requests

Play – a framework used to write web applications

Play is a framework used to write web applications. As shown in the following diagram, a web application is based on a client-server architecture and uses the HTTP protocol for communication:

Play – a framework used to write web applications

Web-oriented architecture

Users have the role of clients and make HTTP requests to servers to interact with the application. The servers process their ...

Get Play Framework Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.