Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Clear Toolkit Bridges Flex and Java Development

Clear Toolkit Bridges Flex and Java Development

Leia em Português

This item in japanese

On February 24, Farata Systems announced that it has started the process of open sourcing its Clear Toolkit framework for developing enterprise rich Internet applications (RIA) with Adobe Flex and Java. InfoQ spoke with Yakov Fain, one of the three partners of Farata Systems, to learn more.

Fain started by explaining why it created the Clear Toolkit:

While working on lots of enterprise projects, we wanted to minimize the amount of manual programming involved, so we tried to automate mundane and repetitive work for developers. For example, if you are a Java programmer working with databases, chances are you’ll keep writing similar fragments of JDBC code that process result sets. We started to look at the XSL templates, work with metadata and figured out how to generate the complete source code for the Java back-end processing based on a SQL Select statement. Then we added more templates to generate the front end in Adobe Flex. So today, the generation of a Flex/Java CRUD application takes a matter of minutes. We’ve also created Ant script generator for Flex projects, a friendly logger, and a number of enhanced Flex components that minimize the amount of manually written code.

When asked about a typical case using Clear Toolkit and the problems it solves, Fain continued:

First, Clear Toolkit can be used to jump start an enterprise Flex/Java project, and then our smart Flex components simplify keeping track of data modifications performed by the user, offer more convenient work with data grids and forms, and automate data synchronization of occasionally connected Adobe AIR applications. We also have an excellent Web reporter ClearBI that allows end users to create their own reports without the need for any software other than a Web browser with Flash Player. ClearBI will be outsourced later this year.

According to Fain, Clear Tookit currently includes the following elements:

  • Clear Data Builder, which is an Eclipse Plugin that allows generating CRUD applications for BlazeDS or LCDS based on either an SQL statement or a Java data transfer object.
  • DTO2Fx, which is a plugin that automatically generates proper ActionScript classes based on their Java peers.
  • Log4Fx is an Eclipse Plugin built on top of Flex logging API, but it automates and makes the logging process more flexible and user friendly.
  • Fx2Ant is a plugin that generates optimized ANT build scripts for Flex Builder projects.
  • The clear.swc is a library of enhanced Flex components.

He explains:

Since most of the Clear Toolkit components can be used ala cart, they can become handy on pretty much any Flex project. If you just need an advanced logger, just use Log4Fx. If you want enhanced data validation classes and forms processing, add clear.swc to the project build path. If you are still allowed to use SQL, engage Clear Data Builder for CRUD generation. If you aren’t, provide Java DTOs and generate the entire Flex front end, including the mechanism of communicating to the server the data changes made in the UI layer. Clear Toolkit is a help to those customers who for various reasons decided to use Adobe’s open source server-side component BlazeDS as opposed to commercial LiveCycle Data Services bundle. We believe that BlazeDS is a robust and well designed component that can be utilized in very serious enterprise applications.

With respect to open sourcing Clear Toolkit, Fain shared:

During the last two years we’ve been offering Clear Toolkit components for free at After a while we realized that, although our company employs excellent software engineers, there are only so many of us and you can’t beat the collective brainpower of hundreds of developers. We’ve written so much code that Clear Toolkit can become a solid platform for developing RIA without the need to rob the bank. We invite Flex and Java developers from around the world to participate in making Clear Toolkit the open source platform of choice.

Fain added:

Since this is an open source project now, I can only say how Farata Systems is planning to contribute in 2009:

  • Document the data synchronization solution for AIR/BlaseDS applications. We already created the demo application and have described this solution in our upcoming O’Reilly book Enterprise Development with Flex, but now we need to convert this text into product documentation.
  • Enhance Flex UI components to support PDF generation on the client.
  • Document classes from Clear component library (clear.swc)
  • Open source the Web reporter ClearBI.

In addition to what Fain shared with InfoQ, he provided an overview of the main framework components on InsideRIA.  For those who have dealt with data synchronization issues with any client server like architecture, the frameworks most interesting feature is the support for tracking client side updates in Flex and synchronizing them with the Java server.

If you are familiar with LCDS, you know that Data Managemet Services use ChangeObject, which is a special DTO that is used to propagate the changes between the server and the client. Our component also includes such object but it can be used not only with LCDS but with BlazeDS too.

The DataCollection class automatically keeps track of all the changes made by the use in the UI and sends a collection of the corresponding ChangeObject instances to the server.

When the user is ready to submit the changes to the server, the following line will send a collection of ChangeObject instances to the server: collection.sync();

Clear Toolkit is available under MIT License, which means that you can use our code in your applications as long as you keep the comments stating that Farata Systems is the original creator of this code. The latest builds and the source code of Clear Toolkit 3.1 are located at The current documentation, demos, user forums, and bug trackers are also posted on that site.

Rate this Article