This is my five minutes lighting talk presentation in Plone Confrence 2011. It’s a crash course how to write Javascript by following the modern best practices and not in that crappy way when you where still studying web development circa HTML3.
The presentation was originally aimed for Python developers, but suits for anyone with some programming experience and not much Javascript experience.
Discussed topics include: require.js, ECMAScript 5, strict mode, JSLint, this scoping and bind(), binding event handlers using jQuery
Ps. Always when searching Javascript related information in Google et. al. use MDN (Mozilla Developer Network) prefix as otherwise you’ll get misinformation and spammy results. E.g. search “MDN javascript bind” instead of “javascript bind”.
Pps. Put w3cschool.com domain on the black list in your search engine. It’s bad.
Ppps. PDF is available here.
Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+
Do you have your slides anywhere else? Slideshare Flash Player has had a problem for several months for me where previous and next button presses are mostly ignored or skip slides so I can’t actually read any presentation.
I believe you can download the orignal PDF file in slideshare.net.
Only if you create an account and jump through similar hoops.
Ok, updated the post with a local PDF copy. I thought slideshare.net was already HTML5… 🙁
Hi,
I’m from slideshare… came to this post from Google. We have moved to HTML5, and thats happening in a phased manner… we plan to finish the complete changover from Flash in a couple of months..
The embed above is not Flash, btw. You can do a text selection to verify.
Don’t use a#someid, simply use #someid, selectors are read from right to left, so anything on the left of #someid is meaningless, since ids are supposed to be unique.
Avoid using jQuery.live, use jQuery.delegate/jQuery.on (jquery 1.7) : API is easier to understand and more effective.
Samori: Good stuff. The example was not perfect as the whole presentation was written in 30 minutes… so your clarification is good! Also haven’t had time yet to check jQuery 1.7 release as its recent and have been busy with the conf – lots of new exciting stuff there!
@Amit: Whenever I see embeds I always hit the main site (also do this with youtube) as people size the embeds really small – I’m using a 28″ high resolution monitor.
I can confirm the above embed does indeed not use Flash and works perfectly for me while your main site is using Flash and is hopeless. (Chrome on Linux).
@roger, The link above the embed and the ‘slideshare’ button in the player both open http://www.slideshare.net/miohtama/javascript-how-to-avoid-the-bad-parts and the page does not use a flash player. Which OS/Browser are you accessing the page from?
@Jeba: It is doing HTML5 now, but when I clicked when the original posting was made it was doing Flash. I have flashblock installed so I have to click on a Flash item to get it to play which is how I can be sure. I’m running Chrome stable on Ubuntu Linux with Adobe’s Flash installed via their Ubuntu package.
There was another Slideshare Flash presentation a few days ago that did the same thing to me. Pressing next/back would sometimes update the slide number and even rarer actually update the slide contents. Slideshare has worked correctly in the past.