Best Practices in Javascript Library Design

Uploader: googletechtalks
Video Description: 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...


Tags for this video: best google howto javascript practices
See more videos uploaded by googletechtalks

What do you want to do next ?
Play Casino Games - 10% Cash Bonus, more than 75 great online casino games
Bet on Sports - 10% Cash Bonus, Live Lines Inferno, Comprehensive Betting Advice
Play Backgammon - 20% Cash Bonus, popular $50000 Backgammon Tournaments
Play Internet Poker - 110% Cash Bonus, $175000 Guaranteed Poker Tournaments
Bet on Horses - 10% Cash Bonus, Horse Betting Toolkit, Featured Race of the Week
Play Online Bingo - Free $6 Bonus. Bingo Tourneys, Slots, Video Poker, Keno games

Subscribe to our newsletter - Learn how to make $200 per day playing roulette

Related Videos
google-hackstricks-java-script-codes.htmlgoogle-hackstricks-java-script-codes.htmlgoogle-hackstricks-java-script-codes.html
Google Hacks*Tricks + Java Script CodesJAVASCRIPT CODESJavascript Tutorial // Changing Image Using Dropdown
google-hackstricks-java-script-codes.htmlgoogle-hackstricks-java-script-codes.htmlgoogle-hackstricks-java-script-codes.html
V8: an open source JavaScript engineEssentials of the DOM and JavaScript in 10 MinutesTutorial javascript layers capas dom


Share This Video:       digg       StumbleUpon       del.icio.us       Reddit       Furl       Spurl       Simpy       YahooMyWeb


Comments on this video: Show || Hide
Read some comments
long... and ... ( 10 months ago by Mukudmak)
long... and interesting!
The is a little ... ( 10 months ago by gnuvince)
The is a little off-sync, but the content is absolutely great.
longest vid on ... ( 9 months ago by pianokid54)
longest vid on youtube
Good points of view ... ( 8 months ago by jokumusic)
Good points of view. :)
How is this video ... ( 8 months ago by Habbo0n)
How is this video 62 minuets???????????
que es JavaScript ( 7 months ago by serechipote)
que es JavaScript
el Javascript es ... ( 5 months ago by Xiobioman)
el Javascript es una lengua usada para programar
I discovered jQuery ... ( 4 months ago by JamesMorlan)
I discovered jQuery recently and it is awesome. Information in this video about conventions used in jQuery was particularly useful - why have I not seen this highlighted in the documentation?
Why do you wrap ... ( 4 months ago by JamesMorlan)
Why do you wrap anonymous functions in parens before invoking them? e.g. (function(){/*do something*/})()
Array ( 4 months ago by Doulea82)
hello all,
If i can just have a moment,Wrath of the Gods is a new MMO about to start up,we are looking for more programers with java script exp and need to live in the UK,if you want more information please leave me a comment and ill get back to you,Thank you for all your time
jajajajaajajajaaj ( 4 months ago by pentium3000)
jajajajaajajajaaj
Because it's a ... ( 3 months ago by horneyvirus)
Because it's a syntax error otherwise. Most likely because the interpreter expects unwrapped functions to be statements and not expressions.
BTW, this is called Lambda in functional programming. Read "The Little Schemer" and "Javascript the good parts".
I understand Lambda ... ( 3 months ago by JamesMorlan)
I understand Lambda, but as far as the syntax, I have been calling anonymous functions without wrapping them in parens forever without it being a problem. e.g. x=function() {...}(); Never a browser has ever complained to me about that. I just thought maybe there was some other reason for wrapping it in parens.
If you need to ... ( 3 months ago by horneyvirus)
If you need to execute a an anonymous function standalone, you have to wrap it in parens. That's part of the syntax. Why? Ask Brendan Eich. :-D
x=function() {...}( ... ( 3 months ago by horneyvirus)
x=function() {...}(); is an assignment. You're not executing the function standalone. Playing around with a REPL helps to learn core JavaScript. "aptitude install spidermonkey" if you're or debian based systems. Then, "js" will invoke a REPL. If you're on KDE, you already have "kjs". If you're on winblows, I'm not talking to you again. :-D
Yes, it is an ... ( 3 months ago by JamesMorlan)
Yes, it is an assignment, but it still executes the function. I guess the syntax in question is for calling an anonymous function when you don't care about the result - or that has no result (technically it's not a function in that case, but that's the syntax we're stuck with). I've simply never needed to do that. And FYI, I don't play the "I'm better than you" Linux vs. Windows game; all software sucks, so give me a break. :D
You'll need to do ... ( 3 months ago by horneyvirus)
You'll need to do that for many reasons.. such emulating block scope, as arguments for higher-order functions etc. You'd know this if you know any functional programming.
It's not about "I'm better than you". In fact free software sucks a lot harder sometimes.
Here's a web based ... ( 3 months ago by horneyvirus)
Here's a web based REPL. squarefree(dot)com/shell/shell.html
Javascript returns the last expression or the one you explicitly returned. Also, you can use print("foo") and obviously alert().
the words arent ... ( 3 months ago by WoWultiplayer3355)
the words arent sinced with the guy
Array ( 1 month ago by yanitor)
Coders needed!
Great pay for someone able to create an auction website script and more.
Email me today at Will(at)Artisticintension(dot)co(dot)uk
GREAT PAY and plenty of work!
Will(at)Artisticintension(dot)co(dot)uk
Im just learning ... ( 1 month ago by Edel99)
Im just learning web-development, but I have experience with C++ and C#. I have always stayed away from Java because I figured C# was supposed to kill Java. My question is: Since JavaScript has been around forever, is there any other language that is better for client-side scripting??
Array ( 3 weeks ago by iflamenko)
Java & Javascript are different. Javascript was never well supported on various browsers. However with JQuery framework it is probably your best client-end scripting tool. If you are new to web development, you should definitely try JQuery. It is wonderful and makes your job very easy. There are numerous JQuery plugins that are contributed, you can use them in your application and get instant functionality without writing lengthy and unstable javascript code.
I read how 'Java' ... ( 2 weeks ago by Edel99)
I read how 'Java' slow and to be avoided. In the case on Javascript, is this the only language use for building interaction on the web? It seems to be the most popular...
what a video smooth ... ( 1 week ago by johnfairest)
what a video smooth work..time has no problem does it


Tell a friend:
URL 
Embed Code 


Bet on Sports
Funny Videos