background preloader

Javascript

Facebook Twitter

Graphics

Node.js. Backbone.js. Main Page. How to not suck at jQuery : programming. Engineering: jQuery the Right Way. jQuery has changed the way we write Javascript by abstracting out much of the painful cross-browser implementation details that used to plague developers, but to use it correctly still requires a little knowledge about what’s going on under the hood. In this post we’ll take a good look at jQuery’s selectors and how to use them efficiently. I’ll also talk briefly about DOM manipulation and event handlers. Part 1: Search At its core jQuery is exactly what its name implies, a query engine designed for search. And just like you’re careful to construct efficient SQL queries, you need to take the same care with your jQuery selectors. Efficient selector use boils down to three main concepts.Using the right selectorNarrowing the search spaceCaching Ego and #ID You’re right, it’s never that clear cut Good browsers actually provide a getElementsByClass which greatly improves the performance of class selectors.

See? Narrowing the search Good semantics, good selectors Luckily this isn’t hard to do. Douglas Crockford on JavaScript and HTML5 | Webmonkey?| Wired.com. SAN FRANCISCO, California — When Doug Crockford first encountered JavaScript, his first impression was that it was “one of the most incompetent pieces of software engineering [he'd] ever seen.” His opinion, which is highly regarded since he’s widely considered to be the grand poobah of JavaScript, is one that was shared by many in the web’s early days. However, as the language has grown and the era of the web app is in full swing, it’s reaching a new level of success far beyond what he (or anyone) could have predicted.

The video above, shot here yesterday at the Web 2.0 Expo by the conference organizers at O’Reilly Media, compresses several of Crockford’s thoughts on JavaScript and HTML5 into five minutes. He has hope for HTML5, but he has issues with the way it’s being developed. Primarily, he’s concerned that there are too many security holes, and that “there’s too much kitchen sink in HTML5″ — excessive duplication of the elements and not enough discipline in the code. See Also: Eloquent JavaScript -- interactive tutorial. JavaScript Guide - MDC.

HTML, CSS, and Javascript from the Ground Up - Google Code University - Google Code.