Is OpenLaszlo's dual-runtime approach (HTML5 and Flash/SWF) still valid?
Asked Answered
C

4

7

OpenLaszlo is - as far as I know - the only rich Internet application platform with the following features:

  • Declarative XML based user interface language (similar to Mozilla's XUL) called LZX.
  • Cross compilation of LZX to either JavaScript or ActionScript 3 (therefore supporting two runtimes).
  • Ability to develop components using XML and JavaScript or JavaScript only; all components are rendered by OpenLaszlo, therefore they'll look identical across browsers and devices.
  • View system, keyboard and mouse management working across runtimes.
  • Component can be written in LZX (XML + JavaScript), or in a JavaScript only
  • XML datasets supporting XPath based mapping of components to dataset elements.
  • Layout engine supporting a number of pre-defined layouts; developers can easily implement custom layouts.
  • Powerful support for constraints using a simple syntax in XML attributes: $once{JavaScript expression} or $always{JavaScript expression}.
  • Built-in debugger (developer console) working in both runtimes.

I haven't seen any more modern JavaScript framework which makes it as easy as OpenLaszlo to create HTML5 applications - with the only downside that the current component set delivered with OpenLaszlo looks a bit like Mac OS back in the 90's.

But how valid is the approach of deploying an application as both HTML5/JavaScript application and as an Adobe Flash application (with the option of creating an Adobe AIR based mobile application, although that functionality is not build into the OpenLaszlo server directly)? I heard that Adobe tried to do something similar with the FalconJS compiler prototype (see this Adobe video Open Discussion about Falcon and FalconJS for more information), but they stopped the effort. The code of the FalconJS proof-of-concept will be contributed to the Apache Foundation as part of the Apache Flex project, but

It is surprising to see that there is not a single application utilizing both runtimes in the OpenLaszlo showcase section: http://www.openlaszlo.org/showcase

In an old Ajaxian article from 2007 I read that Laszlo Webtop's "final release will support OpenLaszlo 4, which will mean support for both Ajax and Flash applications". But the Laszlo Webtop demo site http://gowebtop.com/webtop/ has only a Flash based version of Webtop. I've read in this Stackoverflow discussion that Gliffy - one of the most impressive OpenLaszlo applications I know - has been rebuilt using JavaScript, not utilizing the dual-runtime capability of OpenLaszlo.

Are there any other large OpenLaszlo applications deployed as both HTML5/DHTML and Flash, which are maybe not listed on the OpenLaszlo.org website? Even if Flash is not that popular any more, it is still a relevant technology for a number of use cases (audio conferencing, 3d in the browser, GPU accelerated video playback, etc.).

Chignon answered 6/9, 2012 at 9:11 Comment(2)
Good question, based on some decisions made in recent months by some of the most prominent adopters of OpenLaszlo it doesn't look like it really works well: You mentioned Gliffy, another one is Apache OpenMeetings. The team is currently migrating to Apache Wicket and jQuery for the HTML5 version of the open source conferencing application. Here is the discussion in the OpenMeetings mailing list: "...OpenLaszlo project seems currently no more maintained. There has been no release since 2010 of the project."Aara
Re: "Are there any other applications deployed as HTML5/DHTML and Flash", our video editing application (sarolta.tv/web/sarolta-tools/template-editor.html) does have an HTML5 mode that works but does not play the audio and replaces videos with thumbnail images of the video, but that mode is not released to the public since we are not currently targeting mobile and everything else supports Flash. However, I'd probably use JQuery mobile to do it if I was starting over from scratch.Arletha
Y
5

I started using OpenLaszlo back in 2004 after I concluded at the time there was no better free, open-source RIA tool for my needs.

My apps currently leverage SWF and JavaScript runtimes. So just because they aren't in the now-dead Laszlo showcase doesn't mean there aren't large apps out there leveraging both runtimes. I've been working on my apps for 7 years. Gliffy is a tinker toy in comparison IMHO...I've yet to find any OL apps more complex than mine. Doesn't mean they aren't out there, but if they are I haven't seen them.

My apps would not be feasible with just one or the other runtime. So for me, having both runtimes is essential. HTML5 is too slow for certain things, while SWF10 offers the most consistent cross-browser experience.

Haxe is no OL replacement, that's for sure. The value of OL to me has been the productivity boosts gained from constraints, instance-based programming, and the ease in binding data to views. I could not have built my products on my own using any other tool. I looked far and wide. With OL in decline and now all but dead, I keep looking, too. OL's HTML5 runtime doesn't work in the latest IE versions, which stinks...but it can be made to run via IE7 emulation mode or the Chrome frame plugin (which is actually essential due to IE's crappy JavaScript engine).

Whether or not you need both runtimes depends on your project. While it probably doesn't make sense for compiler makers to be thinking that being able to emit both SWF and HTML5 runtimes is desirable, since OL has been able to do it for years now there are some systems out there like mine taking advantage of that capability.

As an example, my system is being used on military classified networks that don't allow the Flash plugin...so for those installations I must rely on HTML5. When not running on classified networks, my system leverages the runtime performance and other capabilities of the SWF runtime when it is advantageous. The hybrid approach is essential for me. If I had a SWF-only app it wouldn't be allowed on classified networks, but if it were HTML5-only portions of the app would be less than stellar due to browser limitations.

Yakutsk answered 6/9, 2012 at 20:45 Comment(3)
Great answer, and I didn't know that you are still using OpenLaszlo. If Laszlo would agree to contribute the source code to a foundation, I'd be more than willing to continue improve the platform. Back in January 2007, you said: "LPS4 has a lot of promise and will eventually be great technology, but not anytime soon IMO." It still could be a great technology, if Laszlo would open up the project for the community.Aara
Thanks, that's the best answer so far. Do you have any screenshots or videos of your applications online? I can imagine that there are other companies using the platform for large applications, but it's strange that Laszlo does not seem to be interested in reaching out to the community any more. Why did the open source the platform initially, if they are not interested in open source any more.Chignon
Hi Raju, OL was in the throes of adding the DHTML runtime, while at the same time breaking my functionality that used to work in the SWF8 runtime. They finally shored up both runtimes after I posted that, as I recall. I wish I had time to contribute to your efforts on Assembla, but I work nonstop on my products every waking moment and just don't have time to spare. Stevie, thanks and see link and linkYakutsk
A
2

I'll caveat this first by saying that it isn't going to be a complete answer; however, hopefully some of the information will be useful to you.

I looked at OpenLaszlo recently in relation to another question on Stackoverflow and it seemed to me to have all the hallmarks of a moribund project (on review, evidence here supplied by Raju in the comments).

In relation to Gliffy, this article provides a bit of insight into their rationale for abandoning OpenLaszlo. In particular, they mention the problem of compilation times and the effect this was having on their development time.

It definitely doesn't tick all your boxes (specifically, I don't believe there is support for a declarative XML-based UI language), but Haxe / NME appears to cover your core requirement of being able to compile to both Flash and HTML5.

Fair disclosure, I haven't actually used it but I keep hearing good things about it (I've just been to a creative development conference where I heard at least 2 speakers raving about it). It's essentially ActionScript 3.0 minus the major annoyances and plus the major omissions (Abstract classes for example). It should be easy to pick up, therefore, if you already know ActionScript 3.0, and a pleasant experience to work with either way.

Amandie answered 6/9, 2012 at 12:47 Comment(4)
Thanks for your answer, that's very valuable information. I wasn't aware of the Gliffy article. Compared to larger Flex projects - where compilation time can be up to 10-15 minutes, 30s does not seem that bad. But DHTML compilation is much, much faster. I have heard equally good things about HAXE, but they don't provide any components, right? That means I'd have to use different component sets based on the runtime I'm targetting.Chignon
That's my understanding but maybe somebody who knows more will chime in.Amandie
Had to look up the meaning of moribund: "Moribund refers to a literal or figurative state of near-death." That pretty much describes the situation.Chignon
Interesting, I investigated switching to GWT and GWT has drastically longer compile times than OpenLaszlo. It took nearly two minutes to compile a "Hello World" program using GWT so I decided not to use GWT. I agree with the rest of what you have said, I've heard of Haxe but have not tried it yet. Apparently it is maintained by a single developer from what I hear.Arletha
A
2

Even in 2012 web developers are still facing the problems Laszlo tried to solve when the company initially created OpenLaszlo. 10 years ago Flash was the only cross-browser technology delivering a pixel-perfect rendering for 97% of the desktop browsers, where the plugin was installed.
JavaScript engines, HTML and CSS have a lot more to offer now: Audio and video playback, embedding fonts, CSS based animation, hardware-accelerated rendering of content, drawing APIs, lately video conferencing support in some browsers (Chrome, Firefox, and Opera based on WebRTC). Modern browsers offer almost the same features Flash does, but there's still certain percentage of users browsing the web with an earlier version of Internet Explorer than IE9.
The requirements for consumer facing or business applications are still different: Many enterprises

Cross-browser application development
If you know the APIs and differences between browsers, you can easily achieve 80-90% of what you can with Flash based on open standards. But you still depend on the expertise of your developers, with Flash you have one ActionScript API, which you use across all browsers (at least for Windows and OS X, Linux has some limitations and is not well supported).

The LZX language vs pure JavaScript
LZX is still a fantastic language for building great UIs, using an established development approach. LZX has evolved a lot: CSS support, mixins, support for coding classes in JavaScript instead of XML, ability to embed ActionScript 3 code into the language are some of the new features.
6 years ago - long after LZX had been created - many developer didn't know how to write good JavaScript code. The prototype based development model wasn't well documented, and developers tended to use JavaScript like Java/OOP - resulting in horrible code. And even in 2012, with many good books on JavaScript out in the market and millions of excited JavaScript developers, building complex interfaces using pure JavaScript it not an easy task. There's a reason for the popularity of languages cross-compiling to JavaScript like CoffeeScript.
A large number of the developer who have used OpenLaszlo's LZX language and moved on to using JavaScript frameworks like jQuery or Prototype complain how much code is needed to achieve what can be done with a few lines of LZX code using datasets, databinding, replication, and the layout system. Many of the Flex developers switching to HTML5/JavaScript development complain about the same things. Having the power of LZX, and being able to cross-compile to both SWF and JavaScript is therefore still something extremely valuable.

OpenLaszlo and the Adobe AIR SDK
With the ActionScript 3 based SWF10/11 runtime, any OpenLaszlo application can be easily compiled into an Adobe AIR for Android or iOS application. Check this video I created back in 2010, showing an Apache Ant script compiling an OpenLaszlo app into an AIR for Android application and deploying the app to the phone. That workflow works with the latest (unreleased) version of OpenLaszlo 5.0. What's missing is, that there is no component set optimized for mobile and touch for OpenLaszlo at the moment. But it would not be too much work to create such a component set, if the active community members would be willing contribute to such a project. That means, you can use LZX to develop mobile applications with good performance on modern smartphones and tablets, without the need to learn Objective C or Java for Android development. Haxe is another open source project heavily using cross-compilation to target even more runtimes: JavaScript, Flash, NekoVM, PHP, C++, C# and Java.

Dual-runtime and cross-compilation for a better user experience
There have been a number of technologies in the past years enabling mobile app developers to code an app in one language, and cross-compile the code other mobile platforms. You can do the same with OpenLaszlo, and you could add other runtimes easily due to the modular architecture (components written in LZX, LFC written in LaszloScript/JavaScript, kernel written in runtime specific language, e.g. ActionScript3). But in my eyes there's an even more important reason to use a language like LZX, and cross-compile to JavaScript, ActionScript 3 or other languages or VMs. It has to do with the ability to create stunning visual effects and unique user experience, which is enabled by LZX, and difficult to achieve with pure JavaScript development.
Laszlo Systems and David Temkin (the former CEO and CTO of Laszlo) established the term Cinematic User Experience:

Cinematic user experience conveys first of all that you aren’t just watching you are interacting – the “user experience” part of it. We thought cinematic was an intriguing term, that had a non-techie spin to it. It was something that when non-techies saw it, they instantly understood this is a completely different type of product category and yet industry insiders would look at it and say things are moving on the screen, maybe you have a different technical architecture…

One of the goals of OpenLaszlo and LZX was to enable the creation of such Cinematic User Experience, by giving UI engineers the APIs and the tools in the programming language (LZX) to exactly reproduce the experience created by UX designers using tools like the Flash authoring tool.

Here's a quote from a book on iOS app development, showing that other companies see the value of such an approach:

One of the concepts that Apple engineers like to talk about when they’re talking about beauti-ful user interfaces is the concept a “cinematic user experience.” A cinematic user experienceessentially is a user interface that looks like something from a Hollywood movie. It looks futuris-tic and smooth, and it uses animation to enhance the feeling of working with physical objects.
Apple user interface designers have specifically given you a set of tools that enable you to buildthese types of cinematic user interfaces. Tools like Core Animation give you the power to builduser interfaces that involve elements that slide in from off-screen rather than just appearing,and elements that scroll with an almost physical weight to them

LZX and the cross-compiler give us the tools to create this special user experience. You could do the same with JavaScript, but it would be more code, and probably much more difficult. A good example is the first OpenLaszlo application running in DHTML, the LzPix demo: Created in 2006, it's still an amazing UI - and I haven't seen anything like it built with JavaScript frameworks.

Dual-runtime is still valid
Yes, the dual-runtime approach is still valid. There should be more applications in the showcase using the DHTML runtime, and I don't know why that's not the case. The fact that OpenLaszlo has not been optimized for the iPad or tablets is definitely a disadvantage, but the DHTML runtime could be optimized for iOS and Android. If the desktop browser quirks are removed, a new component set would be created optimized for mobile browsers (utilizing HTML canvas and CSS2/3 to render the compoents), you'd have a solid mobile runtime for OpenLaszlo.

Aara answered 6/9, 2012 at 23:11 Comment(0)
A
1

We chose OpenLaszlo back in 2006 to implement our Online Video Editing application (http://www.sarolta.tv/web/sarolta-tools/template-editor.html) after two attempts to create it using different platforms.

The first failed attempt was using DHTML but the complexity of doing this in pure JavaScript+HTML and browser quirks that made the code work differently in different browsers prevented the successful completion of that attempt.

The second attempt was using pure Adobe Flash but the timeline-oriented nature of Flash was a foreign concept to the developers which made it difficult for them to create what was wanted.

Finally, OpenLaszlo was chosen which was an intuitive mix of XML plus JavaScript which anyone with a little bit of experience with OO-programming and Web design could pick up easily to build complex applications in Flash. At that time OpenLaszlo only supported Flash, but every browser on every OS supported Flash. We liked that Flash was cross-platform in that the code would function the same way in every browser which was not the case with JavaScript-based DHTML applications. At that time 97%+ of the systems out there supported Flash so there was also no need for the user to install any software for our application to work on their system.

As a start-up company with a limited number of staff the resources to build and maintain multiple versions the application for different browsers and OSs did not exist, OpenLaszlo solved that problem back then.

We were happy when OpenLaszlo added the DHTML run-time and when we heard that IBM was working on a (now abandoned) Java run-time for OpenLaszlo since this would mean our code would be compatible with the emerging mobile market and other devices. Unfortunately, not much work has been done by any official OpenLaszlo developer working at Laszlo systems since Oct 2010 so the DHTML/HTML5 run-time has seen no improvement since then.

I do think the write-once run-anywhere approach is something that is still highly desirable even today. Being forced to deal with browser and OS quirks that make your application work differently on different systems is a nuisance and requires a lot of maintenance time. I think the reason why JQuery and especially JQuery mobile is so popular today is because it is designed to be cross-platform and it invisibly deals with the browser/OS quirks for you so you don't have to worry about it. JQuery mobile supports just about every platform:

http://jquerymobile.com/gbs/

So, I think, the dual-runtime of OpenLaszlo is still valid, but maybe the question is if OpenLaszlo is still valid after nearly two years without any official release while other JavaScript frameworks are constantly improving and evolving to replace the need for it.

Arletha answered 7/9, 2012 at 0:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.