Are you trying to get started with the Play Framework? Struggling to wrap your head around Futures, SBT, Scala, Functional Programming, or Iteratees? Then you’ve come to the right place.
This post is a collection of the best resources I’ve found for getting started with Play. I’ve broken it down by category to make it easier to browse and jump to the topic you’re most interested in.
The list below is not meant to be comprehensive documentation, but rather, a collection of resources that cover the main areas where new Play users tend to get stuck. If you’ve got any great resources that are missing from the list below, leave a comment!
Introduction to Play
- Introduction to Play Framework for Java Developers: official video intro to building apps with Play.
- Play Framework Documentation: the official docs are a must read to get a solid starting point.
- The Play Framework at LinkedIn: Performance and Productivity at Scale: video intro to Play and why LinkedIn uses it. See the accompanying slides and blog post.
- Typesafe Activator: very easy way to get started with Play. A simple script you run to generate Play app skeletons from the many available templates—including Hello Play (Scala), Hello Play (Java), Realtime and Reactive Play apps, Play with Slick, Play with AngularJS—and an in-browser UI that interactively walks you through changing, running, and testing those apps.
Scala and Functional Programming
- Scala Documentation: lots of good resources for learning Scala.
- Scala API docs: expect to spend a lot of time reading these.
- Functional Programming Principles in Scala: terrific Coursera course on functional programming basics with Scala, taught by Scala creator Martin Odersky.
- Scala Programming Introduction: nice list of links to tutorials, books, and videos on Scala.
- http://scalatutorials.com: another in-browser introduction to Scala.
- Twitter Scala School: great series of language guides and best practices.
- 10 recipes for turning imperative Java code into functional Scala code: a mini guide for translating your Java code into equivalent idiomatic Scala code.
- Play Framework: Democratizing Functional Programming for modern Web Programmers: functional programming and the motivation behind Play 2.0.
- Macros for the Rest of Us: the best intro to Scala macros that I’ve found.
Non-blocking I/O, concurrency
- Play Framework: async I/O with Java and Scala: a guide to writing async code with Play, with examples in both Java and Scala.
- Play Framework: async I/O without the thread pool and callback hell: an overview of why Play uses non-blocking I/O and how to manage non-blocking code without callbacks.
- Play is for Performance: a great talk about Play performance; remember kids, async isn’t faster, but it can be more efficient with resources.
- Scala Futures: official docs on Scala Futures.
- Akka documentation: Play is built on top of Akka, which provides abstractions for managing concurrency, many of which Play uses under the hood and you can use in your own apps.
Real time web, streaming, Iteratees
- Composable and Streamable Play apps: video intro to how to break Play apps down into composable pieces and significantly reduce page load time by using BigPipe style streaming with Enumerators. See the accompanying slides and code.
- Functional I/O with Play Iteratees: video intro on how Iteratees work.
- Non-blocking, composable and reactive realtime web: a video with lots of examples of how to build realtime web apps on top of Play.
- Understanding Play2 Iteratees for Normal Humans: an intro to Iteratees that’s more human-friendly than the official Play Iteratee docs.
Build system, SBT, and deployment
- SBT in Action: the best intro to SBT I’ve seen. Must watch if you’re getting started (video).
- SBT documentation: the official documentation is dense, but important. The Getting Started Guide is required reading, or you will be very confused.
- SBT keys: the list of all settings and tasks built into SBT. Very useful for figuring out what you can tweak and what hooks are available.
- SBT Defaults: the default values for all the settings and tasks built into SBT.
- Play Keys: the list of all custom settings and tasks that Play adds on top of SBT’s defaults.
- Play Settings: the default values for the custom settings and tasks Play adds to SBT.
- Hooking in to Play! Framework’s sbt plugin lifecycle: nice guide on a few SBT hooks provided by Play.
- Separate multi-project deployment packages in Play! Framework: how to break a Play app into multiple SBT projects.
- Deploying Play apps at Coursera: how SBT deploys its Play apps to Amazon EC2 (video).
- Creating a standalone version of your application: official documentation on how to turn your Play app into a standalone package.
App structure, injection, plugins
- Structure your Play app with the Cake Pattern: a step by step introduction of using Scala’s Cake Pattern to inject dependencies in your Play apps without any extra libraries.
- Using Guice with Play! Framework 2.1 for easy Dependency Injection: an intro to using Guice to inject dependencies into your Play app.
- Play Framework Modules: a list of open source modules for Play.
- Writing modules for Play 2: a guide to creating new modules for Play.
- Writing a Play 2.0 Module: a guide to creating Play plugins.
- Slick documentation: the official docs for Slick, which is the recommended DB library for Scala.
- Managing database evolutions: official docs on how Play manages DB schemas.
- Using Scala Slick at FortyTwo: how FortyTwo uses Slick in their Play apps.
- Configuring Play’s thread pools: Play is built for non-blocking I/O, but all JDBC libraries are blocking, so this guide is a must-read on how to configure your Play app if you’re doing blocking DB queries.
Where to get more info
- Play Framework mailing list: very active google group plus mailing list that is great for discussions.
- StackOverflow: ask and answer all your Play related questions.
- Play Framework source code: use Play’s github repo to browse the source code, file bugs, and submit pull requests.
- Commercial support from Typesafe: the folks at Typesafe provide terrific Play expertise.