Play’s documentation shows the available features and how to use them, but the documentation will not show how to create an application from start to finish. This is where tutorials come in.
Many Activator templates come with comprehensive tutorials that guide you to creating an application using the technologies featured by that template.
A full list of templates can be discovered in the Activator Web Interface.
Additionally, templates are also published on the Lightbend website, a full list of both official and community contributed templates for Play can be found here.
Typesafe maintains a number of Activator templates. These have built-in tutorials that you can see by running the application with
activator ui and then opening the web interface at http://127.0.0.1:8888/ and clicking on the Tutorial tab.
This is where you should start with Play to see a simple example CRUD application.
Reactive Stocks shows several stock prices displayed on a single page web application.
Reactive Maps shows the Typesafe Platform with a series of moving actors updated in real time.
- Play Java with Spring Data JPA: This is a Play example that uses Spring Data JPA.
- Play Scala with Slick: This template combines Play Framework with Slick.
- Play Scala with Isolated Slick: This template creates module that hides Slick behind a DAO object.
- Play Java with Ebean: This is a Play example that uses EBean.
- Play Scala with Anorm: This is a Play example that uses Anorm.
§Third Party Tutorials
The Play community also has a number of tutorials that cover aspects of Play than the documentation can, or has a different angle. This is an incomplete list of several helpful blog posts.
Because some of the blog posts have been written a while ago, this section is organized by Play version.
- Akka Streams integration in Play Framework 2.5 by Loïc Descotte.
- Playing with Akka Streams and Twitter by Loïc Descotte.
Semisafe has an excellent series on Play in general:
- Templates, Routes and AJAX
- Upgrading the Framework
- Database Access
- Async Futures and Actors
- Optimistic Future Composition
- React UI Coffeescript
- CSRF Protection
- A Play Application in 38 Lines by Lloyd Chan, showing a “Sinatra” style of Play application.
- Playframework 2.4 Dependency Injection (DI) by Marius Soutier.
- Testing with Dependency Injection by Michael Pollmeier.
- Compile Time Dependency Injection with Play 2.4 by Loïc Descotte.
Justin Rodenbostel of SPR Consulting also has two blog posts on building REST APIs in Play:
- Building a Simple REST API with Scala & Play (PART 1)
- Building a simple REST API with Scala & Play! (PART 2)
- Play framework, Slick and MySQL Tutorial by Pedro Rijo.
- How to add a form to a Play application by Chris Birchall of the Guardian.
- HTML 5 Device Orientation with play, ember and websockets by Cake Solutions (with activator template)
§AngularJS, RequireJS and sbt-web
- RequireJS Optimization with Play 2.1 and WebJars
- Intro to sbt-web
- Understanding sbt and sbt-web settings
- Play Angular Require Seed Updates
- ReactJS Tutorial with Play, Scala and WebJars by Fabio Tiriticco.
- A basic example to render UI using ReactJS with Play 2.4.x, Scala and Anorm by Knoldus /
- Playing with Play Framework 2.3.x: REST, pipelines, and Scala by Sampson Oliver.
Knoldus has a nice series of blog posts on Anorm:
- Employee-Self-Service – Building Reactive Play application with Anorm SQL data access – (Part-1)
- Employee-Self-Service – Building Reactive Play application with Anorm SQL data access – (Part-2)
- Employee-Self-Service: Reactive and Non-Blocking Database Access using Play Framework and Anorm – (Part-3)
- Employee-Self-Service: Reactive and Non-Blocking Database Access using Play Framework and Anorm – (Part-4)
- Example form including multiple checkboxes and selection by Philip Johnson.
- UX-friendly conditional form mapping in Play by the VOA
- Advanced routing in Play Framework by James Roper.
- Play Routes – Part 1, Basics by Marius Soutier.
- Play Routes – Part 2, Advanced Use Cases by Marius Soutier.
- How to implement a custom PathBindable with Play 2 by Julien Richard-Foy.
- Play Framework 2.0 Templates – Part 1, Parameters by Marius Soutier.
- Composite user interface without boilerplate using Play 2 by Julien Foy.
§Play in Practice
- Play in Practice by Will Sargent.
Next: Working with Play