KEMBAR78
JavaScript: the who, what, when, where, why, & how | PPTX
JavaScript

WHO, WHAT, WHEN, WHERE, WHY
About Me

 Authored tamufeed.js     GoMobile Tech Team
                           Responsive Web Design
what
what


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

 1994 Netscape Enterprise Server
 1996 Microsoft IIS 3.0
 Today: Node.js
the client side

Adobe Flash, Google Chrome, Nexus 7, Firefox, Opera,
Safari, iPad, Kindle PaperWhite, Windows 8, Internet
Explorer 9, Windows Phone
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
Links

 MDN https://developer.mozilla.org/en-
    US/docs/JavaScript
   MDN, Learn https://developer.mozilla.org/en-
    US/learn/
   W3
    http://www.w3.org/community/webed/wiki/Main_
    Page#JavaScript_core_skills
   Future http://www.webPlatform.org
   http://pineapple.io/resources/tagged/javascript?typ
    e=tutorials&sort=all_time
what it’s not

 vbscript
 python


 CoffeeScript


 Google Dart
 Microsoft TypeScript
when
when

 1995 Netscape 2.0
 1996 IE 3.0
 1997 Ecma-262
 1999 Ecma-262 Ed.3
 2009 Ecma-262 Ed.5
 2011 Ecma-262 Ed.5.1
when


 When do you JavaScript?
where
where


 HTML5 Texas http://html5tx.com
 @jsconf http://jsconf.com
 http://texasJavaScript.com
 http://austinJavaScript.com


Follow the individuals
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
why
why

 Pervasive: It’s everywhere
 Performance: Browser Wars for the win
 Mutable: JS lets you do stuff
 Community: Welcome to brogrammer culture
 Mashups
 Cross Platform: Apps for Windows 8, to iPhone, to
  Android
 Circumvent Your CMS
 Responsive Web Design
how

BEST PRACTICES
some best practices
best practices

 Use meaningful variable names
 Write narrative code
best practices

 Use object literals
 And JSON notation
 whenever possible
best practices

 Don’t pollute the global namespace.
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)
best practices

 Use strict mode.
 Stick to The Good Parts
best practices

 the module pattern
best practices

 Isolate & minimize DOM access
best practices

 Patterns
best practices

 Enhance progressively and degrade gracefully.
best practices

Prefer JS libs
 over HTML5 API
 over ES5.1
best practices

 Compress (e.g. YUI Compressor)
 Concatenate to avoid network latency & HTTP
  overhead
 Synchronous JavaScripts blocks the browser, so load
  last on the page
best practices

 Know your JS engines when testing.
JavaScript: the who, what, when, where, why, & how

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