Best Practices in Javascript Library Design




Google Tech Talks
August 17, 2007

ABSTRACT

This talk explores all the techniques used to build a robust, reusable, cross-platform JavaScript Library. We’ll look at how to write a solid JavaScript API, show you how to use functional programming to create contained, concise, code, and delve deep into common cross browser issues that you’ll have to solve in order to have a successful library.
John Resig is a JavaScript Evangelist, working for the Mozilla Corporation, and the author of the book ‘Pro Javascript Techniques.’ He’s also the creator and lead developer of the jQuery JavaScript library and the co-designer of the FUEL JavaScript library (included in Firefox 3). He’s currently located in…

Original source


23 responses to “Best Practices in Javascript Library Design”

  1. Yeah … check this out …
    > A kludge (or kluge) is a workaround, a quick-and-dirty solution, a clumsy, inelegant, difficult to extend, hard to maintain

    Kludge OR Kluge … luge looge … klooje whatever.

    Not to mention the book Kluge: The Haphazard Evolution of the Human Mind by Gary F. Marcus

    If you want to go through the rest of your life saying it wrong, fine by me!

  2. Depends…

    It's an awesome video, but since you're new to javascript, this video can get a little technical. It's good to watch the video to get a good introduction of what the javascript language capable of. John Resig is giving explanations on good tips of developing your own libraries…

    Most of my knowledge in Javascript comes from books. School does gives you allot of knowledge, but books gives you more in a depth knowledge of the programming language (personally).

  3. hey guys, i'm new to web development (i'm 23, just graduated last year and just quit my crappy job in real estate doing research) and am currently taking a class that is teaching me html, css, javascript, and ruby. i hope to switch fields to programming. after watching this vid, do you think it's very helpful for someone like me? will it help me a lot? we haven't touched javascript yet, so i'm just trying to prepare resources in advance. thanks!

  4. @Thunderbird861 Dont start tryin to learn with these tech talks, these are for helpfull for people wih a good amount of knowledge in writing programs. Start by learning from youtube tutorials or books. My favorite tutorials are from thenewboston and my favorite books are the "for dummies" series

  5. @JamesMorlan I realize this comment is 2 years old, but just in case you never found the correct answer, here it is:

    It simply helps you and other programers know that the function is immediately invoked. It's hard to catch the parens at the end of the function declaration when scanning through lines and lines of code.

    Simply put, it's not required but it's a good neighborly thing to do.

Leave a Reply