Play Framework

Heroku at JavaZone 2012

I’m really looking forward to being back at JavaZone in Oslo this September! I’ll be speaking about Running Java, Play! and Scala Apps on the Cloud. This session will teach you how to get started deploying Java and Scala apps on Heroku. I’ll be around for the whole conference, so if anyone wants to grab a drink, deploy some apps, or write some code with me, then let me know. See you there!

Edge Caching With Play 2, Heroku, and CloudFront

Web applications are primarily comprised of data, services, and the User Interface (UI). The UI is comprised of HTML, CSS, images, and probably JavaScript. In the traditional web architecture all of the UI assets are static files except the HTML which is dynamically generated by the server. In the modern web architecture the entire UI is static files that consume RESTful / JSON services. The static files for the UI must be downloaded to the client so the less time it takes for them to be downloaded, the better the overall performance of the application.

Getting Started with Play 2, Scala, and Squeryl

My friend Ryan Knight and I co-authored an article which has just been published on Artima: Getting Started with Play 2, Scala, and Squeryl. This article will help you get started building a Play 2 application from scratch that uses Scala and Squeryl for ORM. The article also covers how use ScalaTest, JSON, jQuery, CoffeeScript, and deployment on Heroku. Give it a try and let me know how it goes!

Optimizing Play 2 for Database-Driven Apps

Update: There is now a detailed doc in Play’s documentation about configuring Play’s thread pools. Last week Matt Raible and I presented the Play vs. Grails Smackdown at ÜberConf. The goal of the session was to compare Play 2 + Java with Grails by creating the same app with each framework. We used a number of criteria for the comparison including some benchmarks. You can read more about the results in Matt’s session recap blog.

Play 2 Scala Console on Heroku

I’ve been working on a Play 2 application that I’ll be using for the Grails vs Play Smackdown at ÜberConf next week. The app is running in production on Heroku but since I don’t have an admin UI yet, I needed a quick and easy way to create a new entity. I could have gone straight to the database but thought it would be better to run Play 2’s Scala Console on Heroku and then just run some arbitrary Scala code.

Play 2 Java Tutorial

Update: This tutorial is a bit old. For more up-to-date tutorials see: I’ve created a Play 2 Tutorial and posted it on GitHub! The tutorial covers how to: Create a Play App Set up an IDE Start the Play Server Routes Test a Route Update a Controller Test a Controller Update a View Test a View Deploy your app on the Cloud with Heroku Create a Model Create UI for Adding Tasks Get Tasks as JSON Display the Tasks via CoffeeScript and jQuery Make the App Pretty with Twitter Bootstrap Add Form Validation Update the App on Heroku Each section has a corresponding branch in git so you can diff against my version to see if you’ve done everything correctly.

Heroku, Java, Play and Neo4j Presos: Denver JUG, Atlanta JUG, London Flash UG & Webinar

Over the next couple weeks I’ll be doing two Java User Group presentations, a Flash Platform User Group presentation and one Webinar. Hope to see you at one of these events: Wednesday May 9 - Denver Java User Group: Running Java, Play! and Scala Apps in the Cloud Thursday May 10 - Webinar hosted by Neo4j: Graphs in the Cloud: Neo4j and Heroku Tuesday May 15 - Atlanta Java User Group:

Introducing WebJars – Web Libraries as Managed Dependencies

Update: I’ve created a Spring MVC WebJars example. Update 2: Ukrainian translation here - by Eclipse Android. Update 3: has been officially launched! Learn more. Our web apps are using more and more web libraries like jQuery, Backbone.js and Twitter Bootstrap. The traditional way to use those libraries is to locate & download the JavaScript and CSS source then just copy it into a project. To me this resembles how we used to just copy JAR files into a project’s WEB-INF/lib dir.