5 Reasons for Flex Developers to consider a Grails / Google App Engine Backend

Today, Grails 1.1.1. was released with support for deploying applications on the Google App Engine. Here are five reasons why I think Flex Developers will fall in love with a Grails / GAE backend.

  1. Configuration-free BlazeDS and GraniteDS.

    BlazeDS and alternative GraniteDS provide powerful AMF and remote procedure calls from the server to the client. They are also incredibly convoluted to set up, involving reams of XML configuration files and often animal sacrifices. Grails takes away most of the configuration pain and provides nice convenience methods to automatically generate your as3 files and hook them up conveniently.

    GraniteDS has much better support, and is available to Grails via the GraniteDS plugin. This is as close to a dream plugin you can get. Check out all the features -> AS file generation, lazy child loading, the ability to annotate services and domain classes – It’s got it all.

    BlazeDS is lagging behind right now with the Flex Plugin and Flex Scaffolding Plugins. But with the strong effort put in by Spring ( owners of Grails ) in it’s BlazeDS integration project, this support is guaranteed to get better very soon. Somebody needs to just sit down with Marcel Overdijk and offer him a gigantic suitcase full of money to make this work.

  2. Get rid of Pesky Security Exceptions
    Grails uses Groovy – a much simpler and more powerful version of Java that allows you to solve common Flex problems with few lines of code. Don’t believe me? Check out my post yesterday where I build a Proxy service for third party pages with just one line of code...
  3. Bend Data
    Grails takes a lot of powerful Java libraries and wraps them into easy to use Plugins. With Grails, you are able to provide navigation and HTML integration of Flex services easily and effectively. Need a rules engine, no problem. Output data in PDF? RSS? iPhone view? Captchas? In fact, there is probably a great Grails plugin for most any business and backend need that might arise. This makes Grails the perfect Glue language for your server side needs.
  4. Rock solid performance and new tools:
    The App Engine is hosted by Google, not some unknown PHP hosting provider with a rack of servers in his basement. And it offers some nifty new Services, like a memcached and an image transformation service. Integrating these into Grails simply involve adding the jar file and calling the service. Grails also simplifies the guesswork in developing for the app-engine, by providing scripts for generating Google App Engine friendly domain objects and CRUD functionality via the app-engine plugin.
  5. 10 Gigabyte transfer. Per Day. Each Way. FREE

    I know you might be snickering, “thanks, that’s great, but I get this with Ruby on Rails or PHP too, why would I bother learning a whole new way of doing my work”.

    Here is perhaps the biggest reason you should consider the App Engine – it offers you 10 Gigs of data transfer per day. Each way. And it’s free! Best of all, you can create up to 10 applications with the Google App Engine.

    ( This changes after May to 1 gig a day – but how often do you really use 1 gigabyte per day? )

If you want to harness the power of Google App Engine for Java without having to deal with the hassle and pain of Java, give Grails a try. It comes well integrated with Java IDEs like Netbeans, uses a dynamic language called Groovy that gets rid of all the stupidity in Java, and is built around solid MVC principles. I’ve used Grails consistently for the last year in my Flex development, and it has allowed me to build very powerful applications very quickly. Try it out, you won’t regret it.

SHAMELESS PLUG: If you liked this post, check out Empora.com – a new website that allows you to find items via visual fashion search technology.


10 thoughts on “5 Reasons for Flex Developers to consider a Grails / Google App Engine Backend

  1. Tomas Lin Post author

    For the sake of completeness, here is 5 reasons Grails developers should use Flex:

    1. not having to deal with ie6
    2. not having to deal with ie6.
    3. not having to deal with ie6.
    4. not having to deal with ie6.
    5. not having to deal with ie6.

  2. Jakob

    Oh yeah, die IE6. But even then you might run into IE6 trouble because you still have to use JavaScript to load the SWF…
    But otherwise I totally agree! 🙂


  3. steve

    “Groovy – a much simpler and more powerful version of Java”… I have nothing against Groovy but exactly how does a merely a different syntax make it “more powerful”. It does have some syntactic goodness compared to straight Java but I don’t think you want Java n00bs to really think that Groovy can do more than straight Java code.

    1. Tomas Lin Post author

      It’s a good point. Here are somethings I can do with Groovy but can’t do with Java out of the box:

      Use closures and pass them into my functions.
      Dynamically inject methods and properties.
      Query Objects with GPath
      Mixins and Metaclasses.

      Moreover, I would argue that being able to do findAll or each on lists with the closures syntax allows for more versatile programming. Sure you can accomplish some of the same things with Java, but it is not as straighforward or obvious.

      If you can’t call the dynamic nature of Groovy power, I don’t know what you would call it?

  4. bendanpa

    I am implementing a small web app using Grails slowly at my spare time. I haven’t had a host yet and considering use linode as host server. You mentioned that google app engine can host grails app did you mean just upload the war file?

    Would you please explain in little more details.


    1. bendanpa

      By the way, have your book “flex on grails” got published? I could not order it. If it is not yet released may I read some of your draft?


    2. Tomas Lin Post author

      No, you would have to build your application specifically for the google app engine infrastructure. It doesn’t support things like JDBC or writing into a file system. I will blog about this more at a later date

  5. Jeremy Flowers

    Hey Tomas.
    I think GAE has one major flaw.
    Lack of transactions.
    So your forced to have to model your own.
    If you want to run in the Cloud AWS seems better option.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s