Book an on-site course

Duration: 1 day

Don't go it alone! Book a private course for your team, taught on-site at your offices.

Book an online course

Duration: 3 weeks

Want a more in-depth approach? Book an online course for your team, taught via live video conferencing.

Overview

This course covers a comprehensive set of topics required to create web sites and web services in Play.

Use Play’s Twirl templating language to populate web pages with dynamic content. Build HTML5 content using your choice of Javascript, Coffeescript, Less, and/or CSS. Integrate client and server with AJAX and JSON. Write functional tests using Fluentlenium.

Write fast, non-blocking asynchronous code using futures and promises. Efficiently process and validate JSON data. Integrate with third party web services using Play’s WS client API. Build your APIs using clean, testable development practices.

Prerequisites

To benefit from this course you will need to know the fundamentals of the Scala language. We recommend Underscore’s Essential Scala as the perfect complement to this course.

Learning Outcomes

  • Understand Play routing, controllers, and actions
  • Confidently write HTML and text page templates using Twirl templates
  • Deploy significant Javascript, Coffeescript, Less CSS, and CSS codebases using the Play build system
  • Use JSON AJAX to communicate between browser and server
  • Know how to write functional web tests using Fluentlenium

Table of Contents

  • The Basics
    • Actions, Controllers, and Routes
    • Routes in Depth
    • Parsing Requests
    • Constructing Results
    • Handling Failure
  • HTML and Forms
    • Twirl Templates
    • Form Handling
    • Generating Form HTML
  • Working with JSON
    • Modelling JSON
    • Writing JSON
    • Reading JSON
    • JSON Formats
    • Custom Formats
    • Handling Failure
  • Async and Concurrency
    • Futures
    • Thread Pools and ExecutionContexts
    • Asynchronous Actions
    • Calling Remote Web Services
    • Handling Failure