Search:

oklahoma sports oklahoma fan ou osu sooners cowboys stillwater norman bedlam oklahoma basketball oklahoma football oklahoma blazers CHL oklahoma redhawks redhawks blazers ford center toby keith bricktown ballpark bricktown hockey fight CHL fight oklahoma fight oklahoma tornado yard dawgz arena football oklahoma dawgz nba hornets hornets basketball oklahoma city hornets

Best Practices in Javascript Library Design

Oklahoma Sports Fan
Oklahoma Sports Fan Oklahoma Sports Fan
Oklahoma Sports Fan

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...

Channel: Howto & Style
Uploaded: October 9, 2007 at 1:06 am
Author: googletechtalks

Length: 01:23
Rating: 4.58
Views: 12414

Tags: best  google  howto  javascript  practices  

Video Url:


Embed Code:

Video Comments

WoWultiplayer3355 (October 9, 2008 at 12:55 am)
the words arent sinced with the guy
horneyvirus (September 16, 2008 at 3:51 am)
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().
horneyvirus (September 16, 2008 at 3:43 am)
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.
JamesMorlan (September 16, 2008 at 3:21 am)
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
horneyvirus (September 15, 2008 at 9:10 pm)
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
horneyvirus (September 15, 2008 at 9:04 pm)
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
JamesMorlan (September 15, 2008 at 7:05 pm)
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.
horneyvirus (September 14, 2008 at 11:53 pm)
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".
pentium3000 (August 21, 2008 at 4:48 pm)
jajajajaajajajaaj
Doulea82 (August 17, 2008 at 6:43 pm)
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

Oklahoma Sports Fan © 2007 All Rights Reserved.