The Browser Love Affair, RIA and JavaScript as the 'new byte code'

Published 12 February 09 06:42 PM | mrdecav

Jump to a section of this article:

Why do consumers love the browser?

One of the things I still have not fully understood is the consumer's affection for the browser.  Unlike desktop applications, consumers seem to feel more comfortable and safe in a browser.

Perhaps it is the familiarity, always knowing where you are with a URL, the 'safety' of not messing up your computer, the security of having data stored in a cloud where it doesn't need backup, or the easy way to get away from where you are with the back button.  Add to this the familiarity of having an interactive 'page' over a bunch of forms and dialog boxes and popup windows, and the element of design and simplicity on the web, web developers were quicker to embrace a "less is more" approach, and web pages are typically thought through and designed by professional designers more often than desktop applications.

When you take all of these things into account, it makes a bit of sense why consumers have shown a preference for web based applications, and it is no surprise that most of the WPF applications we've seen emerge have followed the same basic browser concepts (back button, page like UI, navigation at top, hyperlinks, etc).

For someone who tries to stay away from web development, my recent past has been riddled with all the latest buzz-words on the web - Silverlight, Flash, AIR and JavaScript are all tools that I've had to engage with.  I've built trading systems in Flash and my most recent application is RIA in HTML + JavaScript...  None of these platforms have had the allure of WPF for me, the developer, but its what clients have asked for, and clearly what consumers are interested in.

 

Who is winning the war in RIA (Flex, Silverlight, HTML+JavaScript)?

Why is it that we feel the need to place browser chrome around everything, and when we do, what platform has emerged as dominant for the new breed of complex applications (Google Maps, docs, etc) that we've come to expect in the browser?

With out a doubt, HTML and JavaScript has been a hands-down winner.  Why is it so hard to name a single site that is a pure Flash or Silverlight application.  HTML + JS is certainly not easier to program, and Flash is now ubiquitous, so the concern of requiring a plugin is not there, is there something about interacting with the native browser, not a plugin, that has some appeal. 

I have become a firm believer that as a non-software company, it is your interest to leverage Microsoft-based development technologies as much as possible.  The ability to quickly get things done in .NET and its surrounding technologies is unparalleled.  When you are a software company though, it is much harder to justify.  Tying yourself to Microsoft, one who likely is or will become a competitor in your space is risky.  Hiring good web people (if you're a web startup) is harder because the .NET development culture tends to do things "the Microsoft way". And your acquisition story becomes limited (Google, eBay, Facebook, etc is less likely to by a .NET based system because it doesn't fit in their infrastructure).  For this reason, it may be clear why Silverlight is and will not become the dominant application platform on the web any time soon. Perhaps many web companies have the same fear of Adobe Flash.  By contrast, HTML and JavaScript is "open" and is not dominated by any particular entity.

The decision of most web companies to stick with HTML, despite the rich features of other platforms, is simply a business decision.  HTML will always be there, is relatively reliable, relatively backwards compatible (Adobe is pretty good at breaking builds of older code with newer versions of Flex), and does not tie you to the whims of any one company or platform.

 

JavaScript as Byte Code - C#, Java, etc to JavaScript Compilers and Cross-Compilers

HTML is great for document layout.  Its fast, clean and everyone knows it.  Sprinkle a bit of JavaScript on that, and you have a nice interactive document.  But HTML was never designed to be the basis for an application platform, and really is a pretty poor application platform.  But despite the features of other platforms, and the number of times HTML and JavaScript is pronounced dead, something breaths life back into it.

It started with FireFox, and continued on with the awefully impressive Google Maps.  Google has a large interest in keeping the browser alive and relevant.  The longer it does so, the longer it has a platform on which to compete with Microsoft that is already deployed to 99% of the world's user base.  A "Google Flash" may not be feasible, because of the deployment nightmare involved, but as HTML evolves with offline capabilities, richer CSS and faster JavaScript engines (see Google Chrome), it becomes a platform that can largely compete with the rest.

And for this reason, Google has cleverly turned the browser into their own RIA platform.   The "Google Virtual Machine", as you may call it.  To do this, they've leveraged the existing tools that Java has to offer, and created Google Web Toolkit - a Java compiler that can compile Java into cross-browser JavaScript.  And on the client side, they've added Google Chrome.  You can easily consider Google Web Toolkit and Google Chrome to be a full RIA platform, with JavaScript as the byte code transport.  And not only that, but its an RIA platform fully backwards compatible with the existing deployed base of browsers.

Perhaps the most interesting thing is that Google Web Toolkit is not the only JS or cross-compiler.  A variety for compilers have been built for this purpose.  Microsoft Research has Script#, which compiles C# to JavaScript, and a bunch of projects use JSC, a cross compiler that compiles MSIL into JavaScript (and therefore any .NET language).  With a whole variety of tools out there by different vendors to compile to JavaScript, it appears that JavaScript has become the new universal byte code.  It can be processed by a whole variety of browsers, and produced by a variety of tools - one of the only computing platforms that that is true for.

And compiled JavaScript can also be pretty fast and make applications that are rich and look good.  While it doesn't compare to the offerings of Cocoa, WPF or Silverlight, the quality of application that can be achieved is good enough for most consumers.  In the case of GWT, it is not only fast, but also efficient - and best of all, code can be shared amongst client and server.

 

I don't like HTML as an application platform, and I am not very fond of running every application inside the browser chrome.  But as business strategy and deployability have become increasingly important to me in my recent venture, an RIA application based around the native browser has become my platform of choice.  Cross compilation, in my experience, has proven an effective way to make a very rich client that can even handle push-data.

Comments

# Anonymous said on February 13, 2009 03:40 PM:

Consider the process of starting an app for the first time: open browser, find app, download installer, find installer, install, run. With a web app, you only need the first two steps (download is debatable). With desktop apps, you have to make a conscious decision to install them. If you navigate to a page, you're already running the app; the choice has already been made.

Firefox and Chrome both have solutions for those who see browser chrome as an issue. It's a matter of taste and screen real estate. Even Chrome with full UI is quite spartan. Its tabs aren't functionally different from the Windows task bar.

I agree that HTML and JavaScript are not ideal. Backward compatibility be damned, I would like to be messing with XHTML 2 and JS 2. But still, it has always felt more accessible from a development standpoint. I didn't need a special IDE or have to wait for a compiler, or worry about variable types.

Also, you didn't mention CSS. Is there any analogue to that? It's convenient to have general rules for how and where elements appear, so that you can just throw them in at any time.

The web also has features available to power users: bookmarklets, user scripts, user styles. It's more social too. Suppose I make something in a desktop app that I want to share with my friends. Unless they have it installed too, it's impossible for them to view it or interact with it. With web sites, content can be made accessible to every browser on the planet instantly.

# Anonymous said on February 14, 2009 04:54 AM:

um yeah but i also love my tv too as opposed to going to the cinema

# Anonymous said on February 14, 2009 06:51 AM:

The fact that users find safety in web apps astounds me. Considering that the web and email are the origin of basically every piece of malware known to man.

Part of the problem with rich clients is that they haven't done a good enough job of selling the deployment advances they've made. Like Vezquex up there who talks about the pre-2005 deployment sitution. ClickOnce solved that one pretty good. Hell just go to any WPF component vendor and they all have XBAP's demoing their grids and toolbars.

Ah well... patiently awaiting the day when the markup language designed to format research documents is no longer a viable "platform" for applications.

# mrdecav said on February 14, 2009 03:00 PM:

@Josh

Yeah, I agree that the deployment situation, at least on single platform, has been largely solved.  Why people feel safe in the browser chrome is hard for me to quantify, but the fact that people seem to like that environment is undeniable.  The reason XBAP and Silverlight live in the browser is because it is the environment people have come to expect.

I also want to see something better.  Developing in HTML is a nightmare compared to WPF or any other framework designed for actual UI work.  Unfortunately, it seems like where its at for the moment, and right now, I have a hard time arguing with potential customers when what I want to achieve is actually possible in the format they seem to want it in...

# Anonymous said on March 7, 2009 06:37 PM:

good enough is the enemy of great.

# Anonymous said on March 9, 2009 04:07 AM:

Thank you :) great post

i think MS also released ASP.NET controls as "something to be compiled into javascript" as far as i know

# Anonymous said on March 10, 2009 11:12 PM:

I'll tell you why *I* love the browser - it's like watching TV in one wild channel surfing session. :)

Of course HTML/JS is more prevalent - it's been around for longer. But I believe the future belongs to graphically richer RIAs like Flex/SL/JavaFX (especially Flex because of maturity/penetration).

# Anonymous said on May 22, 2009 03:29 AM:

Currently, GWT generates separate optimized javascript files for the major browsers. It would be a small step to generate a true bytecode for their Google Chrome browser. That would save the browser from having to parse the javascript source. This would give their Chrome browser a significant speed boost over the competition and make the browser more competitive with other RIA platforms.

Leave a Comment

(required) 
(required) 
(optional)
(required)