May 09, 2003
Another day, another language...

I'm off to Amsterdam next week to support one of our clients, who have a lot of JavaScript. Which I've never used.

Anyone know a good tutorial? ;-)

I've just got a funky new laptop, so I should be online OK. We'll see.

Posted to On the road by Simon Brunning at May 09, 2003 04:48 PM
Comments

No matey, YOU don't have a new laptop, THE TEAM has a new laptop. Infact, THE COMPANY has a new laptop. Though it does whoop ass, as you say. You sure I can't "borrow" it this w/end? Someone's gotta test the frame rate of the NVidia GeForce4.... :-)

Posted by: Mark Matthews on May 9, 2003 05:25 PM

You'll take it from my cold, dead fingers.

Posted by: Simon on May 9, 2003 05:26 PM

How about from your desk drawer about 5 mins after you leave tonight?

Posted by: Mark Matthews on May 9, 2003 05:27 PM

Remember that anti-car-theft device from RoboCop? ;-)

Posted by: Simon on May 9, 2003 05:29 PM

Haha - funny stuff.

Posted by: R.J. on May 9, 2003 06:56 PM

It is not the syntax that you have to worry about as it is similar to Java in that regard..

it is the differences between browsers by vendor and version that you have to worry about

if you have some free cash pick up the book title Pure Javascript by Sams publishing..

You will wnat the current edition..:)

Posted by: Fred Grott on May 9, 2003 07:01 PM

In my experience, Javascript (the language) is pretty constant these days. The problems come from differences in the DOM between different browsers. Luckily, the following site has a fantastic table showing which DOM methods work in which browsers and what is most reliable for cross platform code:

http://www.xs4all.nl/~ppk/js/index.html?/~ppk/js/version5.html

It's worth looking round the rest of the site as well - it's the best overall javascript tutorial style thing I've seen (although it does assume some previous knowledge). Be warned: most javascript tutorials and books are hideously out of date and will spend the whole time teaching you ways of getting round the differences between Netscape 4 and IE. This stuff just isn't relevant any more - if you code proper standards compliant javascript using the DOM it will Just Work on almost all modern browsers.

Incidentally, javascript is a much more interesting language than most people give it credit for - I've seen it described as "Lisp with C syntax". You can create new function objects, return them from other functions and so some very funky things with object prototypes. These entries in my blog should give you a good starting point:

http://simon.incutio.com/archive/2003/04/02/javascriptPower
http://simon.incutio.com/archive/2003/03/19/javascriptPrototypes
http://simon.incutio.com/archive/2002/11/02/sexyDhtml

Oh, and check out document.getElementsBySelector as well (pimpage):

http://simon.incutio.com/archive/2003/03/25/getElementsBySelector

Posted by: Simon Willison on May 9, 2003 07:35 PM

More importantly... a week in Amsterdam *jealous sigh*

Posted by: Eloon on May 12, 2003 08:47 AM

Three days - I'm on a six o'clock flight (that's six *a.m.*!) tomorrow, and back on Thursday. It might end up being semi-regular, though.

Trouble is, if it's anything like my recent week in Madrid, I won't see anything other than the office and the hotel...

Posted by: Simon on May 12, 2003 08:50 AM

Apparently the nightlife in Amsterdam is rather good but the coffee shops serve crap coffee. Oh, and watch out for the dykes!

Posted by: Stevan Rose on May 12, 2003 09:00 AM

You lucky, lucky bastard. In the past few months you have managed to score Madrid and Amsterdam. I, meanwhile, have scored Accrington and Yeovil.

Still, the beer in Amsterdam is rather good, and they should serve a couple of decent brews in your hotel.

Posted by: Andy Todd on May 12, 2003 01:14 PM

I have O'Reilly's "JavaScript: The Definitive Guide" now. Definitive it certainly is - well up to O'Reilly's usual excellent standards. I'm pretty nearly an expert already! ;-)

Recommended.

Posted by: Simon on May 14, 2003 08:21 AM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?