Skip to main content

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.

Comments

Popular posts from this blog

Setting up Fitnesse on Ubuntu in 7 steps

Some pretty basic steps but just to make sure it's here for everyone to see. Setting up fitnesse and running the jar is easy enough. Just go to http://fitnesse.org/ and get started and do it on your desktop just to see it in action. But for me that wasn't good enough I wanted it to run as service on ubuntu. I stole a few tricks from how ubuntu runs jenkins and setup fitnesse a similar way. 1. Create a user and group for fitnesse (optional) I didn't do this because I wanted tomcat, jenkins and fitnesse all running as the same user. Call it laziness to avoid any permissions classing but it doesn't change the process that you need to create or choose what user you're going to make it run as. Don't make it run as your user or root! 2. Download the jar file and place it in /usr/share/fitnesse Make the folder too of course. It can belong to root as long as the fitnesse user has read access 3. Create the folder to run in at /var/lib/fitnesse Fitnesse user needs...

RestFixture

So most of the tests I'm writing now in Fitnesse are using RestFixture . Being able to do all this black box style testing has helped me get a lot of tests up and running without having to change the existing code base. Now I've taken a step future with my own little fork  so I can use scenarios and build nice BDD style scripts. But first I want to give me own quick guide to using RestFixture Step 1: Installing You can dive straight in by grabbing the latest jar files for RestFixture here  https://github.com/smartrics/RestFixture/downloads If you know what you're doing can get the nodep version to work nicely along side other libraries you may be including in Fitnesse. But I grabbed the 'full' version and unzipped it into a RestFixture folder alongside my FitNesseRoot folder. Step 2: Write your first test I took advantage of the built in Fitnesse api as a basic test and wrote a page called RestFixture with the following contents !define TEST_SYSTEM {slim} !...

Are mocks/fakes reusuable?

Programming 101 states: Don't copy and paste code. If you find yourself doing something repetitive then do it right so you can reuse the same code. Functions, classes and even separate files all serve this end. Now that I'm writing tests all the time I often find myself creating Mocks. Mocks are where you tell code to use a pretend version of some functionality instead of the real one. It could be because the real one does something you don't want in your tests (writes files, reads a database) or it could be that you've got some messy legacy code you can't to pull into your tests (yet). There's other reasons too but you get the idea. So if I make a Mock version of a class it makes sense to try and share that with everyone else that might be trying to test with that same class. Or does it? That assumption has some serious flaws that I'm only now starting to understand. And here's a few: Behaviour you need to test may be completely different to the next gu...