Documentation

You are viewing the documentation for Play 1. The documentation for Play 2 is here.

Documentation

Welcome to the Play framework 1.4.3 documentation. Check the version 1.4.3. release notes.

Getting started

Your first steps with Play and your first 5 minutes of fun.

  1. Play framework overview
  2. Watch the screencast
  3. Five cool things you can do with Play
  4. Usability - details matter as much as features
  5. Frequently Asked Questions
  6. Installation guide
  7. Setting-up your preferred IDE
  8. Your first application — the ‘Hello World’ tutorial
  9. Sample applications

Tutorial — Play guide, a real world app step-by-step

Learn Play by coding ‘Yet Another Blog Engine’, from start to finish. Each chapter will be a chance to learn one more cool Play feature.

  1. Starting up the project
  2. A first iteration of the data model
  3. Building the first screen
  4. The comments page
  5. Setting up a Captcha
  6. Add tagging support
  7. A basic admin area using CRUD
  8. Adding authentication
  9. Creating a custom editor area
  10. Completing the application tests
  11. Preparing for production
  12. Internationalisation and localisation

The essential documentation

Everything you need to know about Play.

  1. Main concepts
    1. The MVC application model
    2. A request life cycle
    3. Application layout & organization
    4. Development lifecycle
  2. HTTP routing
    1. The routes file syntax
    2. Routes priority
    3. Serving static resources
    4. Reverse routing: generate some URL
    5. Setting content types
    6. Content negotiation
  3. Controllers
    1. A Controller overview
    2. Retrieve HTTP parameters
    3. Advanced HTTP to Java binding
    4. Return a result
    5. Interceptions
    6. Session and Flash scopes
  4. The template engine
    1. Template syntax
    2. Template inheritance
    3. Create tags
    4. Extending the templates language
    5. Implicit objects
  5. HTTP form data validation
    1. How does it work?
    2. Retrieving error messages
    3. Displaying errors in the template
    4. Using annotations
    5. Validating objects
    6. Custom validation
  6. The domain object model
    1. Properties simulation
    2. Setup a database to persist your model objects
    3. Persist your object model with Hibernate
    4. The stateless model
  7. JPA persistence
    1. Starting the JPA entity manager
    2. Obtaining the JPA entity manager
    3. Transaction management
    4. The play.db.jpa.Model support class
    5. Finding objects
    6. Counting objects
    7. Explicit save
    8. More about generic typing problems
  8. Play libs
    1. XML parsing using XPath
    2. Web Service client
    3. Functional programming with Java
    4. OAuth
    5. OpenID
  9. Asynchronous Jobs
    1. Bootstrap jobs
    2. Scheduled jobs
    3. Triggering task jobs
  10. Asynchronous programming with HTTP
    1. Suspending HTTP requests
    2. HTTP response streaming
    3. Using WebSockets
  11. Ajax requests
    1. Making Ajax requests with JQuery
  12. Internationalization
    1. Only use UTF-8
    2. Externalize your messages
    3. Define languages supported by the application
    4. Define date format according to your locale
    5. Retrieve localized messages
  13. Cache
    1. The cache API
    2. Don’t use the Session as a cache
    3. Configure memcached
  14. Sending e-mail
    1. Mail and MVC integration
    2. SMTP configuration
    3. More about configuration
    4. Using Gmail
  15. Testing the application
    1. Writing tests
    2. Fixtures
    3. Running the tests
    4. Continuous integration
  16. Security Guide
    1. Sessions
    2. Cross-Site Scripting
    3. SQL Injection
    4. Cross-Site Request Forgery
  17. Modules and the module repository
    1. What is a module?
    2. How to load a module from an application
    3. Load default routes from modules
    4. Using the module repository
    5. Contributing a new module to the module repository
  18. Dependency management
    1. Dependency format
    2. dependencies.yml
    3. Conflict resolution
    4. Adding new repositories
  19. Managing your database evolutions
    1. Evolutions scripts
    2. Synchronizing concurrent changes
    3. Inconsistent states
    4. Evolutions commands
  20. Logging configuration
    1. Logging from your application
    2. Configure log levels
  21. Configuration in several environments
    1. The framework ID
    2. Setting the framework ID from the command line
  22. Production deployment
    1. Configure your application.conf
    2. Configure logging
    3. Set-up a front-end HTTP server
  23. Deployment options
    1. Standalone Play application
    2. Running on JEE application servers
    3. Google Application Engine
    4. Stax cloud hosting platform

References

Extended references for day-to-day hacking.

  1. Quick index
  2. API documentation (Javadoc)
  3. Cheat sheets
    1. Command Line
    2. Controllers
    3. Templates
    4. Model
    5. Testing
    6. Multi-environment
  4. Built-in extensions
    1. Template tags
    2. Java extensions
    3. Validations
  5. Configuration reference

Distribution Modules

These optional modules are included with the standard distribution. More modules.

  1. CRUD
  2. Secure

Version notes

New versions of Play include certain changes. Check older release notes for:

  1. About Play releases
  2. Play 1.4.4
  3. Play 1.4.3
  4. Play 1.4.2
  5. Play 1.4.1
  6. Play 1.4.0
  7. Play 1.3.4
  8. Play 1.3.3
  9. Play 1.3.2
  10. Play 1.3.1
  11. Play 1.3.0
  12. Play 1.2.7
  13. Play 1.2.6
  14. Play 1.2.5
  15. Play 1.2.4
  16. Play 1.2
  17. Play 1.1
  18. Play 1.0.3
  19. Play 1.0.2
  20. Play 1.0.1