Jump to ratings and reviews
Rate this book

Play for Scala

Rate this book
Summary

Play for Scala shows you how to build Scala-based web applications using the Play 2 framework. This book starts by introducing Play through a comprehensive overview example. Then, you'll look at each facet of a typical Play application both by exploring simple code snippets and by adding to a larger running example. Along the way, you'll deepen your knowledge of Scala as a programming language and work with tools like Akka.

About this Book

Play is a Scala web framework with built-in advantages: Scala's strong type system helps deliver bug-free code, and the Akka framework helps achieve hassle-free concurrency and peak performance. Play builds on the web's stateless nature for excellent scalability, and because it is event-based and nonblocking, you'll find it to be great for near real-time applications.

Play for Scala teaches you to build Scala-based web applications using Play 2. It gets you going with a comprehensive overview example. It then explores each facet of a typical Play application by walking through sample code snippets and adding features to a running example. Along the way, you'll deepen your knowledge of Scala and learn to work with tools like Akka.

Written for readers familiar with Scala and web-based application architectures. No knowledge of Play is assumed.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

What's Inside


Intro to Play 2 Play's MVC structure Mastering Scala templates and forms Persisting data and using web services Using Play's advanced features

About the Authors

Peter Hiltonv, Erik Bakker, and Francisco Canedo, are engineers at Lunatech, a consultancy with Scala and Play expertise. They are contributors to the Play framework.

Table of Contents


PART 1: GETTING STARTED Introduction to Play Your first Play application

PART 2: CORE FUNCTIONALITY Deconstructing Play application architecture

Defining the application's HTTP interface

Storing data—the persistence layer

Building a user interface with view templates

Validating and processing input with the forms API

PART 3: ADVANCED CONCEPTS Building a single-page JavaScript application with JSON

Play and more Web services, iteratees, and WebSockets

330 pages, Paperback

First published January 1, 2013

13 people are currently reading
99 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (10%)
4 stars
52 (53%)
3 stars
28 (28%)
2 stars
7 (7%)
1 star
0 (0%)
Displaying 1 - 9 of 9 reviews
Profile Image for Thomas.
Author 1 book59 followers
January 3, 2023
Full disclosure: I was the technical proofreader for this book. Before you yell at me for anything I missed, please know that I was called on at the very last minute to help out. Nonetheless, I did the best I could in the time provided, hand-entering most of the examples directly to make sure they worked as expected. Also, while I will be getting compensated for my proofreading of this book, my earnings are not dependent on its success or failure.

Having said all that, I highly recommend this book if you're looking for an introduction to the Play Framework from a Scala perspective (there is also a Java-based book with a similar purpose being published by Manning later this year). There are certainly things it leaves out, such as testing (a big oversight, as Debasish has pointed out in a recent tweet), embedding in existing SBT projects, etc. But for a mostly comprehensive understanding of the core functionality, this book is very useful. It's also well-written, providing clear explanations where things might not be entirely obvious. It does assume some familiarity with Scala and having exposure to Akka, which Play uses for various purposes and provides as a utility for the user of the framework, would be helpful, but one does not need to be an expert in either to find this book useful.
Profile Image for Sebastian Gebski.
1,212 reviews1,394 followers
April 10, 2014
I'm not 100% sure about the correctness of the rating - there's a thin border between rating a book and rating a technology this book describes and unfortunately my experience with Play 2.0 is still very limited. Let's try anyway:

Pros:
1.) I've got the basic idea about how Play works, what to do to create a Play application on my own, etc.
2.) There are many code samples and they are are applicable to the theory described
3.) Book is not limited to the most basic scenarios - for instance, you can find a chapter about creating a JSON WebAPI for SPAs and a chapter about persistence as well

Cons:
1.) This book is NOT ENOUGH if you want a full-blown information for creating production-ready application: some crucial aspects (like bundling or CSRF) are not described at all: even if Play doesn't support them at all (doesn't it?) - it should be stated very clearly.
2.) Some code samples in Kindle version are totally unreadable - sometimes I had a feeling that every code sample is a separate screenshot in a fixed resolution.
3.) Practical real-life scenarios based on experience with applications that grow up beyond the tutorial app scale would be welcome. For instance - within whole book there was not a single idea about how to automatically test Play applications. Security was barely mentioned as well.

This book is fine if you want to learn some basics about what Play is and how does it work. But sadly, it's far from enough from being a complete resource for someone who wants to make a pro Play application in Scale. It's achievable, I know such books for ASP.NET MVC (which resembles Play a lot).
Profile Image for Ben.
7 reviews
January 5, 2014
A good high-level introduction, but a bit short. Not at all a comprehensive reference. Sadly, it focuses on Play 2.0, which is already out of date, and many of the code examples use now-deprecated APIs. At the rate Play is changing, it may not be possible to write a full treatment before it's out of date.
20 reviews1 follower
April 24, 2013
A good way to get into play as a full stack framework. Made me realize play is a little bit too heavy for a lot of what I want to use a web framework for - it's a full stack framework so you may want to consider scalatra if you don't want the whole shebang.
Profile Image for Joao Cerdeira.
6 reviews4 followers
November 16, 2013
Nice book to learn a little bit more about playframework.
However it should cover more advanced aspect in more detail like reactive programming.
Profile Image for Graeme Lockley.
40 reviews2 followers
November 26, 2013
Wonderful web framework - the same style as Rails and Grails but coupled with Scala's type system it feels like a maturity point better
101 reviews2 followers
June 26, 2014
This is a well-written book, examples laid out nicely and easy to understand. Unfortunately, Play seems like a kind of crappy framework.
Displaying 1 - 9 of 9 reviews

Can't find what you're looking for?

Get help and learn more about the design.