Working with Grails and Adobe Flex – Download Free Chapter from Professional Flex 3

In Professional Flex 3, I wrote a chapter on integrating Flex with Java-based Web Services  (see below to download actual chapter).  More specifically I used Grails (similar to Ruby on Rails, except for the Java world), which is based on Groovy (a dynamic language that compiles to the Java platform) to expose SOAP-based Web Services to the client built with Adobe Flex.  The application isn’t anything sexy, but does show CRUD-based data operations for a Flex client using a SOAP-based Web Service implemented on the Java stack.

Note, in the actual book, there’s also similar demos (that I wrote), on http’s RESTFul web services with the ZEND framework (see Chapter 49 in Professional Flex 3), and Soap-based Web Services with Microsoft’s .NET WebService stack and the ADO.NET Entity framework (see Chapter 51 in Professional Flex 3).

Here’s just a few reason why I think Grails/Groovy for the Java world are great:

1)  All your syntactical sugar of the dynamic languages for the Java platform.  If you program in Python or Ruby you’ll know what I’m talking about.

2)  Reliable, proven runtime with Java.  Enterprises have been running a variety of highly supported Java runtimes supported by companies like Apache, IBM, Oracle, ATG, etc…

3)  Most likely, your operational teams and data centers already support Java VMs and have operational procedures in effect around maintaining such infrastructure.  While, they won’t be switching to a LAMP-based open source stack anytime soon, there is probably a path you can go down to use Groovy and Grails for application development that can be released to existing infrastructure, hardware, VM’s, etc…

Anyone stuck in a large corporate, enterprise environment at least has an option to get some syntactical sugar and agile speed in their development environment.

Now, add a sexy Flex interface and you’re cooking.

My publisher Wiley is allowing me to offer up the chapter.  You can download it here  (335KB PDF file).  Don’t forget about the source code for Chapter 50, which is available here at Assembla (Subversion repository).

I hope you enjoy.