Play! Framework

TwitterFacebook
Get flash to fully experience Pearltrees

YAML

YAML syntax Your application tests will often use data structures that consist of related model objects, which can be tedious to create programmatically in Java. Play includes a YAML parser which makes the task much simpler. http://www.playframework.org/documentation/1.1/yaml

snakeyaml

http://code.google.com/p/snakeyaml/wiki/Documentation This documentation is very brief and incomplete. Feel free to fix or improve it.
http://blog.lunatech.com/2011/04/20/play-framework-better-json-serialization-flexjson

Play Framework - Better JSON serialization with FlexJSON

We want to be able to create multiple different JSON views on the same object, to be used in our Play templates. This is useful, because entities are often used in several contexts. A news item may be shown with only a few details in a listing of news items, with more details on a separate page for that news item, and with even more details for an editor of the website.
In summary, this article describes a simple example of how to define a Java annotation that will declaratively add behaviour to a model class in a Play framework application. You can do with with a custom annotation and a Play module that enhances the model JavaBean class. Suppose your Play application uses the CRUD module to provide a default user-interface for managing data such as the following JavaBean.

Declarative model class enhancement in Play

http://blog.lunatech.com/2011/01/11/declarative-model-class-enhancement-play

Play! Framework cheat sheet

http://playcheatsheet.appspot.com/show/ArtemMedeu/armed/play-cheatsheets Controller/link?

Play framework - Setting up a basic administration area using CRUD

http://www.playframework.com/documentation/1.1.1/guide7 Currently, we have no way to create new blog posts or moderate comments using the blog UI. Play provides an out of the box CRUD module that will help quickly generate a basic administration area. Enabling the CRUD module A Play application can be assembled from several application modules. This lets you reuse components across several applications or split a large application into several smaller ones. The CRUD module is a generic application that introspects the model classes to create simple lists and forms.

Caching

http://www.playframework.com/documentation/1.1/cache To create high-performance systems, sometimes you need to cache data. Play has a cache library and will use Memcached when used in a distributed environment. If you don’t configure Memcached, Play will use a standalone cache that stores data in the JVM heap.
A Play application can be assembled from several application modules. This allows you to reuse application components across several applications or split a large application into several smaller applications. What is a module? A module is just another Play application; however some differences exist in the way resources are loaded for an application module: A module does not have a conf/application.conf file. A module can have a conf/routes file, but these routes will not be loaded automatically.

Module basics

http://www.playframework.com/documentation/1.1/modules

Using UnboundID LDAP SDK

http://www.unboundid.com/products/ldap-sdk/docs/persist/index.php The UnboundID LDAP SDK for Java provides a persistence framework that can be used to easily store Java objects in an LDAP directory server. It uses Java annotations to indicate the way that the information should be stored in the directory, and includes support for add, delete, modify, and search operations. It also provides tools that can be used to generate Java source code from LDAP schema, or to generate LDAP schema from properly-annotated source code.
com.unboundid.ldap.sdk Class StartTLSPostConnectProcessor http://www.unboundid.com/products/ldap-sdk/docs/javadoc/com/unboundid/ldap/sdk/StartTLSPostConnectProcessor.html

LDAP Connection Pools with StartTLS

Getting Started with Javassist Shigeru Chiba 1.

Javassist Tutorial

The Play logger is built on Log4j . Since most Java libraries use Log4j or a wrapper able to use Log4j as a backend, you can easily configure logging that is well-suited to your application. Logging from your application Play provides a default logger with the class play.Logger . This class uses Log4j to write messages and exceptions to a logger named “play”.

Logging configuration

Java extensions

Java extensions add convenience methods to objects for use in view templates, making expressions more expressive.
Play applications can be deployed virtually anywhere: inside Servlet containers, as standalone servers, in Google Application Engine, Stack, a Cloud, etc... Standalone Play applications The simplest and the more robust way is to simply run your Play application without any container. You can use a frontal HTTP server like Lighttpd or Apache if you need more advanced HTTP features like virtual hosting. The built-in HTTP server can serve thousands of HTTP requests per second so it will never be the performance bottleneck. Moreover it uses a more efficient threading model (where a Servlet container uses 1 thread per request).

Deployment

Here some simple tips to optimize your application for production. Configure your application.conf First off, the best way to specify production mode is to give a specific ID to your production framework.

Moving to production

Learning Scala

With the help of an official module you can use Scala to create your Play! application instead of Java, or write parts of it in each language. by keester81 Dec 21

OVal - Object Validation

This is what power's the Play! framework's validation by keester81 Dec 21