I’ve been using Grails extensively for a year or so, and I love it, I really do. I even wrote a couple of plugins for it, including one for integrating Grails with Apple Push Notification Service. But since I’m always looking for productive ways to develop, I always thought that Grails and Flex were the best combination ever… until I hit the brick wall!
There’s a Grails Flex plugin, but it has 3 major issues:
- The Flex plugin has not been maintained for years, and it uses the old-fashioned way of integrating BlazeDS into Spring instead of the more modern, robust and easy to configure Spring BlazeDS integration library
- It doesn’t deal at all with authentication and authorization which is for me a critical issue in any remoting setup. And the Flex plugin doesn’t really offer a solution to that.
- The Flex plugin integrates BlazeDS3 and suggests you should mix your Flex sources with Grails project, which doesn’t make it easy to work on the Flex part using Flash Builder and its great data connectivity wizards.
Those are the 3 reasons why I’ve been working on the Grails BlazeDS plugin which works great with Grails up to version 1.2.x. Unfortunately I’m tackling some challenges with Grails 1.3. And even with Grails 1.2.x, there are still some limitations with Flash Builder, mainly due to the fact that
- Flash Builder requires a standard WAR layout, which “grails run-app” doesn’t create
- Flash Builder doesn’t like artifacts that Groovy adds to classes at compile time, so it’s not able to generate client-side stubs
So from a Grails/Flex integration standpoint, we end up being stuck between an old solution that is working but incomplete and not integrated in tools, and a more modern solution that does not work anymore and forces us to use some workarounds.
All the community needs to make this work is a little coordinated help from Adobe and SpringSource so that we can have:
- a BlazeDS 4 + Spring BlazeDS 1.5 + Spring Security 3 integration plugin for Grails 1.3 and above
- a data connectivity wizard that does not require a standard WAR layout and is capable of generating client stubs based on Groovy classes.
I’ve left a couple of messages on Grails mailing lists, Adobe forums and SpringSource forums, but so far, all my calls for help have remained unanswered. So if anyone is willing to help or support this ongoing initiative, it’ll be greatly appreciated. Just leave a comment if you need such a better Grails /Flex integration and maybe it will trigger a red light somewhere at Adobe and/or SpringSource. And if someone from Adobe or SpringSource is reading this, please help!
Graeme Rocher · August 25, 2010 at 10:34 am
We are working internally on improving Flex support and you should see the results of that in the next few weeks.
Once the initial official support is done we would be very interested in your feedback and suggestions for improvements.
SÃ©bastien · August 25, 2010 at 11:27 pm
Thanks a lot Graeme. Burt Beckwith also got in touch with me on this, I guess that’s what you’re talking about. We talked about what I thought would be the best plugin structure. Thanks a lot for coming back to me on this guys, because I was starting to get a little jealous of Roo guys. But suddenly my faith in Grails is back.
John A Olsen · August 25, 2010 at 1:58 pm
At the moment, Flex+Spring is the only viable option.
Adobe and Springsource please get Grails up to speed as well!
Kris Hofmans · August 25, 2010 at 4:22 pm
Have a look at: http://www.grails.org/GraniteDS+Flex+Plugin
SÃ©bastien · August 25, 2010 at 11:23 pm
I know about this plugin, but I don’t want GraniteDS. I’m really looking for BlazeDS integration.
Brian · August 25, 2010 at 5:34 pm
The possibility of getting help from Adobe is going to be pretty slim. Your best bet is to try and work with someone on the Enterprise Evangelist team to strike up community interest. James Ward is probably the most open-minded one to approach. On the SpringSource side, I think Jeremy Grelle is the lead for SpringFlex and he’s probably your best bet when you have questions. Spring Flex 1.5 has SpringMVC integration for RESTful endpoints using AMF I believe. If this is the case, the port to Grails may not be as difficult as with 1.0.3. HTH and good luck with the plugin.
Arch Brooks · July 24, 2014 at 12:33 am
Sppring Source Tool Suite has a complete flex integration including scaffolding