JavaScript is Not A Computer Language?

Several years ago, I had the pleasure of working on a contract at Canadian Forest Products. I worked with a great group of people who had worked together for years, on a good project with clear requirements. While I was there, I used the remote scripting toolkit from Microsoft, which allowed me to communicate with the server without reloading the web page: we now call this technique AJAX. I wrote a lot of JavaScript.

While I was there, Terry French, team leader of Canfor’s e-business effort,  expressed an opinion. I am paraphrasing after years have passed – if I do not get it right, I hope Terry will forgive me: “You code as if JavaScript were a programming language.  It is not. It’s a scripting language. It’s great for providing simple form interactions, and validating fields on submit. That’s it.”

If this blog were a trashy daytime TV talkshow, it would be one of those look-at-me-now shows. You know the kind: people who were unpopular in high school, but who have made good, confront their tormentors. Terry was a great guy to work with, but on behalf of the much maligned computer language, JavaScript, I say: look at me now!

Server side JavaScript is making a comeback.  But, wait, there’s more.  JavaScript programmers now get to deal with sophisticated concepts such as currying, callbacks, closures, array comprehensions, and test driven development in JavaScript.

And then there are those lovely libraries: JQuery, Mootools, and YUI, just to name a few. JavaScript has come a long way. What do you think of JavaScript now, Terry.

If you are interested in Javascript, check out Douglas Crockford’s videos on JavaScript at Yahoo Video.


Douglas Crockford: “Advanced JavaScript” (1 of 3) @ Yahoo! Video

Good Advice For Any Developer

I am working to use reflection to generate a POJO from data models defined in Jython – DB4O can only persist Java ojects. However, as I sort that out and  prepare for my next DB4O/Jython/Django post, let me share this good advice for any developer who builds any sort of web application in any language.

These seven habits for developing secure applications target PHP developers, but they constitute good advice for you, even if you are working in another language. Take heed.

AJAX Accessibiliy

My clients used to pay me for what I could do on the backend. Now, they seem most impressed by what I do using JavaScript. They seem to want rich interfaces, but what does that mean in terms of accessibility? I have written that asking a developer not to use AJAX is like asking Spielberg not to use a camera because some people are blind.

Basically, Steve King does not write novels for the blind, but someone comes along later to produce a Braille version, or to record the book. A producer of TV content does not have to think about closed captioning – somebody else does that. Why is this my problem? If I send an email, the technology supports me. Why don’t I have more support from the people who build special readers?

My first feeling, when I read that someone thinks I should not be using AJAX is that I am being limited and held back. My clients are asking me to work on applications that are not accessible as things stand, and they will not be accessible even if I avoid AJAX in the piece of work I do. Why shouldn’t I use AJAX?

However, now I have to think about accessibility. One day, I will be asked to work on a web application that is accessible. How do I continue to build usable, responsive apps? I cannot answer all of these questions right now, but here is part of the solution, as outlined by Simon Wilson, in a presentation of JQuery: Unobtrusive JavaScript with jQuery.

« Previous Entries