Sunday, May 31, 2009

Spring, Flex, and other things


I finally just did another release for Spring by Example. One example is Simple Flex Webapp and the other is Simple Spring Integration.

I just did the Flex example recently and the Spring Integration one was done a little while ago, but I never wrote about it for the site. There's also a more advanced example using queues and splitting, but I'm not sure if the flow really makes sense although it needs to be the way it is to split and aggregate things.

I've been working with Flex for a few months now and I still think it's really nice. It's the best thought out UI framework I've ever worked with. Besides it looking very nice with minimal effort, it's very easy to do many things, ActionScript is a very comfortable environment for someone that knows Java, JavaScript, and is used to doing web development. Also, I'm impressed with how many things Adobe has open sourced. The Adobe BlazeDS provides a really good bridge between Java and Flex for remoting and messaging. Also the Spring BlazeDS Integration project from SpringSource really simplifies configuration and ease of use as you would expect. I think they've done a really great job again. Spring Integration also has integration with Spring BlazeDS Integration so from a message flow you could send a message to a Flex UI and the flow could wait for a response to come back.

The Adobe Cairngorm project for providing client side MVC in Flex is nice too. It helps provide separation of business logic from UI components and encourages using Flex's data binding to transfer information from the controller to the view using a bound model. Adobe suggests having the model a singleton, but it would be nice if a dependency injection framework was used instead. Spring ActionScript gives basic functionality, but just the bare minimum compared to Spring's Java implementation. Although I think it could become a lot nicer without too much effort.

I'm going to try to post more Flex examples including more advanced Flex usage as well as ones using messaging. A bridge can be created between JMS queue and a Flex queue or messages can be sent directly to the Flex queue. Also, I'd like to start spending more time using the SpringSource dm Server. The new web features that are being added to version 2.0 really interest me.