The Gospel according to Javascript
In the beginning, when the web was created, Javascript was a language scoffed at by ‘real’ developers. It was the domain of pop-ups, banner ads and tacky cursor effects.
Many users, especially power users, would rather have been seen at work browsing weird furniture porn than with a royal flush of colourful flashing pop-ups all over their desktop. Thus, they preferred to disable javascript in their browsers.
Well, no more, brother. Today is a new day.
Javascript is right now poised to become the status quo programming language of the future.
What!? How did this happen?

Consider the following stats, plotting by date how many users had Javascript switched off in their browsers. This comes from W3schools, a web development howto and reference site boasting mostly web developers as users (ie power users):
| Date | JavaScript On | JavaScript Off |
|---|---|---|
| January 2000 | 80% | 20% |
| January 2001 | 81% | 19% |
| January 2002 | 88% | 12% |
| January 2003 | 89% | 11% |
| January 2004 | 92% | 8% |
| January 2005 | 89% | 11% |
| January 2006 | 90% | 10% |
| January 2007 | 94% | 6% |
| January 2008 | 95% | 5% |
Genesis

And the web was created out of pure, static, marked up text, in the likeness of printed media. And it was called HTML.
Way back when the web started, all web content was static. In other words:
- The browser asks the server for a page.
- The server generates the page.
- The server sends the page to the browser.
- The browser displays the page.
This process is repeated every time the user clicks on a link or browses to a new page, even if some of the page content stays the same. The browser compensates for that by storing certain resources locally, like pictures, scripts and even pages.
It was this scenario that gave Javascript its bad name. The only place for Javascript in this setup was to attempt to create eye candy, or to show the user stuff they did not want to see, like pop-up ads.
Then, between 2002 and 2005, this scenario changed dramatically …
Exodus

And the web longed to be freed from the bounds of the browser. It longed to reach out to the Source, the Server. It was the dawn of the age of Ajax.
By using Javascript as a network client running in the browser and using PHP as a network server, the web became dynamic. The typical browser/server interaction changed as follows:
- The browser asks the server for a page.
- The server generates the page, plus some Javascript client code.
- The server sends the page to the browser.
- The browser displays the page and runs the Javascript client code.
- The Javascript client code connects to PHP server code, on user interaction, or periodically, to fetch new bits of content from the server as it becomes available
- The new bits of content is inserted where appropriate, and the display is updated, without having to reload the parts of the page that didn’t change
This move changed the web paradigm quite a bit. The web page became more of an application. Links became buttons, firing off locally stored pieces of Javascript instead of requests for entire pages to the server. The browser became a more of a platform, for applications to run on.
This tendency is about to be taken to an entirely new level, though …
Revelations

And behold, the apocalypse of the web was upon us, and it was called HTML5. Content became function, reader became platform, and the New Web rose from the dark depths, driven by Javascript, with a crown on its head, called CSS3.
In a previous post I explained how HTML5 is changing the browser into a fully capable application platform, replacing the Operating System, capable of running any application thinkable. This is a change that Google fully acknowledges by investing a huge amount of development and marketing effort in ChromeOS.
So, if HTML5 turns the browser into the OS, what language does it speak?
Javascript.
Javascript is to the HTML5 capable browser what Machine Code is to computer hardware, with the added benefit that it is human readable. HTML5 provides the containers to do amazing stuff in, but Javascript will do that amazing stuff.
All of a sudden, Javascript is becoming the language of the future. Any contenders?
Posted by Adriaan Pelzer




2 Trackbacks
[...] In the beginning, when the web was created, Javascript was a language scoffed at by ‘real’ developers. It was the domain of pop-ups, banner ads and tacky cursor effects. This is not at all the case anymore. Read More >> [...]
[...] the rise of AJAX on the web, javascript rose from being an obscure, client side language mainly used for gimmicky animations and popup ads, to a [...]
Leave a Comment