开发者

Adobe Flex vs openlaszlo

I am currently working on a RIA project in flex, but have recently come across openlaszlo. It seems a lot of large projects have chosen it over flex, such as the str开发者_如何学编程eaming music service Pandora. I'm interested in why. So far the biggest advantage I have seen is that it has an abstraction layer for support of flash 6,7, 8, 9 and dhtml and has been in development for a longer time (so possibly more stable).

Has anyone had much experience using both, or just openlaszlo even? is the support for dhtml and older flash versions really that big of an advantage with the popularity of flash 9 these days? Might this just be because of many developers are already comfortable with javascript/ajax? Besides language preferences, why openlaszlo and not flex?

Thanks for any tips! Ryan


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).


I started developing RIAs with OpenLaszlo as it offered a cross browser run-anywhere kind of framework. The user experience delivered with it was also very good.

I moved to Flex (when it was in Beta) because:

  1. Every capability of OpenLaszlo was available in Flex.
  2. Flex had an extra advantage as it was a supported commercial product from a leading digital media content creation company Macromedia & later acquired by Adobe.
  3. Flash Builder (a.k.a Flex Builder) built on Eclipse provided a good development productivity improvement. (so spending one time license fee on it is not at all an issue)
  4. Above all Flex had better server-side integration / remoting capability.
  5. Flex had plenty of tutorials & sample codes so ramping up a new developer was very easy.

Now Flex is also community driven open source project under Apache Software Foundation OpenLaszlo now provides an extra feature over Flex (until FalconJS cross compiler is released) that it can run both Flash & Ajax runtime environment with a single code base .

But still Flex has an added advantage of having very good development environment (with integration to other Adobe designer tools) and good server side integration capability so for enterprise applications, Flex is a clear winner.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜