World Library  
Flag as Inappropriate
Email this Article

Play framework

Article Id: WHEBN0027599204
Reproduction Date:

Title: Play framework  
Author: World Heritage Encyclopedia
Language: English
Subject: Comparison of web application frameworks, Scala (programming language), AppJet, Knockout (web framework), Apache Shale
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Play framework

Play Framework
Initial release 2007 (2007)
Stable release 2.3.6 / October 28, 2014 (2014-10-28)[1]
Development status Active
Written in Scala
Available in English
Type Web application framework
License Apache 2 License
Website .com.playframeworkwww

Play is an open source web application framework, written in Scala and Java, 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.

History

Play was created by software developer Guillaume Bort, while working at 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 is not implemented yet[10]), a switch to the H2 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, modularisation, 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 zipfiles.

Motivation

Play is heavily inspired by Ruby on Rails and Django and is similar to this family of frameworks. Play uses Java to build web applications 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 JBoss Netty web server, they can also be packaged as WAR files to be distributed to standard Java EE application servers.[16]

Major differences

From other Java frameworks:

  • 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.
  • Static methods: all controller entry points are declared as static (or equivalently, in Scala, functions on Scala objects). After requests were made for this to be customisable, Play 2.1 now supports other styles of controllers, so controllers need not be static/Scala objects; however, this is still the default.
  • Asynchronous I/O: due to using JBoss Netty 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.[17]
  • Modular architecture: like 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.

Components

Play 2.0 makes use of several popular Java libraries:

  • JBoss Netty for the web server
  • No required ORM, but Anorm (Scala) and Ebean (Java) are included for database access
  • Scala for the template engine
  • Built in hot-reloading
  • sbt for dependency management

The following functionality is present in the core:

  • a clean, RESTful framework
  • CRUD: a module to simplify editing of model objects
  • Secure: a module to enable simple user authentication
  • a validation framework based on annotations
  • a job scheduler
  • a simple to use SMTP mailer
  • JSON and XML parsers and marshallers
  • a persistence layer based on JPA
  • an embedded database for quick deployment/testing purposes
  • a full embedded testing framework
  • an automatic file uploads functionality
  • multi-environment configuration awareness
  • a modular architecture, which enables bringing new features in the core easily
  • OpenID and web services clients

Testing framework

Play provides a built-in test framework for unit testing and functional testing. Tests are run directly in the browser by going to the URL /@tests. By default all testing is done against the included H2 in-memory database.

Usage

The mailing list for the project has over 11,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]

Some notable public websites using Play:[20]

  • LinkedIn, the world's largest professional network
  • Coursera, a website for online learning
  • http://gendi.fr/ GENDI, a GS1 member.
  • http://www.cashcare.in/
  • Mashape
  • http://jobs.siliconsentier.org/ Jobs board of Silicon Sentier.
  • http://www.seine-et-marne.fr/ General council website of Seine-et-Marne, France.
  • http://typesafe.com/ corporate website for Scala company founded by Martin Odersky.[21]
  • http://live.gilt.com Live shopping updates featuring Play's Realtime Web features, more details on their use of Play on Gilt's technology blog.
  • http://process.st A SaaS BPM product for the SME market
  • Sync Video, Service for watching online videos in sync
  • Prenser, news media network
  • PeachDish, Food Ecommerce Company
  • Webservice First, a customer support und ticketing system (based on play 1.2.7)

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

In August 2011, Heroku announced native support for Play applications on its cloud computing platform.[24] 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.[25]

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

References

  1. ^ Play Team (2014-10-28). "Play 2.3.6 released". 
  2. ^ Playing with Play Framework for Java
  3. ^ Nicolas Leroux at Devoxx
  4. ^ guillaume bort ★ software designer
  5. ^ play-framework | Google Group
  6. ^ Play!
  7. ^ ~play-developers/play/1.0 : revision 1
  8. ^ Play framework - downloads
  9. ^ Play 1.1 -- Release notes
  10. ^ Community Contributed Extensions
  11. ^ Play 1.2 -- Release notes
  12. ^ Play 2.0 -- Philosophy
  13. ^ http://blog.typesafe.com/introducing-typesafe-stack-20
  14. ^ http://www.playframework.com/documentation/2.1.0/Highlights
  15. ^ Play! Framework Usability
  16. ^ Play Framework on JBoss AS 7
  17. ^ Play framework and async I/O
  18. ^ Play's Google Group
  19. ^ "GitHub: Search stars>1". Retrieved 5 October 2013. 
  20. ^ Testimonials
  21. ^ Typesafe
  22. ^ Introducing the Play! Framework
  23. ^ Play Framework Cookbook
  24. ^ Play! on Heroku
  25. ^ Java development 2.0: Play-ing with Amazon RDS
  26. ^ Play 2 Framework on Jelastic

External links

  • Play Framework home page
  • Source code
  • Discussion group
  • Bug tracker
  • Stack Overflow
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.