Play Framework Essentials

An intuitive guide to creating easy-to-build scalable web applications using the Play framework

Play Framework Essentials

This ebook is included in a Mapt subscription
Julien Richard-Foy

An intuitive guide to creating easy-to-build scalable web applications using the Play framework
$10.00
$29.99
RRP $17.99
RRP $29.99
eBook
Print + eBook
Access every Packt eBook & Video for just $100
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Find Out More
 
Preview in Mapt

Book Details

ISBN 139781783982400
Paperback200 pages

Book Description

Play is a framework to write web applications using Scala or Java. It provides a productive development environment, allowing you to just hit the "refresh" button in your browser to compile your changes and reload the application. Because of its stateless nature, the framework makes it easy to build applications that scale. Play provides a reactive programming model to harness the event-driven HTTP layer.

This book provides a step-by-step walkthrough of how to build a complete web application following best application development practices using Play framework 2. All aspects specific to web-oriented architectures are covered: the HTTP layer, JSON manipulation, HTML templating, asset compression and concatenation, form submission, content negotiation, security, and HTTP streaming. The book will also provide detailed architectural insights into Play framework to give you a better understanding in order to successfully build scalable applications.

Table of Contents

Chapter 1: Building a Web Service
Play – a framework used to write web applications
Bootstrapping a Play application
URL routing
Building HTTP responses
Reading JSON requests
Summary
Chapter 2: Persisting Data and Testing
Testing your web service
Persisting data
Using an in-memory database for tests
Summary
Chapter 3: Turning a Web Service into a Web Application
Delta between a web service and a web application
Using the template engine to build web pages
Generating HTML forms
Reading and validating HTML form data
Handling content negotiation
Putting things together
Writing web user interface tests
Summary
Chapter 4: Integrating with Client-side Technologies
Philosophy of Play regarding client-side technologies
Serving static assets
Using the JavaScript reverse router
Managing assets from the build system
Summary
Chapter 5: Reactively Handling Long-running Requests
Play application's execution model
Scaling up your server
Embracing non-blocking APIs
Managing execution contexts
Writing incremental computations using iteratees
Streaming results using enumerators
Manipulating data streams by combining iteratees, enumerators, and enumeratees
Controlling the data flow
Summary
Chapter 6: Leveraging the Play Stack – Security, Internationalization, Cache, and the HTTP Client
Handling security concerns
Saving computation time using cache
Serving content in several languages
Calling remote web services
Summary
Chapter 7: Scaling Your Codebase and Deploying Your Application
Making an action's logic reusable and composable with action builders
Modularizing your code
Application deployment
Summary

What You Will Learn

  • Set up a unified development environment for both the client-side and server-side code
  • Understand the challenges of building a scalable web application and master the solutions provided by Play framework
  • Integrate the framework with existing client-side or server-side technologies such as persistence systems
  • Harness the reactive programming model to process data streams
  • Design robust, maintainable, and testable code
  • Be proficient in manipulating JSON data blobs
  • Deploy your application on a PaaS platform

Authors

Table of Contents

Chapter 1: Building a Web Service
Play – a framework used to write web applications
Bootstrapping a Play application
URL routing
Building HTTP responses
Reading JSON requests
Summary
Chapter 2: Persisting Data and Testing
Testing your web service
Persisting data
Using an in-memory database for tests
Summary
Chapter 3: Turning a Web Service into a Web Application
Delta between a web service and a web application
Using the template engine to build web pages
Generating HTML forms
Reading and validating HTML form data
Handling content negotiation
Putting things together
Writing web user interface tests
Summary
Chapter 4: Integrating with Client-side Technologies
Philosophy of Play regarding client-side technologies
Serving static assets
Using the JavaScript reverse router
Managing assets from the build system
Summary
Chapter 5: Reactively Handling Long-running Requests
Play application's execution model
Scaling up your server
Embracing non-blocking APIs
Managing execution contexts
Writing incremental computations using iteratees
Streaming results using enumerators
Manipulating data streams by combining iteratees, enumerators, and enumeratees
Controlling the data flow
Summary
Chapter 6: Leveraging the Play Stack – Security, Internationalization, Cache, and the HTTP Client
Handling security concerns
Saving computation time using cache
Serving content in several languages
Calling remote web services
Summary
Chapter 7: Scaling Your Codebase and Deploying Your Application
Making an action's logic reusable and composable with action builders
Modularizing your code
Application deployment
Summary

Book Details

ISBN 139781783982400
Paperback200 pages
Read More

Read More Reviews