There are many reasons that I prefer web development with either Flex or OpenLaszlo. An obvious advantage they both share is the Adobe Flash deployment environment. The advantages of using Flash have been enumerated many times online, so I'll only focus in this blog entry on one of the advantages I appreciate most -- the ability to write to a single API without the need to concern myself with browser idiosyncrasies and conflicts.
When a developer thinks of writing in one language for just about any environment, the Java programming language and JVM come to mind. However, when it comes to dynamic behavior on the web between the page loads/refreshes, even JavaServer Pages and Java servlets must normally include some JavaScript or other ECMAScript implementation to support dynamic behavior between calls to the server. Java applets can provide richer functionality on the client side, but they have their own set of issues (which are sometimes overstated and applets probably deserve more attention) that must be considered when deciding on a web development solution.
The recent heated exchange between Brendan Eich (Mozilla) and Chris Wilson (Microsoft) via their blogs has obviously been big news in the development community and concerns many of us who have been repeatedly frustrated by the implementation differences between the two most dominant web browsers (Microsoft Internet Explorer and Mozilla family of browsers, but especially Firefox). The chance to have a revamped ECMAScript specification with a high degree of standardization across the major browsers does not seem imminent at this point.
In the current state of things, I find myself repeatedly appreciating the fact that I do not need to worry about DOM implementation differences, CSS implementation differences, or ECMAScript implementation differences between the web browsers when using Flash. Flash (or more specifically its developers) get to worry about those nasty issues.
Web developers have fought the different degrees of browser standardization since more than one web browser has existed. With all these years and only moderate standardization to show for these many years of work, it is difficult to be enthusiastic or optimistic about a day when the majority of each of the major web specifications (HTML, DOM, ECMAScript, CSS, etc.) are implemented in a standard fashion across all major browsers. Specifications such as HTML, DOM, CSS, and ECMAScript are not nearly as useful as they might be when all major implementations do not meet these specifications. With this in mind, the Flash environment continues to look better and better.
For me, the two easiest ways to develop to the Flash environment are Flex and OpenLaszlo. Both of these approaches provide an ECMAScript implementation. The difference here is that the particular ECMAScript implementation for OpenLaszlo (an ECMA-262 Edition 3 [JavaScript] subset) is designed to work across all browsers without the developer needing to concern himself or herself with browser specific details. Likewise, Flex 2 provides ActionScript 3.0 as an advanced ECMAScript implementation with static typing and class-based object-oriented features. The ActionScript 3.0 Overview describes this as having features of the ECMAScript-262 Edition 4.
For many years, I loathed JavaScript. I have since come to realize that it is not so much the language itself that I loathed as much as it was the fact that it never seemed to work the same across two different web browsers and sometimes did not even work the same across two different versions of the same web browser. However, it did not matter what it was that bothered me because the end result was the same -- like many others I avoided JavaScript to the best of my ability for many years until the Ajax phenomenon brought me back into the fold kicking and screaming.
The nice thing about both Flex and OpenLaszlo is that each forces you to use their ECMAScript implementation. Being forced to do something is not usually a "nice thing," but it is in this case. Because they are ECMAScript implementations, they are not difficult for developers familiar with JavaScript to learn. In fact, the OpenLaszlo JavaScript implementation is simply a subset of JavaScript that works across the browsers and, as such, requires the JavaScript developer only to learn which parts of the JavaScript he or she is familiar with is not in the OpenLaszlo implementation. This is easily identifiable in OpenLaszlo's documentation. Flex's ActionScript 3.0 is quite different from ActionScript 2.0 and adds many nice and powerful features, but it still has much of the same overall feel as its predecessor. In fact, when working with Flex or OpenLaszlo, I find myself moving from loathing of JavaScript to being comfortable with it and sometimes (do I dare admit this?) even liking it (especially in the case of the ActionScript 3.0 implementation).
I am probably more bothered today by the differences in DOM implementations between Microsoft Internet Explorer and Mozilla browsers than by the differences in ECMAScript implementations. Using Flash removes any concerns about browser DOM implementations just as it does for ECMAScript implementations.
With only faint, almost desperate, hope of the web browsers ever truly standardizing, common platforms like Flash continue to look better and better because they hide the inconsistencies and gaps that the browsers may never close. There are other alternatives to Flash either out there or in the works, but Flash (and the up and coming Adobe AIR [formerly Project Apollo]) seem to have a formidable headstart on the likes of JavaFX and Silverlight.
UPDATE (15 July 2008): In the blog posting The Browser Wars II: The End of Ajax, Richard Monson-Haefel points out that, despite hopes to the contrary with Microsoft's announcement of MSIE 8 being standards-compliant by default, there still likely to be many "browser wars" in the future. While Monson-Haefel is an executive at Curl and so is undoubtedly not without bias, I think there is significant merit to his warning. Of course, I'm biased too. While I don't work for any company in this space, I have developed many different web applications using different products and frameworks and the RIA plug-in approaches like OpenLaszlo and Flex (I haven't used Curl) are so much more productive for me that I've grown a bias in favor of them. It is nice to have browser discrepancies be "mostly" a bad memory.
UPDATE (15 September 2008): The blog entry HTML 5 Won't Be Ready Until 2022. Yes, 2022 is interesting.
No comments:
Post a Comment