Discover cascadingStyle

Web Apps and the Browser Paradigm

Yaniv Golan has an interesting post on his blog about the Flex demo he saw at FOWA. His arguement is that he doesn't get how Flex can be useful when it locks people down to a single "platform" (though as he admits, Flash is pretty ubiqutous). He counters with saying that with ASP.NET one could create applications that run the same as Flex apps that publish to XHTML, CSS, and Javascript.

He doesn't mention that in that scenario we're really just swapping a proprietary front-end for a proprietary back-end. ASP.NET servers need IIS (read: Windows). Flex can run on any server and in any browser provided the end-user has Flash (9).

His main point, however, is interesting. What is the benefit of Flex vs. its main look-alike, the open source OpenLaszlo? This is something I've debated with myself and others over and the only major benefits I can see either way are going to come down to end-user target platform and development nicities.

Flex has Flex Builder 2 with a drag-and-drop GUI that can handle just about all of the basic GUI construction and theming that any designer/developer team could need. OpenLaszlo (right now, anyway) doesn't have this that I'm aware of. OpenLaszlo publishes to Flash 7 and now with their Legals release, to DHTML (XHTML, CSS, and Javascript) and they have announced support for Sun Microsystem's Orbit platform, which will let them publish to J2ME (Mobile content anyone?). Flex will publish to Flash 9 and Apollo.

Both are aimed at making web applications. Web applications function completely different than the standard website and in most cases need to defy the web's "page" structure. So if web applications are going to break the functionality of the web browser paradigm anyway, does it matter anymore if they are deployed in Flash or DHTML (AJAX, XHTML+Javascript, what have you)? My gut says no, but in dealing with clients who often demand pixel perfect consistency, it might be easier to deploy in Flash...an environment that has always looked the same cross-browser and cross-platform.

one other point to clarify regarding the Flash 9 player is that it will play all versions of swfs, but it contains 2 distinct virtual machines that run independently, so (for example) if I have an app built in Flash 8 AS2 I can load it into an app built in Flex (Flash 9 AS3), but there is extremely limited interaction between the 2 swfs. The only way to communicate between them is using a local connection so it is probably easier to refactor them in AS3 and gain the additional speed and performance.

@Yaniv:
"In fact, my point about ASP.NET in particular, is that when combined with MS AJAX, the development productivity is very similar to that of Flex."

I can see where a development toolset that streamlines production of AJAX apps could provide similar benefits to those provided by Flex for the developer, but they don't improve things for the user really. At the end of the day, you deploy and are too dependent on the client's os/browser combination to define the user experience, look/feel and functionality of your AJAX application. With Flex/Flash based apps you set the bar at: "any OS/Browser that runs the Flash player" and you are good to go.

@Chad "Try running a ASP.Net site on Safari sometime."

I feel your pain on this one! Which brings up the next question, since the word on the street is that Apollo will contain the WebKit browser that Safari is based on and is also said to support AJAX, i wonder if we will have the same AJAX issues with Apollo apps!

I have to side towards the argument I'm deriving from Chad.

The flash player as it is, has an installed base that extends ubiquitously across all platforms at the moment. It has increased rapidly in not only penetration rate, but in terms of "what it can do." And hopefully with new developments in the core flash utility (deep linking within swfs comes to mind almost immediately) we will see it (and in turn Flex) become a (if not THE) standard. I cannot really comment on the ASP.NET + HTML/CSS/Javascript side of the argument because frankly I have had very very very minimal experience with ASP.NET.

However (and this is not MS bashing), like most Microsoft applications they tend to create their own proprietary system that basically goes against all standards set. *cough*IE/Validation*cough* (i'm kidding....i'm kidding....but not really) So while the application model for A+H/C/J may be more familiar to the user, that does not a better model make.

That's where I'll end because it seems like I'm bashing...and i'm losing my train of thought/ranting.

@Yaniv: "this is where ASP.NET, RoR, OpenLaszlo etc become relevant, since they produce the same standard output using an application model familiar to the user, with considerably reduced development cost."

- From my experience the code and client side markup generated by ASP.Net is not always the same from Browser to Browser. Try running a ASP.Net site on Safari sometime.

It looks like Djtriplej's comment got truncated above, but he has a good point about Flash 9 so I'll try and finish it: Flash player 9 will play SWF from Flash 8 and earlier, but for Flash 9 and Flex SWFs it has an entire second VM. It may share some internal parts with the other, older VM, I don't know that; but it does perform considerably better than the previous, and supports ActionScript 3, which has numerous language features missing from previous ActionScripts -- E4X, Regexp, and an improved object model. This definitely gives Flex a significant head-start over Laszlo, even without involving Flex Builder 2.

It will require users to upgrade the Flash player installed in their browser if they haven't already, but as many sites and/or browsers have supported doing this almost automatically for some now, the adoption rates for new Flash player versions have tended to be quite fast.

Brian,

"He doesn?t mention that in that scenario we?re really just swapping a proprietary front-end for a proprietary back-end. ASP.NET servers need IIS (read: Windows). Flex can run on any server and in any browser provided the end-user has Flash (9)."

Just to be clear - in the context of my post (client side technology), ASP.NET & IIS don't matter - they're just tools that are used to deliver a standard compliant application to the client. Of course, ASP.NET & IIS are proprietary, but they cannot be compared to Flex - Flex is a client runtime technology while ASP.NET & IIS are server technologies. The real comparison is between HTML+CSS+JS and Flex.

Now, when you try to compare these, the cost of development becomes a real issue in the case of HTML+CSS+JS - this is where ASP.NET, RoR, OpenLaszlo etc become relevant, since they produce the same standard output using an application model familiar to the user, with considerably reduced development cost.

In fact, my point about ASP.NET in particular, is that when combined with MS AJAX, the development productivity is very similar to that of Flex.

Mind you, I think that Flex 2 and the builder are impressive, and I applaud to the engineers who designed and implemented them. My point is that with comparable engineering effort you could achieve most of the objectives of Flex without the downsides I mentioned - non standard, and breaking the RUB behavior expected by users .

I think the big difference in the Flex/Flash vs an ASP.NET generated XHTML/JS/CSS solution is that with the Flex solution you have a controlled environment on BOTH client and server. If the user has the ubiquitous Flash player, the app works and looks as intended, period. With what is basically an ASP generated AJAX app, you are dependent on the browser's implementation of CSS and Javascript, (as well as system fonts available, etc) to determine the look and feel and functionality of your app. You can never be 100% certain that an AJAX app works everywhere unless you do extensive testing so the time to market for the app built in Flex is going to usually be shorter than the same app in a server side AJAX creation scenario.

I have been building "AJAX" apps since way back in the 1900's before the neat acronym, and I certainly consider that a reasonable solution for user friendly browser based application development, but Flash (and even more so Flex) put the "rapid" in "rapid application development" and I can sleep better at night knowing that the everyone using the apps I release is having the same consistent experience I intended.

To clarify on the F8, F9 player comment, the Flash 9 player will play any swfs (Flash 4,5,6,7,8,9 etc) but the player contains two distinct virtual machines (one for Actionscript 1 & 2 based swfs which are

John,

Sorry I forgot to mention Flash 8 capability in OpenLaszlo. I also didn't mean to imply OpenLaszlo is a Flex copycat. Believe it or not I was crazy about OpenLaszlo before I was even aware of Flex. To this day it blows my mind to think that Pandora (www.pandora.com) is an OpenLaszlo project.

Slight correction: the OpenLaszlo 4 release (now in Beta -- OL4 used to be called by its code name "Legals") compiles to SWF7 or SWF8 (in addition to DHTML). Applications compiled to SWF8 run in the SWF9 player.

The OpenLaszlo team has announced that it will support SWF 9 optimizations in a future release, but has not given a date.

It might be more accurate to say that Flex is an OpenLaszlo look alike, rather than the other way around, since LZX predates MMXL by two years or so :^)