[Python-talk] JavaScript SIG?

Kent Johnson kent37 at tds.net
Mon Jul 2 07:37:13 EDT 2007


Lloyd Kvam wrote:

> I have "JavaScript, The Definitive Guide" by Flanagan on my book shelf
> and pull it out when necessary, but generally avoid putting a lot of
> Javascript into my HTML.  (I use the Firefox NoScript plugin and avoid
> sites where the JavaScript usage is excessive, so I'm not a Javascript
> enthusiast.  However, JavaScript is a bit of a necessary evil.) 

Wandering OT for both the thread and the list...

I might be interested in a JS SIG...I have been doing a modest amount of 
JS coding recently, mostly to add features to the admin interface of a 
Django app, and I have slowly changed my opinion about JS from 'a hack 
to be avoided if at all possible' to 'pretty cool'.

The funny thing about this is that the language hasn't changed much, 
what has changed is the available tools and the way people use the 
language and my attitude about dynamically typed languages (last time I 
tried JS I was a Java bigot, can you believe that!?).

JavaScript the language is actually quite a bit like Python - 
dynamically typed, variables are references, built-in support for lists 
and dicts, dynamic inheritance...

Firebug gives JS a powerful debugger/inspector so you can actually 
figure out what your code is doing.

JS coding conventions have matured, with better encapsulation and OO 
techniques in common use, and the 'unobtrusive JavaScript' school puts 
all the JS in one place rather than sprinkling it about the HTML.

I have been using the jQuery library as the base for my code. I like 
jQuery because it is fairly light-weight (24K compressed), it works well 
and the docs are excellent. It doesn't include a widget library which is 
fine for my use. jQuery papers over browser differences so I don't have 
to worry about them and provides a higher-level API to the browser than 
plain JS.

John Resig, author of jQuery, has a book I like called "Pro JavaScript 
Techniques" published by Apress.

A great website for keeping up with JS news is http://ajaxian.com/

Kent


More information about the Python-talk mailing list