Run Grails on the Cloud with Heroku

Support for Grails on Heroku was recently announced and I’d like to walk you through the steps to create a simple Grails app and then deploy it on the cloud with Heroku. Before you get started install Grails 2.0.0, install the Heroku toolbelt, install git, and signup for a Heroku.com account. Don’t worry, you won’t need to enter a credit card to give this a try because Heroku gives you 750 free dyno hours per application, per month. (Wondering what a “dyno” is? Check out: How Heroku Works) Let’s get started.

Next Gen Web Apps with Scala, BlueEyes, and MongoDB

Web application architecture is in the midst of a big paradigm shift. Since the inception of the web we’ve been treating the browser like a thin client. Apps just dump markup to the browser which is then rendered. Every interaction requires a request back to the server which then returns more logic-less markup to the browser. In this model our web applications are server applications. There are certainly advantages to this model - especially when the markup consumers don’t have the capabilities to do anything more (or have inconsistent capabilities).

Heroku at Jfokus and Spring I/O 2012

In just a few weeks I’ll be over in Europe presenting about Heroku at two fantastic Java conferences. First up is Jfokus in Stockholm! On February 14 at 20:00 I will be leading a Cloud Conversations BoF. Then on February 15 at 11:10 I will be speaking about how to “git push” Java & Play! Apps to the Cloud. This will be my first time speaking at Jfokus and I’m really excited because I’ve heard such great things.

Try the New Play Framework Heroku Plugin

I just published a [Heroku Plugin for Play Framework][1]. Right now it just deploys a Play app to Heroku. Try it out:

  1. [Signup for a Heroku account][2]
  2. Install the Heroku plugin locally: ```bash $ play install heroku

  3. Create a Play (1.2.3 or 1.2.4) app: ```bash
$ play new foo --with heroku
Or if you already have an existing Play app, add the follow line to the _conf/dependencies.yml_ file and then run "play deps -sync":

```yaml
  • play -> heroku 0.2

  4. Deploy the app: ```bash
$ play heroku:deploy foo
You should see something like:

```bash

~ _ _ ~ _ __ | | __ _ _ | | ~ | ‘ | |/ ’ | || || ~ | /||_|__ () ~ || |__/
~ ~ play! 1.2.4, http://www.playframework.org ~ ~ Deploying app to Heroku Listening for transport dt_socket at address: 8000 Project directory: /home/jamesw/Desktop/foo Read Heroku API key from /home/jamesw/.heroku/credentials Created new ssh key pair (heroku_rsa) in: /home/jamesw/.ssh Added the heroku_rsa.pub ssh public key to your Heroku account Created a .git directory for your project Added and committed all of the local changes to the git repo Created app: cold-night-1511 http://cold-night-1511.herokuapp.com/ Added git remote: git@heroku.com:cold-night-1511.git Deploying application via git push Application deployed ~ App Deployed

Just Released the S3Blobs Play Framework Module for Amazon S3

I’ve just posted the first release of the S3Blobs Play Framework Module. This module makes it easy to upload and download files from Amazon S3 from a JPA entity in a Play Framework Java application. This module is based on a POC that I did a few months ago, the JPA stuff from Tim Kral, and the modularization done by Roderik van der Veer. For more details on how to use the module check out the documentation, my tutorial (slightly out of date now), and the source code. This makes it really easy to save file uploads to an external system when running Play! apps on Heroku. Let me know if you have any questions. Thanks!

Tutorial: Play Framework, JPA, JSON, jQuery, & Heroku

UPDATE: This tutorial is for Play 1.x (an old version). Check out my Play 2 Tutorial if you want to get started with the latest stuff. (Thanks to John Borys for pointing this out.)

If you are a Java developer then you really need to give Play Framework a try. It is really refreshing to take a few minutes, step out of the legacy-feeling world of traditional Java web app development and into something modern and fun. I want to walk you through a very simple tutorial where we will build a web application with Play Framework. The application will use JPA for persistence and expose access to the data through a JSON over HTTP interface. The client-side of the application will be built with jQuery. Lets get started.