Chapter 3. Turning a Web Service into a Web Application

In this chapter, you will learn how to enhance your web service to make it a web application by serving HTML pages that contain client-side logic. You will learn how to use the HTML template engine and how to write browser tests.

More precisely, you will learn how to perform the following:

  • Use the template engine to build HTML and JavaScript documents
  • Generate URLs according to your route's definitions
  • Handle content negotiation
  • Read and validate data in the HTML forms
  • Generate HTML forms using Play forms helpers
  • Write web browser tests

Delta between a web service and a web application

As shown in the following diagram, a web service essentially maps each of its features or resources as HTTP endpoints ...

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.