Adobe Flex vs openlaszlo

When companies like Pandora chose OpenLaszlo, Flex was still a commercial product (even the compiler). The Flex versions 1.0 and 1.5 were not very stable, and only with the 2.0 release of Flex the platform got a lot more stable. Macromedia upset a lot of developers, since Flex 2.0 was no compatible with 1.5, and all applications had to be rewritten for the new release. In that situation quite a few companies thought that OpenLaszlo is not a bad choice.

The most powerful feature of OpenLaszlo is the LZX language. The language supports classes, animation of any numeric property, constraints using a attribute="${}" syntax, mixin support, datasets with datapath (xPath syntax based) mapping. Some of the key developer of the LZX langauge had been working on Apple's Dylan language before, and a lot of the powerful concepts of Dylan have made it into the LZX language.

I've done both OpenLaszlo and Flex development. Flex has excellent tooling support by various IDE vendors. But the ActionScript 3 language can be very limiting, as in Java you spend a lot of time thinking about your class model. OpenLaszlo emphasizes instance based development (very fast for prototyping, while it's still possible to build very complex applications with 100k+ lines of LZX code). The largest OpenLaszlo applications I'm aware of are Laszlo Webtop (120K+ lines of LZX code), and IBM Websphere Commerce Edition (http://ibm.co/Kid5tc). I've heard that other companies have created equally large applications using OpenLaszlo.

Since version 4.2 OpenLaszlo integrates the Flex SDK. The OpenLaszlo compiler generates the LZX code into JavaScript 2, and then into ActionScript 3 code. If you compile an application to both DHTML and SWF10+, you can profit from the better type checking of the Flex compiler, even if your application will only be deployed for the DHTML/HTML5 runtime.

OpenLaszlo is very stable. The last major release (4.0) has been in March 2007, although the OpenLaszlo team considered the 4.2 release to be equal to a major version upgrade, since it added the ActionScript 3 and SWF9 support to the platform. 4.2 was released in December 2008, the current stable release is the 4.9 version - although many community members and Laszlo are already using OpenLaszlo 5.0 (trunk, unreleased) in production.

After Adobe's announcement to contribute the Flex SDK to the Apache Foundation (now an Apache Foundation Incubator project), Adobe announced that they had been working on a cross-compilation feature for the next generation Flex compiler called "FalconJS". Adobe said as well, that FalconJS (which will probably be contributed to Apache Flex in Q4 2012) will not be able to cross-compile existing Flex applications into JavaScript. A simple list example of FalconJS (as demoed in December 2011) generated into 5 MB of uncompressed JavaScript code, wich could be boiled down to 2.5 MB using the Google Closure compiler's advanced mode. A similar OpenLaszlo example in the DHTML runtime compiles to less than 750k of JavaScript code.


I think your term of 'a lot of large projects' is very relative. Yes, some large companies have used it, but I don't consider any of them large projects. If you look at all of them in the OpenLaszlo showcase, they seem fairly simple interfaces to me. Also note that OpenLazslo compiles Flash, not Flex and associated framework.

To me, OpenLaszlo is an alternative for creating simple RIAs in a way that the end code can be compiled into Flash or Javascript. Haxe is another alternative to this, and I think it does a better job than OpenLaszlo.

With that said, there's a problem with these "generic" write once, compile to Flash/Javascript framework; it doesn't harness any of the power/advantages of each specific platform. Flash is constantly changing and so is Javascript with the addition of html5 tags and css3. If you ever have experience in both, you'll notice that they're very different in the way they do things and on algorithm might work well with Flash, might not with Javascript.

My point being, if you are to choose a technology, go for the one that's more appropriate. If your project has a need to have both Javascript and Flash, then this might be a good choice, but remember that you'll then be losing the 'power' of each. For instance, Flex has a very good skinning architecture and a set of tools that is essential for enterprise development. Javascript can do some pretty neat stuff with selectors, css3, and some other frameworks like jQuery.

In my experience, post compilers like OpenLaszlo eliminates those strengths. Plus, if there's a new thing that comes outs (like say, hardware accelerated video/3d for javascript/flash), you have to wait for the people at OpenLazslo to update before you can use it (if they use it).