Book Image

Play Framework Cookbook - Second Edition

By : Alexander Reelsen, Giancarlo Inductivo
Book Image

Play Framework Cookbook - Second Edition

By: Alexander Reelsen, Giancarlo Inductivo

Overview of this book

<p>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.</p> <p>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.</p>
Table of Contents (15 chapters)
Play Framework Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 1. Basics of Play Framework

In this chapter, we will cover the following recipes:

  • 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 actions

  • Using a form validation

  • Securing form submission

  • Testing with JUnit (Java) and specs2 (Scala)

  • Testing models

  • Testing controllers