Many people in the Java community have recently been asking how to use Flex with the Spring framework, and more specifically, how to remotely invoke Spring beans methods from Flex applications.
Spring is one of the most popular Java frameworks. It is based on a lightweight component container that implements the Inversion of Control (IoC) pattern. Using an IoC container, components don’t instantiate or even look up their dependencies (the objects they work with). The container is responsible for injecting those dependencies when it creates the components (hence the term “Dependency Injection” also used to describe this pattern). The result is looser coupling between components. The Spring IoC container has proven to be a solid foundation for building robust enterprise applications.
The Flex and Spring integration process is actually very straightforward. Based on the interest in combining these technologies, I wrote a document providing background information, configuration information, and three examples with source code.
You can read the “Using Flex with Spring” document here.
UPDATE (1/12/2007): I put together a Tomcat-based Test Drive Server that includes these samples running out-of-the box. Read this post for more info.