Preface

The Play Framework is an open source web application framework that is written in Java and Scala. It follows the Model-View-Controller architectural pattern.

It enables the user to use Scala for application development, keeping key properties and features of the Play Framework intact. This results in faster and scalable web apps. Also, it uses a more functional and "Scala idiomatic" style of programming, without sacrificing simplicity and developer friendliness.

This book will provide advanced information on developing Scala web applications using the Play Framework. This will help Scala web developers master Play 2.0 and use it for pro-Scala web app development.

What this book covers

Chapter 1, Getting Started with Play, explains how to build simple applications using the Play Framework. We also explore the project structure so that you can understand how the framework plugs in the required settings through a build file.

Chapter 2, Defining Actions, explains how we can define an application-specific action with default parsers and results, and also with custom parsers and results.

Chapter 3, Building Routes, is where we see how essential routing is in a Play application. Apart from this, we also check out various default methods that Play provides for simplifying the process of routing.

Chapter 4, Exploring Views, explains how to create views using Twirl and the various other helper methods provided by Play. In this chapter, you also learn how you can support multiple languages in your Play application using the built-in i18n API.

Chapter 5, Working with Data, demonstrates different ways of causing application data to persist in an application that we build using the Play Framework. In addition to this, you also get to understand how the Play Cache API can be used and how it works.

Chapter 6, Reactive Data Streams, discusses the concepts of Iteratee, Enumerator, and Enumeratee and how they can be implemented in the Play Framework and used internally.

Chapter 7, Playing with Globals, gives an insight into the features provided for a Play application through the global plugin. We also discuss hooks for the request-response life cycle, using which we can intercept requests and responses and modify them if required.

Chapter 8, WebSockets and Actors, briefly covers the Actor Model and the usage of Akka Actors in an application. We also define a WebSocket connection in a Play application with various constraints and requirements, using different approaches.

Chapter 9, Testing, shows you how a Play application can be tested using Specs2 and ScalaTest. We go through the different helper methods available for simplifying testing of a Play application.

Chapter 10, Debugging and Logging, is where we configure the debugging of a Play application in the IDE. In this chapter, you get to learn how to start a Play application in the Scala console. This chapter also places emphasis on the logging API provided by the Play Framework and the methods of customizing the log format.

Chapter 11, Web Services and Authentication, explains the WS (WebService) plugin and the API exposed through it. We also access users' data from the service providers using OpenID and OAuth 1.0a.

Chapter 12, Play in Production, explains how to deploy a Play application on production. While deploying the application, we also check the different packaging options (RPM, Debian, ZIP, Windows, and so on) available by default.

Chapter 13, Writing Play Plugins, gives an explanation of all plugins, with their declaration, definition, and best practices.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.134.133