The Blog

Mar 7, 2009

Flex Camp Miami: Spring & BlazeDS Integration (Jeremy Grelle) 

by Maxim Porges @ 10:54 AM | Link | Feedback (0)

Jeremy's presentation went over the reasons for using Spring with a Flex/AIR application, and described how the recent partnership between SpringSource (Jeremy's employer) and Adobe has put proper support for collaboration between the two technologies on the fast track.

All of Jeremy's presentation was interesting, but the most exciting parts for me personally were the upcoming syntax for integrating Flex and the hooks in to Spring Security.

Originally, the first releases of Spring/Flex integration required quite a bit of code an an invasive hook in to the Spring beans file, but the new support does all the configuration for you with one tag using sensible defaults (a la just about everything in Spring). Basically, Spring just exports the services to Flex the same way that it does for exporting hooks to Spring web services or any other presentation technology. There is the ability to provide a nice separation here between your Spring configuration for your libraries and specific use cases where those libraries are made available to BlazeDS, allowing you to unit and/or integration test appropriately at each tier.

As far as Spring security, the configuration has become much simpler. You can now simply state the security role required to access each BlazeDS remote destination endpoint, and your security configuration is all ready to go. The only thing that remains is the standard set of hooks that you need to put in Spring to tell it where your authority store is (i.e. LDAP, a USER database table, a flat file, etc.), which you would have to do if you rolled your own solution too so no extra work is really taking place here.

Some of the questions that arose included whether or not Spring was going to figure out how to get around some issues with the deep traversal that the AMF gateway performs when marshaling objects across the wire, and the havoc this can wreak with lazy loading in frameworks like Hibernate. Jeremy said that this was really an issue that Adobe was going to have to solve in the AMF gateway, and was obviously not related to the Spring integration by itself.

The last final interesting tidbit we learned was that the Spring web team is based in Melbourne, FL. Apparently one of the founders of SpringSource lives in Melbourne, and was an ex-Harris employee who started a branch in his home town. Once again, we find a surprising little spoke of the larger hub of the tech community nestled away in an innocuous part of Florida!

You can follow the evolution of the Spring/Flex integration project at the project home page. The new M2 release is out if you want to be one of the cool kids.

All Flex Camp Miami Roundup Posts
Welcome and Keynote (Greg Wilson, Adobe)
Working with Data in AIR (David Tucker, Universal Mind)
In Search of AOP for AS3 (Maxim Porges, Highwinds)
Merapi or How To Blow Your Mind with AIR (Andrew Powell, Universal Mind)
The Art of Storytelling (Christian Saylor, Universal Mind)
Continuous Integration and Flex (Brian LeGros, Highwinds)
Spring & BlazeDS Integration (Jeremy Grelle, SpringSource)
Mate Flex Framework (Laura Arguello, ASFusion)