This weekend I started using Twitter in earnest (I am hankwilliams on Twitter by the way). I have had an account for a while but sent my first tweet this weekend. In order to use Twitter comfortably, a desktop client is required. I decided to use Twhirl, which seems to be the most popular. Twhirl is written using Adobe AIR, which is a tool that allows you to create desktop applications using either Flash/Flex, or HTML/Javascript. Using a new AIR app got me thinking about the state of desktop web applications.
Many moons ago, during the timeframe of the AIR launch, Google Gears was also launching, and it was being compared to AIR since its mission is also to provide a platform for web developers to move their applications to the desktop.
In the AIR vs. Gears battle, AIR is on the verge of a TKO.
There are *lots* of applications coming out that were written with AIR and almost nothing written with Gears. Even Google’s own applications have, for the most part, not been ported.
The reason for this domination is very simple. Flash/Flex is designed with the idea that you write your entire application to run on the client. Then you communicate small bits of data over the Internet. None of your behavioral/user interface code resides on the server. This model is the opposite of the way most web applications are built, where most of the code driving the user interface sits on the server. But the Flash/Flex client side model is exactly what you need for writing desktop applications. This means there are millions of Flash/Flex developers with the requisite skills, tools, and experience in the required development model for AIR applications.
On the other side of the aisle, Gears also requires that you write all of your application logic on the client side. The key problem with this is that Gears requires you to write an entire client side application using Javascript. But while Javascript is very popular, Javascript programmers are used to writing little bits of their code in Javascript with the majority of the application being written in PHP or Python, or Ruby, etc. on the *server*. As a result, there are essentially no applications that can be ported from Javascript to Gears directly. Writing to Gears requires a rewrite of your application. But not only does it require a rewrite, more significantly, it requires a re-thinking of your entire development model.
So, while Gears requires using Javascript in an entirely new way, many Flash/Flex apps can be ported to AIR with a few clicks.
The bottom line is that writing substantial applications using just Javascript on the client side is a major shift. And because Javascript is a crappy, non object-oriented, super old school language, it is really no fun to write big things in. In fact there are a variety of tools such as GWT (Google Web Toolkit) and Haxe (pronounced Hacks) that allow you to compile higher level languages to Javascript. GWT compiles from Java to Javascript and Haxe is its own language which is essentially a much more modern, object-oriented version of Javascript. In essence, these kind of tools treat Javascript more like a form of assembly language than as a modern language, which, indeed, it is not.
And so it appears Gears is being killed by AIR. Or perhaps, based on its lineage, Gears was just stillborn, DOA.
Monday, April 14, 2008
Subscribe to:
Post Comments (Atom)

16 comments:
Just a quick FYI - Javascript most certainly is object-oriented. It's also not quite as old-school as you think ... at least in the sense that it's achieved a good bit of "retro cool" in recent years. Some pretty savvy developers (most notably, Steve Yegge at Google) have recently been embracing the use of Javascript *out* of the browser, as a language for hard-core development. (See: http://steve-yegge.blogspot.com/2007/06/rhino-on-rails.html)
That said, I'm not sure I'd personally want to follow that approach. But the one thing I did take away from this is that Javascript is a lot more capable than most people give it credit for.
http://en.wikipedia.org/wiki/Javascript#Features
I find Digsby really useful for Twitter. It's a multi-protocol, cross-platform IM client with Twitter, Gmail and Facebook support. I like to have everything in one client, when possible.
The DOA of Gears may be true, but it has nothing to do with Gears sucking or AIR being awesome, per se - it has to do with the suckiness of the Gears model - internet-based development with a 'patch' (i.e. Gears) to make it work locally, without the internet.
So, comparing Gears to AIR is like comparing my bicycle to tow truck - not all that useful without more context.
Google decided, for now, that they didn't want to be in the business of desktop application development - it's not scalable in a way that makes sense for them - they'd rather go the Salesforce SaaS route - and who wouldn't? Gears is just a band-aid to give corporate IT managers something to throw out as a response to those whiny 'But!' business employees who would rather IT guys spend their days reinstalling desktop apps instead of home with their families.
Said more succinctly, Gears was never to be taken seriously - which is why so many of the Web2.0 crowd hailed it as the Second Coming - many of them have zero common sense. Google is good, but they're not good enough to make a failed technology work. It's a failed paradigm - nobody is seriously interested in it. If lack of network connectivity is going to keep businesses from adopting Google Apps, then so be it, because building AIR apps would be suicidal to Google's margins.
Cloud or bust. If it doesn't run in my browser, I'm not interested in it.
"Just a quick FYI - Javascript most certainly is object-oriented. It's also not quite as old-school as you think ... at least in the sense that it's achieved a good bit of "retro cool" in recent years."
Just as a quick FYI, I have been developing in flash and then flex for the last 5 years. Flash's old version of actionscript which was equivalent to JS was effectively deprecated about 3 or 4 years ago. So I am pretty familiar with the current javascript and the new proposed javascript (contributed by Adobe) which is being built into Firefox.
The bottom line is that javascript, by all measures, including the current creators, is a very old language that is not, even by them considered modern. Regarding the object-oriented question, I dont know how you could call something without classes object oriented. If you do then you may call it object oriented. Those of us heavily engaged in the transition between the old version of the spec and the new one did not at all consider what JS to be object oriented in any meaningful way.
Peter,
"Cloud or bust. If it doesn't run in my browser, I'm not interested in it."
I guess you don't twitter?
I guess you don't twitter?
correct. :)
but, point taken.
on the other hand, an SMS-enabled device (or choose your protocol) requires only extremely simple software - an SMS client - a thin/dumb client.
Adobe AIR is a full-on, bloated, thick client, like Java for the desktop, round 2. And some of those other new age disasters - Silverlight, etc. - I can't wait to see some of the fail stories that this 'software' produces. Let's just call it what it is - failware.
if folks want to replace the browser - fine by me - most browsers are atrocious anyway, so why not try for something better? I just don't plan on being part of the R&D crowd that, for the next two years, is busy documenting all the ways that this new, bulky, flashy software called Java...doh!...i mean AIR, slows folks' macbooks to a crawl - i'd rather get some work done.
:)
>I dont know how you could call
>something without classes
> object oriented.
Easy: it's "object" oriented, not "class" oriented, hence: "object oriented".
Classes have nothing to do with Object Orientation... Encapsulation and Polymorphism in it's various shapes/froms don't need classes.
(Cue: philosophical debate on what's Object Orientation")
"...JS to be object oriented in any meaningful way."
You should really check out what they're doing in the modern JavaScript frameworks (jQuery, MooTools, Prototype). The extensions on the base types are awesome. Sure, JavaScript doesn't have a compiler that type checks, or namespaces, or an increasingly Java-like syntax, but some people really don't want that.
Personally, I prefer writing expressive code, and that isn't how I see ActionScript 3 (although 2 let you do some pretty funky stuff). If they do go all the way with ECMAScript 4, I will be right back on the bandwagon. Believe you me.
Sorry Hank, everyone's right, JS is object oriented. It just uses prototypes instead of classes. (Although I do agree with you that it's an old language.)
But anyway, back to the subject. I don't understand how Gears stands a chance at all. The thing that makes AIR clearly superior (besides the points you made) is that it turns your web application into a desktop application. Gears just runs your web app offline. Not a huge difference, but a significant one in my opinion.
To be honest, I think Gears and a lot of other Google products are completely pointless. Google is trying to be the one-stop place for everything, but when people start realizing that half of their products suck, they'll switch and Google will lose a lot of customers. But maybe not. I don't know.
Yeah, ok you can call prototype based languages object oriented. But in the real world I saw the transition between prototype and class based OO and I have to say that it was night and day. There is *no one* in the Actionscript community that was not ecstatic when we went from AS1 to AS2. i.e. from prototype to class based ecmascript.
In addition to reaffirming that Javascript does objects (including fantastic JSON object literals), I've got to take issue with your claim that GWT lets people write Javascript in a "higher-level" language. JavaScript is actually higher-level than Java: it's dynamically typed, has first-class functions and metaprogramming, and even (in recent version) include domain-specific mini-languages for XML, regexes, etc. JavaScript's only real failing, currently, is that there's no "batteries-included" standard library, like Python and Ruby have... it's a lot like Lua in this regard: very useful, but you have to build a bunch of stuff from scratch.
Ah, I noticed that too, I forgot to comment on it.
To be honest, I used to love JavaScript. It was the best language ever because it has no rules at all. "Do whatever you want." But then I decided to stop playing around and actually write a decent web application. And then I realized why there were classes and inheritance and all that stuff in *real* programming languages. It's so much nicer to work with a group of classes in Python than a bunch of hacked-up pseudo-classes that take up twice the space and are 5 times as hard to read in JavaScript. I never really appreciated languages like ActionScript 3.0 before, but now that I started messing with Flex, I'm in love. AS3 is just so much nicer to look at than JS. And it's fast, too.
Object oriented programming is deprecated.
Hmm AIR is killing Google Gears???
MySpace(the New Messaging system in beta testing) uses Google Gears. Google gears might require a lot of coding, but it is easy to code the javascript stuff and you dont need to rethink your development model to implement some stuff in Google Gears. Google has been more development friendly than Adobe too. Plus Actionscript is nothing but Adobe's extension of Javascript
I have to agree with most of your post, but I do have to disagree with some of it. You claim:
"...Javascript programmers are used to writing little bits of their code in Javascript with the majority of the application being written in PHP or Python, or Ruby, etc. on the *server*...". Well, there's a bunch of programmers who use any AJAX Framework and program everything on Javascript. Also, Javascript is OOP. On the other hand, if it were up to me, I'd ban Javascript from any development. It sucks! And debugging Javascript is on my 10-most-hated-programming-tasks list. Anyway, nice entry on your blog!
Post a Comment