Thursday, April 15, 2010

A brief history of Javascript

Javascript is the ugly duckling that is now ruling the internet. It's now a fully grown ugly arse duck! But you'll respect it because it got a lot right where corporations have failed.

Back in 1996 I heard how Netscape was coming out with a new version 2.0 that would include Javascript. Apparently in a deal with Sun Microsystems they renamed it from Livescript and it would allow programming to be embedded into HTML and run in the browser instead of on the server.

At this time Netscape defined the web. If you browsed webpages you used netscape. Sure it crashed a lot. Yes it ran out of memory when some punk decided a page with 12 frames would be cool. But if you used anything else you were missing out on the full glory of the web. So when Netscape said they were doing something cool for the internet you listened with equal interest, excitement and doubt.

Sounded like a toy. Netscape already messed up websites with the damn <BLINK> tag. Sure you could have some nice effects like a live clock or a image changing on a timer. But they'd just be gimmicks that no one would care about in time. Java would let us all write proper applications for browsers. How wrong we were...

The next 5 years was a mess. Java proved to be a dog. Never lived up to it's promise as it ate up memory and cpu like a glutton and never did anything fantastic. Sure you can get some nice Java programs no but in the late '90s there was two camps. Newly trained Java engineers getting high salaries from companies who believed the shit Sun was putting out promoting the language like the second coming. And people like me waiting for it to die in a fire because it was frankly crap.

And in that time where was Javascript? It was a toy. Used more by adverts trying to get in your face than any serious programmer. Microsoft's IE and it's half arsed 'jscript' as well as Netscape's own sporadic support for Javascript made it useless for any serious programming. There was nothing you could do to get it to run consistently across browsers.

Then over the last decade a push for web standards finally got a hold. The DOM interface became a standard and there was something javascript programmers could latch onto. Suddenly you could manipulate the page in real time in a way that worked across all modern browsers. It was taken more seriously but still didn't get much traction. Until some smart people realised you could use it to make asynchronous requests.

Ajax was a word thrown around for a while. It took some digging to find out what it meant. And even then it wasn't clear why it was useful. Then like an explosion on the internet it all became clear in one app. It was 2005 and the internet changed thanks to Google Maps.

Rarely does one website change the entire direction of internet growth and development. Suddenly everyone wanted Ajax style programming and that meant they had to learn Javascript. With that one hit it became clear you could now write applications not just websites.

Now it's taken for granted. If you try and create an interactive website without the application style interfaces Javascript can bring you'll be considered slow and clunky. Thanks to browser improvements Javascript is running faster than ever and can be more secure than flash. Javascript is running on mobile phones! To think it used to crash my computer 10 years ago.