CSS 2008 – Wednesday – RIAs

Following on nicely from last night’s BOF, my main focus today was frameworks for building RIAs .

I attended presentations on JavaScript (“Becoming a JavaScript wizard”, by Bryan Basham), Flex & OpenLaszlo (“Applying Flash to Java”, by Dustin Marx), and Appcelerator (“Building RIAs with Appcelerator”, by Matt Raible).

Matt has already posted his presentation on the web, and I am impressed to see that some of the Appcelerator developers have already commented on his blog entry. I won’t therefore spend any more time on it, as you can read his views direct from the source. If you’re interested in what’s been going on at CSS, it’s well worth visiting his blog as he’s also posted on other presentations he’s attended. You can find his Spring 3.0 presentation there too.

Bryan Basham’s presentation on JavaScript was very rich, so he had to take it at a very fast pace. He began with a language overview, pointing out some of the features and idiosyncrasies of JavaScript. An interesting point for me is that while you can mimic some object oriented behaviour with JavaScript, the language is not class-based, but prototype-based. This is a feature which brings in a number of complexities for design and memory management. JavaScript is a very flexible language, giving the opportunity for a number of different syntaxes for the same idioms (e.g. defining functions), and also providing some nice features like closures. It is also a dynamically typed language. While there are benefits to this flexibility, I do feel, however, that the price is reduced readability and maintainability, especially across a large group of developers.

After summarizing the language features, the presentation moved deeper into AJAX, DOM handling and the benefits of using JavaScript frameworks, focusing on Prototype and script.aculo.us. There are any number of frameworks out there, and another one which Bryan mentioned that seems to be gaining in popularity is ExtJS. This was also backed up by a comment of Matt Raible’s at the end of his presentation “if you want to use REST, choose either Flex or ExtJS”.

Matt Raible has saved me a great deal of work, and also posted a great summary of Dustin Marx’s presentation on Flex and OpenLaszlo which goes into far more detail than I could go into here. Key points for me are that Flex is split into MXML, for building the presentation, and ActionScript for business logic. Additionally ActionScript is an object-oriented language with static typing. (By the way, both JavaScript and ActionScript are compatible with ECMAScript). His experience of starting programming with Flex was that it was remarkably easy to get started, and that the resulting code was very readable.

OpenLaszlo is a language which can be compiled to either Flash or DHTML. Unlike Flex is it available for Flash versions prior to v9, although this is not generally a blocking point as most people seem to have Flash 9 installed. As it less performant than Flex, it is probably not a preferred option, unless targeting multiple platforms, or sticking with 100% open source, is a particular concern.

One thing he mentioned, which i would like to play around with, is the use of swf objects to communicate between two different flash instances in the same webpage. This is partly related to another concern I have with developing an RIA in either Flex or JavaScript, namely how easy is it to modularize the system.

A very nice link is: http://www.jamesward.com/census/, which gives benchmarks for data loading & presentation for RIA using a number of frameworks. A point which Anton Bar had touched upon in his presentation on Open Web was that Flex is more performant than JavaScript.

Attending these presentations strengthened my gut feeling (and I should stress that I don’t have real world experience with either language) that for RIA development, Flex is the way to go. One main consideration which I think is often overlooked are the issues of readability and maintainability. Whilst the use of JavaScript frameworks can ease this issue, I still have the feeling that Flex is better structured.

One thing that no-one was presenting on was JavaFX. Generally the feeling seems to be that no-one quite sees yet where JavaFX will fit it. I see that the JFall conference in November is featuring a number of presentations on JavaFX… it will be interesting to see if this provides a deeper view into JavaFX.

Leave a Reply

Your email address will not be published. Required fields are marked *