Tag: Java

  • Using DateTime in the Play! Framework

    Which data type should you use for time information on your Java models? The Date class is mostly deprecated, pushing us into the direction of the heavyweight Calendar class. Storing the milliseconds since Epoch in a Long is both database-friendly and easy to perform math on and convert at runtime. But if you really want a good experience, you are using Joda Time.

  • Accessing Configuration Parameters using Play Framework's Template Engine

    Suppose we are building a Facebook application and have a variable called fb.appId containing our Application’s ID. We want to use that to initialize an FBJS call, but obviously don’t want to hard-code it into our page’s template.

  • Breaking Java's Rules: Instantiating an Interface

    Here’s a geeky party trick:

All tags