Play Framework Cookbook - Second Edition

Over 60 hands-on recipes to create dynamic and reactive web-based applications with Play 2
Preview in Mapt

Play Framework Cookbook - Second Edition

Alexander Reelsen, Giancarlo Inductivo

1 customer reviews
Over 60 hands-on recipes to create dynamic and reactive web-based applications with Play 2

Quick links: > What will you learn?> Table of content> Product reviews

eBook
$5.00
RRP $35.99
Save 86%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$5.00
$44.99
RRP $35.99
RRP $44.99
eBook
Print + eBook

Frequently bought together


Play Framework Cookbook - Second Edition Book Cover
Play Framework Cookbook - Second Edition
$ 35.99
$ 5.00
Building Applications with Scala Book Cover
Building Applications with Scala
$ 39.99
$ 5.00
Buy 2 for $10.00
Save $65.98
Add to Cart

Book Details

ISBN 139781784393137
Paperback354 pages

Book Description

As web and mobile systems become more sophisticated, anchoring systems in a mature, solid framework has become increasingly important. Play 2 provides developers with the necessary tools to build robust web applications.

This book is a compilation of useful recipes aimed at helping developers discover the power of Play 2. The introductory section serves as a primer to Play Framework, wherein all the fundamentals of the framework are covered extensively. It then explains the usage of controllers and how modules can be leveraged for optimal performance. Next, the book walks you through creating and using APIs, followed by extensive real-world applications. Finally, you will learn to manage applications post production.

Table of Contents

Chapter 1: Basics of Play Framework
Introduction
Installing Play Framework
Creating a Play application using Typesafe Activator
Using the Play console
Working with modules
Working with controllers and routes
Using Action parameters in controllers
Using reverse routing and redirects
Working with View templates
Using helper tags
Using View layouts and Includes
Working with XML and text files
Using Ebean (Java) with MySQL
Using Anorm (Scala) and database evolutions with MySQL
Using a form template and web action
Using form validation
Securing form submission
Testing with JUnit (Java) and specs2 (Scala)
Testing models
Testing controllers
Chapter 2: Using Controllers
Introduction
Using HTTP headers
Using HTTP cookies
Using the session
Using custom actions
Using filters
Using path binders
Serving JSON
Receiving JSON
Uploading files
Using futures with Akka actors
Chapter 3: Leveraging Modules
Introduction
Dependency injection with Spring
Dependency injection using Guice
Utilizing MongoDB
Utilizing MongoDB and GridFS
Utilizing Redis
Integrating Play application with Amazon S3
Integrating with Play application Typesafe Slick
Utilizing play-mailer
Integrating Bootstrap and WebJars
Chapter 4: Creating and Using Web APIs
Introduction
Creating a POST API endpoint
Creating a GET API endpoint
Creating a PUT API endpoint
Creating a DELETE API endpoint
Securing API endpoints with HTTP basic authentication
Consuming external web APIs
Using the Twitter API and OAuth
Chapter 5: Creating Plugins and Modules
Introduction
Creating and using your own plugin
Building a flexible registration module
Using the same model for different applications
Managing module dependencies
Adding private module repositories using Amazon S3
Chapter 6: Practical Module Examples
Introduction
Integrating a Play application with message queues
Integrating a Play application with ElasticSearch
Implementing token authentication using JWT
Chapter 7: Deploying Play 2 Web Apps
Introduction
Deploying a Play application on Heroku
Deploying a Play application on AWS Elastic Beanstalk
Deploying a Play application on CoreOS and Docker
Deploying a Play application with Dokku
Deploying a Play application with Nginx
Chapter 8: Additional Play Information
Introduction
Testing with Travis CI
Monitoring with New Relic
Integrating a Play application with AngularJS
Integrating a Play application with Parse.com
Creating a Play development environment using Vagrant
Coding Play 2 web apps with IntelliJ IDEA 14

What You Will Learn

  • Implement the Model-View-Controller (MVC) web architecture with Play 2
  • Convert data between incompatible type systems using ORM tools such as Ebean and Anorm
  • Serve and receive JSON messages to transmit data objects
  • Create long-running, asynchronous controllers using Akka
  • Learn to use modules for Amazon S3, Redis, and MongoDB
  • Consume public APIs using the Play WS API
  • Make your application production-ready by integrating it with AngularJS
  • Automate the creation of a portable development environment using Vagrant
  • Deploy Play 2 applications with Docker

Authors

Table of Contents

Chapter 1: Basics of Play Framework
Introduction
Installing Play Framework
Creating a Play application using Typesafe Activator
Using the Play console
Working with modules
Working with controllers and routes
Using Action parameters in controllers
Using reverse routing and redirects
Working with View templates
Using helper tags
Using View layouts and Includes
Working with XML and text files
Using Ebean (Java) with MySQL
Using Anorm (Scala) and database evolutions with MySQL
Using a form template and web action
Using form validation
Securing form submission
Testing with JUnit (Java) and specs2 (Scala)
Testing models
Testing controllers
Chapter 2: Using Controllers
Introduction
Using HTTP headers
Using HTTP cookies
Using the session
Using custom actions
Using filters
Using path binders
Serving JSON
Receiving JSON
Uploading files
Using futures with Akka actors
Chapter 3: Leveraging Modules
Introduction
Dependency injection with Spring
Dependency injection using Guice
Utilizing MongoDB
Utilizing MongoDB and GridFS
Utilizing Redis
Integrating Play application with Amazon S3
Integrating with Play application Typesafe Slick
Utilizing play-mailer
Integrating Bootstrap and WebJars
Chapter 4: Creating and Using Web APIs
Introduction
Creating a POST API endpoint
Creating a GET API endpoint
Creating a PUT API endpoint
Creating a DELETE API endpoint
Securing API endpoints with HTTP basic authentication
Consuming external web APIs
Using the Twitter API and OAuth
Chapter 5: Creating Plugins and Modules
Introduction
Creating and using your own plugin
Building a flexible registration module
Using the same model for different applications
Managing module dependencies
Adding private module repositories using Amazon S3
Chapter 6: Practical Module Examples
Introduction
Integrating a Play application with message queues
Integrating a Play application with ElasticSearch
Implementing token authentication using JWT
Chapter 7: Deploying Play 2 Web Apps
Introduction
Deploying a Play application on Heroku
Deploying a Play application on AWS Elastic Beanstalk
Deploying a Play application on CoreOS and Docker
Deploying a Play application with Dokku
Deploying a Play application with Nginx
Chapter 8: Additional Play Information
Introduction
Testing with Travis CI
Monitoring with New Relic
Integrating a Play application with AngularJS
Integrating a Play application with Parse.com
Creating a Play development environment using Vagrant
Coding Play 2 web apps with IntelliJ IDEA 14

Book Details

ISBN 139781784393137
Paperback354 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Building Applications with Scala Book Cover
Building Applications with Scala
$ 39.99
$ 5.00
Mastering Akka Book Cover
Mastering Akka
$ 39.99
$ 5.00
Scala Design Patterns Book Cover
Scala Design Patterns
$ 43.99
$ 5.00
Akka Cookbook Book Cover
Akka Cookbook
$ 39.99
$ 5.00
Mastering Concurrency Programming with Java 8 Book Cover
Mastering Concurrency Programming with Java 8
$ 43.99
$ 5.00
Scala Test-Driven Development Book Cover
Scala Test-Driven Development
$ 31.99
$ 5.00