After trying for weeks to integrate Flex and BlazeDS into Grails, in vain, I’ve decided to come back to vanilla Spring/Hibernate for Conference Guide server. And I took the opportunity to upgrade my todolist sample application, the one featured in the article published both on this blog and on the Adobe Developer Connection.
Here are the improvements compared to the original version:
- I replaced the old SpringFactory by Spring BlazeDS Integration (spring-flex) library
- I’ve added basic security using Spring Security, based on Cristophe Coenraets’ article on DZone
- The domain now has 2 entities with a one-to-many relationship: you can manage several todolists, each having several items
- I’m now using proper DTO’s for data transfer between the client and the server, which is for me the cleaner way to do things
- Flexmojos Maven plugin has been upgraded to 3.4.2 (the latest stable version today).
I won’t go into detail about every aspect of this project because I think it can be much more useful to use it as a basis rather than try to reproduce it from scratch. Here is what you need to do to make it work:
- Download the project source code on GitHub
- Install Maven 2.2.0 if not already done
- Run “mvn install” at the root of your project until you get a BUILD SUCCESSFUL message
- Copy server/target/todolist.war to the webapps directory of your Tomcat server, or startup Tomcat and run “mvn org.codehaus.mojo:tomcat-maven-plugin:1.0-beta-1:redeploy” from within the server module
- Open your browser on http://localhost:8080/todolist and login as john/john
If you have any suggestion for improvements, of if you have any question, feel free to leave a comment here. Cheers!