javascript: the who, what, when, where, why, & how

32
WHO, WHAT, WHEN, WHERE, WHY JavaScript

Upload: monty-dickerson

Post on 09-May-2015

480 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: JavaScript: the who, what, when, where, why, & how

WHO, WHAT, WHEN, WHERE, WHY

JavaScript

Page 2: JavaScript: the who, what, when, where, why, & how

About Me

Authored tamufeed.js GoMobile Tech TeamResponsive Web

Design

Page 3: JavaScript: the who, what, when, where, why, & how

what

Page 4: JavaScript: the who, what, when, where, why, & how

what

JavaScript is a lightweight, interpreted, object-oriented language with first-class functions.

Page 5: JavaScript: the who, what, when, where, why, & how

the server side

1994 Netscape Enterprise Server1996 Microsoft IIS 3.0Today: Node.js

Page 6: JavaScript: the who, what, when, where, why, & how

the client side

Adobe Flash, Google Chrome, Nexus 7, Firefox, Opera, Safari, iPad, Kindle PaperWhite, Windows 8, Internet Explorer 9, Windows Phone

Page 7: JavaScript: the who, what, when, where, why, & how

The Language & Its Libraries

Like Java and .NET, JavaScript has its go-to libraries

Libraries! extend the present, polyfill the past, and pioneer the future

Page 9: JavaScript: the who, what, when, where, why, & how

what it’s not

vbscriptpython

CoffeeScript

Google DartMicrosoft TypeScript

Page 10: JavaScript: the who, what, when, where, why, & how

when

Page 11: JavaScript: the who, what, when, where, why, & how

when

1995 Netscape 2.01996 IE 3.01997 Ecma-262 1999 Ecma-262 Ed.32009 Ecma-262 Ed.52011 Ecma-262 Ed.5.1

Page 12: JavaScript: the who, what, when, where, why, & how

when

When do you JavaScript?

Page 13: JavaScript: the who, what, when, where, why, & how

where

Page 15: JavaScript: the who, what, when, where, why, & how

Who’s Who?

Douglas Crockford Y! http://www.crockford.com Brendan Eich N. @BrendanEich

http://BrendanEich.com John Resig jQ @jeresig http://ejohn.org Nicholas Zakas Y! @slicknet

http://www.nczonline.net Stoyan Stefanov Y! @stoyanstefanov

http://www.phpied.com Rebecca Murphy B! @rmurphey http://rMurphey.com Addy Osmani G. @addyosmani

http://addyosmani.com

Page 16: JavaScript: the who, what, when, where, why, & how

why

Page 17: JavaScript: the who, what, when, where, why, & how

why

Pervasive: It’s everywherePerformance: Browser Wars for the winMutable: JS lets you do stuffCommunity: Welcome to brogrammer culture MashupsCross Platform: Apps for Windows 8, to

iPhone, to AndroidCircumvent Your CMSResponsive Web Design

Page 18: JavaScript: the who, what, when, where, why, & how

BEST PRACTICES

how

Page 19: JavaScript: the who, what, when, where, why, & how

some best practices

Page 20: JavaScript: the who, what, when, where, why, & how

best practices

Use meaningful variable namesWrite narrative code

Page 21: JavaScript: the who, what, when, where, why, & how

best practices

Use object literals And JSON notationwhenever possible

Page 22: JavaScript: the who, what, when, where, why, & how

best practices

Don’t pollute the global namespace.

Page 23: JavaScript: the who, what, when, where, why, & how

best practices

Unobtrusive JavaScript

Code is decoupled from markup; only binding of behavior to DOM is the CSS selector.

Styles are decoupled from code (antipatterns: Twitter Badge JS, Titanium 2)

Page 24: JavaScript: the who, what, when, where, why, & how

best practices

Use strict mode. Stick to The Good Parts

Page 25: JavaScript: the who, what, when, where, why, & how

best practices

the module pattern

Page 26: JavaScript: the who, what, when, where, why, & how

best practices

Isolate & minimize DOM access

Page 27: JavaScript: the who, what, when, where, why, & how

best practices

Patterns

Page 28: JavaScript: the who, what, when, where, why, & how

best practices

Enhance progressively and degrade gracefully.

Page 29: JavaScript: the who, what, when, where, why, & how

best practices

Prefer JS libs over HTML5 API over ES5.1

Page 30: JavaScript: the who, what, when, where, why, & how

best practices

Compress (e.g. YUI Compressor)Concatenate to avoid network latency &

HTTP overheadSynchronous JavaScripts blocks the browser,

so load last on the page

Page 31: JavaScript: the who, what, when, where, why, & how

best practices

Know your JS engines when testing.

Page 32: JavaScript: the who, what, when, where, why, & how