Play Framework

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Play Framework
Developer(s)Lightbend, Zengularity and the community
Initial release2007 (2007)
Stable release
2.7.3 / June 19, 2019; 5 months ago (2019-06-19)[1]
Preview release
2.8.0-M4 / August 15, 2019; 3 months ago (2019-08-15)[2]
RepositoryPlay Repository
Written inScala
Available inEnglish
TypeWeb application framework
LicenseApache License 2.0

Play Framework is an open-source web application framework which follows the model–view–controller (MVC) architectural pattern. It is written in Scala and usable from other programming languages that are compiled to JVM Bytecode, e.g. Java. It aims to optimize developer productivity by using convention over configuration, hot code reloading and display of errors in the browser.[3]

Support for the Scala programming language has been available since version 1.1 of the framework.[4] In version 2.0, the framework core was rewritten in Scala. Build and deployment was migrated to SBT, and templates use Scala[5] instead of Apache Groovy.


Play was created by software developer Guillaume Bort, while working at Zengularity SA (formerly Zenexity).[6] Although the early releases are no longer available online, there is evidence of Play existing as far back as May 2007.[7] In 2007, pre-release versions of the project were available to download from Zenexity's website.[8]

Version history
Version Date Notes
Old version, no longer supported: 1.0 May 2008 The first published code for 1.0 appeared on Launchpad.[9] This was followed by a full 1.0 release in October 2009.[10]
Old version, no longer supported: 1.1 November 2010 Released after a move from Launchpad to GitHub. It included a migration from Apache MINA to JBoss Netty, Scala support, native GlassFish container, an asynchronous web services library, OAuth support, HTTPS support and other features.[11]
Old version, no longer supported: 1.2 April 2011 It included dependency management with Apache Ivy, support for WebSocket, integrated database migration (reversion was not implemented[12]), a switch to the H2 database as the default development database and other features.[13]
Old version, no longer supported: 1.3 January 15, 2015 libraries upgraded (a.o. netty, hibernate, etc.), added multiple databases support and included customisable template name resolving.
Old version, no longer supported: 1.4 October 30, 2015 Compatible to Java 7 and removed support for Java 6. Added ability to define enabled ssl protocols.
Old version, no longer supported: 1.5 September 29, 2017 Upgraded to Hibernate 5.x. Dropped support for java version prior to 1.8 documentation
Old version, no longer supported: 2.0 March 13, 2012 Sadek Drobi joined Guillaume Bort late 2011 to create Play 2.0[14] in conjunction with Typesafe Stack 2.0.[15]
Older version, yet still supported: 2.2 September 20, 2013 Upgraded support for SBT to 0.13, better support for buffering, built in support for gzip and new stage and dist tasks with support for native packaging on several platforms such as OS X (DMG), Linux (RPM, DEB), and Windows (MSI) as well as zip files.
Older version, yet still supported: 2.3 May 30, 2014 Introducing the Activator command, better tooling for static assets, support for Java 8 and Scala 2.11, better performance, Web Service enhancement and support to integrate Actors and Web Sockets.
Older version, yet still supported: 2.4 May 26, 2015 With Dependency injection out of the box, the possibility to embed Play inside other applications, improved Java 8 support, HikariCP as the default connection pool and better testing APIs.
Older version, yet still supported: 2.5 March 29, 2016 Switched from Iteratees to Akka Streams for all asynchronous IO and streaming, replaced custom functional types with Java 8 types (such as CompletionStage and Optional), introduced equivalent Java APIs for features that previously only existing in the Scala API, such as implementing filters and custom body parsers and with a 20% performance increase.
Older version, yet still supported: 2.6 June 23, 2017 Using Akka HTTP as the default server backend, experimental HTTP/2 support, Scala 2.12 support, no more global state under the hood, JSON Web Token format for cookies, improved security and configuration improvements.
Current stable version: 2.7 February 1, 2019 Scala 2.13 support, support for Caffeine as underlying cache implementation, updated HikariCP and Guice versions, improved form validation and file uploading functions.[17]
Old version
Older version, still supported
Latest version
Latest preview version
Future release


Play is heavily inspired by ASP.NET MVC, Ruby on Rails and Django and is similar to this family of frameworks. Play web applications can be written in Scala or Java, in an environment that may be less Java Enterprise Edition-centric. Play uses no Java EE constraints. This can make Play simpler to develop compared to other Java-centric platforms.[18]

Although Play 1.x could also be packaged as WAR files to be distributed to standard Java EE application servers,[19] Play 2.x applications are now designed to be run using the built-in Akka HTTP or Netty web servers exclusively.

Major differences from Java frameworks[edit]

  • Stateless: Play 2 is fully RESTful – there is no Java EE session per connection.
  • Integrated unit testing: JUnit and Selenium support is included in the core.
  • API comes with most required elements built-in.
  • Asynchronous I/O: due to using Akka HTTP as its web server, Play can service long requests asynchronously rather than tying up HTTP threads doing business logic like Java EE frameworks that don't use the asynchronous support offered by Servlet 3.0.[20]
  • Modular architecture: like Ruby on Rails and Django, Play comes with the concept of modules.
  • Native Scala support: Play 2 uses Scala internally but also exposes both a Scala API, and a Java API that is deliberately slightly different to fit in with Java conventions, and Play is completely interoperable with Java.

Testing framework[edit]

Play provides integration with test frameworks for unit testing and functional testing for both Scala and Java applications. For Scala, integrations with Scalatest and Specs2 are provided out-of-the-box and, for Java, there is integration with JUnit 4. For both languages, there is also integration with Selenium (software). SBT is used to run the tests and also to generate reports. It is also possible to use code coverage tools by using sbt plugins such as scoverage or jacoco4sbt.


As of October 2013, the Play Framework is the most popular Scala project on GitHub.[21] In July 2015, Play was the 3rd most popular Scala library in Github, based on 64,562 Libraries. 21.3% of the top Scala projects used Play as their framework of choice.[22]

In December 2010, the first e-book for the Play framework was released.[23] This was subsequently also published in hard copy. In August 2011, a second book was released, covering more complex and modern features.[24]

In August 2011, Heroku announced native support for Play applications on its cloud computing platform.[25] This follows module-based support for Play 1.0 (but not Play 2.x) on Google App Engine, and documented support on Amazon Web Services.[26]

In July 2013, Jelastic published a tutorial showing support for Play 2 on its cloud computing platform.[27]

See also[edit]


  • Peter Hilton; Erik Bakker & Francisco Canedo (2013). Play for Scala. Manning. ISBN 9781617290794.
  • Andy Petrella (2013). Learning Play! Framework 2. Packt Publishing. ISBN 978-1-78216-012-0.
  • Nicolas Leroux; Sietse de Kaper (2014). Play for Java. Manning. ISBN 1617290904.
  • Julien Richard-Foy (2014). Play Framework Essentials. Packt Publishing. ISBN 1783982403.
  • Shiti Saxena (2015). Mastering Play Framework for Scala. Packt Publishing. ISBN 1783983809.
  • Alexander Reelsen; Giancarlo Inductivo (2015). Play Framework Cookbook (2nd ed.). Packt Publishing. ISBN 1783982403.


  1. ^ Play Team. "Play changelog". Retrieved 2019-08-29.
  2. ^ Play Team. "Play releases". Retrieved 2019-08-29.
  3. ^ "Playing with Play Framework for Java - @codemonkeyism". 22 March 2010. Retrieved 31 July 2018.
  4. ^ "Play framework in practice - Devoxx09 - Devoxx". 13 October 2009. Retrieved 31 July 2018.
  5. ^ "playframework/twirl". GitHub. Retrieved 31 July 2018.
  6. ^ Bort, Guillaume. "guillaume bort – software designer". Retrieved 31 July 2018.
  7. ^ "Google Groups". Retrieved 31 July 2018.
  8. ^ "Play!". 29 October 2007. Retrieved 31 July 2018.
  9. ^ "~play-developers/play/1.0 : revision 1". Retrieved 31 July 2018.
  10. ^ "Downloads". Retrieved 31 July 2018.
  11. ^ "releasenotes-1.1 - 1.1". Retrieved 31 July 2018.
  12. ^ "Modules". Retrieved 31 July 2018.
  13. ^ "releasenotes-1.2 - 1.2". Retrieved 31 July 2018.
  14. ^ "Philosophy - 2.0". Retrieved 31 July 2018.
  15. ^ "Introducing Typesafe Stack 2.0 - @lightbend". Retrieved 31 July 2018.
  16. ^ "Highlights - 2.1.0". Retrieved 31 July 2018.
  17. ^ "Highlights - 2.7.x". Retrieved 3 March 2019.
  18. ^ Play! Framework Usability Archived 2011-07-13 at the Wayback Machine
  19. ^ "Thomas Heute's Blog: Play Framework on JBoss AS 7 -JBoss Developer". Retrieved 31 July 2018.
  20. ^ "Play framework and async I/O". Retrieved 31 July 2018.
  21. ^ "GitHub: Search stars>1". Retrieved 5 October 2013.
  22. ^ "The Top 100 Scala Libraries in 2015 – Based on 64,562 GitHub Libraries>1". Retrieved 19 July 2015.
  23. ^ "Introducing the Play Framework". Retrieved 31 July 2018.
  24. ^ "Play Framework Cookbook - PACKT Books". Retrieved 31 July 2018.
  25. ^ "Play! on Heroku". Retrieved 31 July 2018.
  26. ^ "Play-ing with Amazon RDS". 19 July 2011. Retrieved 31 July 2018.
  27. ^ "Play 2 Web Application Deployment Tutorial". 2 July 2013. Retrieved 31 July 2018.

External links[edit]