Play Framework

Play Framework
Developer(s) Lightbend, Zengularity and the community
Initial release 2007 (2007)
Stable release
2.6.2 / July 19, 2017 (2017-07-19)[1]
Repository github.com/playframework/playframework
Development status Active
Written in Scala (1.0 was written in Java)
Available in English
Type Web application framework
License Apache 2 License
Website www.playframework.com

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

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

Versions above 2.5 requires the Java 8 JVM.

History

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

In May 2008 the first published code for 1.0 appeared on Launchpad.[7] This was followed by a full 1.0 release in October 2009.[8]

Play 1.1 was released in November 2010 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.[9]

Play 1.2 was released in April 2011. It included dependency management with Apache Ivy, support for WebSocket, integrated database migration (reversion was not implemented[10]), a switch to the H2 database as the default development database and other features.[11]

Sadek Drobi joined Guillaume Bort late 2011 to create Play 2.0 which was released on March 13, 2012[12] in conjunction with Typesafe Stack 2.0.[13]

Play 2.1 was released on February 6, 2013, upgraded to Scala 2.10 and introduced, among other new features, modularization, a new JSON API, filters and RequireJS support.[14]

Play 2.2 was released on 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.

Play 2.3 was released on 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.

Play 2.4 was released on 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.

Play 2.5 was released March 29, 2016 and 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.

Motivation

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.[15]

Although Play applications are designed to be run using the built-in Netty or Akka-HTTP web server, they can also be packaged as WAR files to be distributed to standard Java EE application servers.[16]

Major differences from Java frameworks

Components

Play 2.5.x makes use of several popular Java libraries:

The following functionality is present in the core:

Testing framework

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.

Usage

The mailing list for the project has over 13,000 subscribers.[18] It is used in various projects such as local governments, company intranets, mobile web sites and Open Source projects.

As of October 2013, the Play Framework is the most popular Scala project on GitHub.[19] 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.[20]

Some notable public websites using Play:[21]

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

Literature

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.