Flex, Spring and Java

2009-02-08 11:14:03 +0100

Last year I worked with a collegue on a software project. As I architect I set up a backend. As frontend technology we used flex. As backend technology, we used Spring, JPA (via Toplink) and Java. Communication between frontend and backend was accomplished by using Blazeds.

The stack was very productive, and after a short learning curve, we could implement software quickly.

A nice and informative article on how to use these technologies is recently written by the collegue I worked with. The article is in Dutch, for those that can read that language see: Stack Attack: Flex, Spring, JPA en Toplink

Read more

Combining Flex and Scala using Liftweb and BlazeDS

2009-01-18 18:05:03 +0100

I wanted to setup a sample project that uses Flex and Scala. I followed the excellent tutorial on FlexOnRails: Integrating Flex, BlazeDS, and Scala/Lift. The tutorial helps a lot explaining how to set up your sample project. Unfortunately the tutorial is a bit outdated with regard to latest versions. Fortunately I could solve all problems! I'll list the problems I had. Also, I'll post my project. I won't redo the tutorial, as I certainly couldn't to a better job then Derek Wischusen.

  • First problem I had, was getting my backend compiled. The liftweb has changed slightly, as a result the class Boot.scala didn't work anymore. I could solve it by downloading the latest Liftweb framework, version 0.9. I copied & pasted the Boot.scala from the sites/examples dir. After a few tweaks (removing code I didn't need), the project compiled successfully!
  • Then I wanted to setup the flex project. That was quite easy, using the latest version of Flexbuilder (version
    I setup flexbuilder to deploy in the backend/webapp directly, as is explained in the tutorial.
  • I ran the project by running the following maven commands in the backend subdir:
    mvn package
    mvn jetty:run
  • While running the example, I got a AbstractMethodError. I wasn't the first person to get that error, as I found on the Liftmailinglist. I could fix the problem by using Scala version 2.7.1 for my own project. All in all, when using bleeding-edge technologies, having the latest version isn't good always!
  • After that I ran the project  again. Now I get a NullPointerException, seems the line val msgBroker = MessageBroker.getMessageBroker(null) returns Null.
    Turned out I forgot to update the web.xml, the Flex servlet and other configuration has to be added.

I named the sample project Elegante. Download the source here: elegante.zip. For explanation see the original tutorial.

Read more


subscribe via RSS