Robi's Blog

On Life, the Universe and Everything – but Mainly Software Development

Play 2 Boilerplate

A little project aimed at getting one up and running quickly with building a contemporary web app using Play 2 framework.

Contains a bunch of current web dev best practices and niceties, from latest Twitter Bootstrap (LESS) & Backbone.js to CoffeeScript with CommonJS modules support & proper JS bundling.

Here’re a couple of exemplary code snippets to whet one’s appetite:

main.coffee
1
2
3
4
5
6
{log} = require './utilities'

$(document).ready ->
  window.app = {}
  log 'Hello, world!'
  return
Application.scala
1
2
3
4
5
6
7
object Application extends Controller {

  def index = Action {
    Ok(views.html.index(Messages("app.name")))
  }

}

Get it on GitHub while it’s hot.

Comments