Clientside: Flex

Adobe Flex is an open source browser/platform independent framework to create rich internet applications. Flex is widely supported in the internet community and lots of resources are available.

Backend: Java

Java has evolved to a rich open source development platform from just a programming language during the years. There are possibilities for developing great RIA's in pure java but with Flex closeby the choice is made easy.

Though for back-end integration issues Java is one of the best if not the best choice. Platform independency and the availability of a lot of frameworks provide a solution for almost every project.

The challenge

Connect Java to Flex in a transparent and easy to use way on both sides (client and back-end) with the possibility of two way communication to use server push functionality.


The Paddle generator creates mappings between Flex Action Script classes and Java objects. So that object representations are available on both sides.

The bling interface and the robust integrator

Nowadays virtual working with SAAS is more and more adopted by organisations. Not all business functionality is right fitting into SAAS solutions. SAAS may be relevant when external business expertise or IT servicing contribute to specific functionality, scalibility or maintenance of the business function. Internal business functionality which is core business of the organisation and is operated well by IT teams may be probably no candidate at all for SAAS solutions. At the end SAAS must save budget and improve efficiency.


Often SAAS applications must integrate into existing back-office applications and software systems. Also easy integration with other front-end applications (other SAAS or Web Services) may be the case. So it is wise to use a development platform for building your RIA's which is open enough for integration.

The discussion about which development platform is the best and which not is not important here. Sure there are many possible RIA platforms. Main question here is more pragmatic: Create a good workable solution to build great RIA's with the help of existing stable development platforms which perform well and with the possibility to connect easily to existing platforms like J2EE.

Flex is chosen as cool user interface platform and Java will be used for reliable back-end and integration platform.

The challenge will be: How to communicate between Flex and Java?

There are several ways to pass structured data from a Java back-end to Flex. A Java Servlet can pass XML which can be bound directly in Flex or processed otherwise. Another method is using JSON to serialize data structures which can be parsed easily in Flex.

Then there is LCDS/BlazeDS for full object mapping between Java and Flex. Big advantage here is that there is full knowlegde of the data structure on client and server side. So ActionScript classes are typed automatically from Java classes and vice versa. Remoting communication via AMF channels is in binary which will perform better than communicating JSON objects. LCDS/BlazeDS enables real-time remoting and web messaging.

Since BlazeDS is a subset of LCDS not all functionality we actually would want is available but BlazeDS will do for our purpose. And BlazeDS is OpenSource.

These frameworks will be extended with Spring even more easy software integration is possible.

Now the development platforms and frameworks are chosen, we encounter some drawbacks using this solutions in a capable matter:

  • Remote object mapping results in coding a Flex actionscript object and a Java object
  • Data type mapping issues between Flex and Java
  • No enumeration in Flex

The need for a paddle for dominating the strong current flowing between Flex and Java arises. A generator which generates the full object mapping between Java and Flex can solve these problems. By using an XSD file as input for the code generator and using existing frameworks like Castor for creating serialized objects saves tedious typing of Java object holder code. When also generating ActionScript objects the mapping of data holders is made complete. Further regular expressions which are bound to data definitions in the XSD make it easy to create validators on the client and/or server side.

What Paddle does is providing a jump start for building your Flex-Java applications. For now client side and server side object holders are generated. Also the XSD is fitted into a Flex object so that regular expressions can be used easily. When XSD definitions are changed during the project code can be generated again and integrated into the application.

This website provides the Paddle generator which can be used freely.

Further the Person case is described which is developed using the frameworks as described with help of Paddle.