Free Sample
+ Collection

Learning Play! Framework 2

Andy Petrella

The Play Framework makes it easy to build web applications with Java & Scala, and this user-friendly tutorial makes it simpler still. Focusing on HTTP, everything is integrated so you need virtually no prior coding ability.
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782160120
Paperback290 pages

About This Book

  • While driving in Java, tasks are also presented in Scala – a great way to be introduced to this amazing language
  • Create a fully-fledged, collaborative web application – starting from ground zero; all layers are presented in a pragmatic way
  • Gain the advantages associated with developing a fully integrated web framework

Who This Book Is For

Readers must be interested in the Web in general; specifically using the HTTP between a browser and a server to create blazing projects!
Java skills are beneficial but not necessary since Learning Play! Framework 2 is not J2EE based but introduces a simple, neat, and completely integrated version; the prerequisites are almost none.

Table of Contents

Chapter 1: Getting Started with Play! Framework 2
Preparing your machine
Creating your first project
Keeping your habits
Simple Build Tool
It's alive and not empty!
Understanding the core pieces
Chapter 2: Scala – Taking the First Step
Introducing Scala
Generic types
Iterating over a sequence
Partial application
Chapter 3: Templating Easily with Scala
Shape it, compose it, re-use it
Playing around
Skinning with LESS pain
Chapter 4: Handling Data on the Server Side
Feeding some data
Ingesting data
Persisting them
Porting to Scala
Chapter 5: Dealing with Content
Body parsing for better reactivity
Creating a forum
Handling multipart content types
Rendering contents
Chapter 6: Moving to Real-time Web Applications
Ready, JSON, poll
Dynamic maintains form
Real time (advanced)
Chapter 7: Web Services – At Your Disposal
Accessing third parties
Interacting with Twitter
Long tasks won't block
Chapter 8: Smashing All Test Layers
Testing atomically
Writing applicative tests
Testing workflows
Chapter 9: Code Once, Deploy Everywhere
Continuous Integration (CloudBees)
Deployment (Heroku)
Monitoring (Typesafe Console)

What You Will Learn

  • What's great about the new framework and on which projects it works best
  • Set up a full installation including the framework itself but also the development environment
  • Build a simple site or even a webapp using the server-side and templating system
  • Store data in a relational database, using Ebean in Java and Anorm in Scala
  • Discover the reactive way of handling data (back and forth with a client)
  • Test all layers of your application using the integration of Play! 2 with the most famous testing frameworks – even on the client-side
  • Deploy your application on the cloud, choosing Heroku as an example, but also on Cloudbees which enables a continuous integration


In Detail

The Learning Play! Framework 2 has been created for web developers that are building web applications. The core idea is to focus on the HTTP features and to enable them through a simplification lens. Building a web application no longer requires a configuration phase, an environment setup, or a long development lifecycle - it's integrated!

Learning Play! Framework 2 will enable any web developers to create amazing web applications taking advantage of the coolest features. It's the fastest way to dive into Play!, focusing on the capabilities by using them in a sample application. Although essentially Java based code, a Scala version is presented as well – giving an opportunity to see some Scala in action.

After setting up the machine and learning some Scala, you will construct an application which builds from static to dynamic, before introducing a database.

Then we'll focus on how data can be consumed and rendered in several ways. This will enable some real time communication through WebSocket and Server-Sent Event – on both server and client sides.

The book will end with testing and deployment, which completes any web development project.


Read More

Recommended for You