Feb 18th, 2009, 10:33 AM
BlazeDS with Maven - best practices
Currently I am developing Spring / Hibernate / Flex / BlazeDS- application with Maven as my Bachelor`s thesis. I used Sébastien Arbogast`s article ( http://www.adobe.com/devnet/flex/art...stack_pt1.html ) from Adobe to plan this.
Application is divided into several modules:
- DAO - domain model / Hibernate DAO`S
- Service - POJO Services, applicationContext - configuration
- Integration - possible integration to other systems
- Flex - Flex GUI
- Web - Spring controller & web configuration
- Config - common configuration (remoting.xml, services.xml)
The back-end for the application is ok now, I have succesfully integration tested it. Now I would like to get communication from Flex gui with Remote Objects to Service level.
I have read the Spring BlazeDs reference and Sebastians article. It seems that Sebastian doesn`t use Spring MessageBroker, instead he uses flex.messaging.MessageBrokerServlet. With this MessageBrokerServlet, he divided the remoting.xml & services.xml - configration into common Config - resource module as zip. It makes the Maven configuration quite complex.
I would like to use Spring MessageBroker / FlexRemotingServiceExporter and minimize the Flex configuration through defining the services in normal Spring application context xml file.
So, my question is, what is the best practice for this Flex configuration file with Maven? Should it be in Config - module as in Sebastian`s example? Or should I put it Flex module or Web module?
Any thoughts or experiences of this?
Feb 19th, 2009, 10:13 AM
That approach is actually an old way of doing it. Look at this thread: http://forum.springframework.org/showthread.php?t=66542
As far as best practices with Maven, I posted up a Maven best practices thread about a week ago. Needless to say I think this is the weak link with Flex development right now. You can compile Flex code using the flex-mojos, but FlexBuilder doesn't really like to play nice with maven's convention over configuration model. The two just don't sync up nicely yet.
Feb 20th, 2009, 11:13 AM
I've resorted to having a single Ant task for Flex compilation, and the rest done through Maven. I was wasting too much time trying to get flex-mojos and the servebox plugins to work nicely, so decided I would re-asess after we see what Gumbo brings to the table re Maven (if anything.)
Feb 26th, 2009, 01:05 AM
Thanks for the answers.
Now I have succeeded to use Maven with modularized Spring application.
I deleted the configuratin - module and placed the remoting/services -config to WEB-INF/flex - directory. For Flex module I used flex-mojo`s. Maven copies the Flex .swf - file into WAR.
Everything works fine.
Mar 22nd, 2009, 06:21 PM
maven + flex + spring + hibernate + blazeDS integration
can you please post your integration so that we can all learn from it.