?

Log in

No account? Create an account
A whole lotta buzzwords - Arvind Narayanan's journal [entries|archive|friends|userinfo]

A whole lotta buzzwords [Sep. 19th, 2007|07:03 pm]
Arvind Narayanan
[Tags|, , , , , ]

I've been busy writing a web app. For real. Which is great, but after a night or two of nonstop web programming I can't stop seeing DOM elements everywhere even when I'm not staring at the computer. I look around my room and it's full of DIV's. If I see objects lying around on a table, I briefly go "oops, need to decrease the CELLPADDING on that," before pulling myself together. So you can imagine my shock when I walked into the office kitchen and saw this:



Fortunately it turned out to be just a bottle of dishwashing liquid and not a hallucination.

It amuses me when people still talk of AJAX as being "the wave of the future" or whatever. AJAX has been the wave of everything for 3 years now. 90% of today's desktop apps have no reason to exist, and if they haven't migrated to the web it's pure inertia and incompetence.

That said, javascript is a pile of dung. The language is terribly limited for the kind of things you're trying to do on the Internet. (No builtin to walk a DOM tree? Seriously?) And if you try to use more than one library, you're going to get namespace collisions! Holy crap, what century are we living in? Add to that the flaky implementations, the CSS incompatibilities and the horror of debugging* and you're looking at a system that makes BASIC programming seem elegant.

I can't wait to get done with the frontend already and retreat back to my server-side python nirvana.

P.S: there's an excellent rant from yesterday by Joel Spolsky on the messed-up AJAX situation.

*What the hell did people even do before Firebug existed?
LinkReply

Comments:
[User Picture]From: haran
2007-09-20 03:35 am (UTC)
90% of today's desktop apps have no reason to exist

Web-based apps have many advantages over desktop apps(like powerful layout\rendering engine and zero-installation) but there's still more distance to go. You can't drag and drop between a page in a browser and your desktop. Talking to the filesystem curently requires an http upload to the server. You can't do interactions with the clipboard in any meaningful way. I'm sure these problems will eventually solve itself but we're not there yet.

That said, javascript is a pile of dung. The language is terribly limited for the kind of things you're trying to do on the Internet. (No builtin to walk a DOM tree? Seriously?)

The DOM-specific stuff stinks, yes, and the language has a few warts (like implicit global variables and weird scoping rules) but if know to look out for those, its actually quite a pleasant language to work in. Maybe as good as python. (I believe the original developer of the language considered javascript to be no more than another syntax for lisp).

The most annoying part is the brower incompatibilities w.r.t. the DOM\CSS. Most toolkits like prototype or Mochikit do a reasonable job of hiding those but eventually a few of them leak through.


*What the hell did people even do before Firebug existed?

Bang their heads against the wall.
(Reply) (Thread)
[User Picture]From: arvindn
2007-09-20 04:26 am (UTC)
"You can't drag and drop between a page in a browser and your desktop. Talking to the filesystem curently requires an http upload to the server. You can't do interactions with the clipboard in any meaningful way."

Well, my answer to most of those objections is that client-side data needs to go away too. In fact, I haven't kept any data locally for the last 2-3 years (except movies and stuff) and it's simplified things for me greatly.

It might require some effort to migrate from a desktop to a web based app, but then that's what I meant by inertia in my post.

"The DOM-specific stuff stinks, yes, and the language has a few warts (like implicit global variables and weird scoping rules) but if know to look out for those, its actually quite a pleasant language to work in. Maybe as good as python. (I believe the original developer of the language considered javascript to be no more than another syntax for lisp)."

But surely, sir, you jest! If javascript were anything like lisp I'd be dancing right about now :) But then again, I've never done any serious JS coding until like a week ago and maybe with time I'll get better used to the idioms (and the warts).

"The most annoying part is the brower incompatibilities w.r.t. the DOM\CSS. Most toolkits like prototype or Mochikit do a reasonable job of hiding those but eventually a few of them leak through."

Yeah, I'm using Mochikit. Prototype threw me off with its (supposedly) kludgy feel, emphasis on performance and innerHTML obsession. And Mochikit is supposed to be pythonic and all that. The main problem with it is lack of animation. I'm using the third (fourth?) party Mochikit.Animator, but it's not that great.

"Bang their heads against the wall."

lol, just as I suspected :)
(Reply) (Parent) (Thread)
[User Picture]From: koyaanisqatsi
2007-09-20 12:25 pm (UTC)
I bought O'Reilly's Ajax Hacks and the second example didn't work in Firefox (and that's after giving up on checking for typos and just downloading it directly from the site). I'm amazed that Flickr and Gmail do what they do.
(Reply) (Thread)
[User Picture]From: arvindn
2007-09-20 05:05 pm (UTC)
I suppose if you're big enough you have the resources to write it in something else and compile it down to javascript. google claims to do it in java.
(Reply) (Parent) (Thread)
From: (Anonymous)
2007-09-22 03:58 pm (UTC)
bullshit... power od desktop remains unmatched..
(Reply) (Thread)
[User Picture]From: arvindn
2007-09-22 04:26 pm (UTC)
Feeling too cowardly today to either show your face or offer any sort of logic?

I love the word 'power' that you used. That's the problem with engineers. A lot more useful software would be produced if you could drive it into their heads that convenience matters far more than power.

Could you at least tell me who you work for, so I'll know not to buy any stock? :)
(Reply) (Parent) (Thread)