Submit Search
Upload
Write Better JavaScript
•
2 likes
•
1,247 views
Kevin Whinnery
Follow
Technology
Report
Share
Report
Share
1 of 54
Download Now
Download to read offline
Recommended
Lessons Learned From Applications That Kicked Titanium's Ass
Lessons Learned From Applications That Kicked Titanium's Ass
Kevin Whinnery
OSCON Titanium Tutorial
OSCON Titanium Tutorial
Kevin Whinnery
Titanium @ Minnebar
Titanium @ Minnebar
Kevin Whinnery
JavaScript as a First-Class Citizen on iOS 7
JavaScript as a First-Class Citizen on iOS 7
Kevin Whinnery
When to (use / not use) React Native.
When to (use / not use) React Native.
Bobby Schultz
React native sharing
React native sharing
Sam Lee
Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016
Adrian Philipp
SONY BBS - React Native
SONY BBS - React Native
Mehmet Ali Bağcı
More Related Content
What's hot
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
Sauce Labs
Cross Platform Development in C# (DDDNorth 2013)
Cross Platform Development in C# (DDDNorth 2013)
ross.dargan
Mvvm is like born fraction
Mvvm is like born fraction
Ken Haneda
Lo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJS
Marcel Kalveram
Ionic framework one day training
Ionic framework one day training
Troy Miles
Introduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
TypeScript
TypeScript
Software Infrastructure
React Native
React Native
Software Infrastructure
Workshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UX
JWORKS powered by Ordina
Whats New in Titanium 0.7
Whats New in Titanium 0.7
Kevin Whinnery
BDD in Xamarin with Specflow & Xamarin UI Test
BDD in Xamarin with Specflow & Xamarin UI Test
Emanuel Amiguinho
React Native - Why Designers should use React native. And everyone else too.
React Native - Why Designers should use React native. And everyone else too.
Val Scholz
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
Rahat Khanna a.k.a mAppMechanic
Introduction to React Native
Introduction to React Native
Sambhu Lakshmanan
Midwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
Building testable chrome extensions
Building testable chrome extensions
Seth McLaughlin
Put an end to regression with codeception testing
Put an end to regression with codeception testing
Joe Ferguson
Cordova: APIs and instruments
Cordova: APIs and instruments
Ivano Malavolta
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Development
thedumbterminal
Composer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency Management
Joe Ferguson
What's hot
(20)
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
Cross Platform Development in C# (DDDNorth 2013)
Cross Platform Development in C# (DDDNorth 2013)
Mvvm is like born fraction
Mvvm is like born fraction
Lo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJS
Ionic framework one day training
Ionic framework one day training
Introduction To Appium With Robotframework
Introduction To Appium With Robotframework
TypeScript
TypeScript
React Native
React Native
Workshop Ionic Framework - CC FE & UX
Workshop Ionic Framework - CC FE & UX
Whats New in Titanium 0.7
Whats New in Titanium 0.7
BDD in Xamarin with Specflow & Xamarin UI Test
BDD in Xamarin with Specflow & Xamarin UI Test
React Native - Why Designers should use React native. And everyone else too.
React Native - Why Designers should use React native. And everyone else too.
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native
Introduction to React Native
Midwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small team
Building testable chrome extensions
Building testable chrome extensions
Put an end to regression with codeception testing
Put an end to regression with codeception testing
Cordova: APIs and instruments
Cordova: APIs and instruments
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Development
Composer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency Management
Similar to Write Better JavaScript
Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScript
Axway Appcelerator
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript Spaghetti
Jared Faris
Javascript spaghetti stirtrek_5_17
Javascript spaghetti stirtrek_5_17
Jared Faris
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Tobias Braner
Java2 platform
Java2 platform
Sajan Sahu
JavaScript Miller Columns
JavaScript Miller Columns
Jonathan Fine
All of Javascript
All of Javascript
Togakangaroo
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Matt Raible
Framework engineering JCO 2011
Framework engineering JCO 2011
YoungSu Son
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
Dr. Felix Raab
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Matt Raible
Your java script library
Your java script library
jasfog
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with Clojurescript
John Stevenson
Google App Engine for Java
Google App Engine for Java
Lars Vogel
Rethinking Best Practices
Rethinking Best Practices
floydophone
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
Lunch and learn as3_frameworks
Lunch and learn as3_frameworks
Yuri Visser
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Matt Raible
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
Visual Engineering
Robotlegs on Top of Gaia
Robotlegs on Top of Gaia
Jesse Warden
Similar to Write Better JavaScript
(20)
Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScript
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript Spaghetti
Javascript spaghetti stirtrek_5_17
Javascript spaghetti stirtrek_5_17
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Java2 platform
Java2 platform
JavaScript Miller Columns
JavaScript Miller Columns
All of Javascript
All of Javascript
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Framework engineering JCO 2011
Framework engineering JCO 2011
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Your java script library
Your java script library
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with Clojurescript
Google App Engine for Java
Google App Engine for Java
Rethinking Best Practices
Rethinking Best Practices
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Lunch and learn as3_frameworks
Lunch and learn as3_frameworks
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
Robotlegs on Top of Gaia
Robotlegs on Top of Gaia
More from Kevin Whinnery
Get Pumped for the HTML 5 Gamepad API
Get Pumped for the HTML 5 Gamepad API
Kevin Whinnery
Designing Modules for the Browser and Node with Browserify
Designing Modules for the Browser and Node with Browserify
Kevin Whinnery
Second Screen Apps with the Google Cast SDK
Second Screen Apps with the Google Cast SDK
Kevin Whinnery
Let's Write Better Node Modules
Let's Write Better Node Modules
Kevin Whinnery
Taking UX to the Real World
Taking UX to the Real World
Kevin Whinnery
Best Practices for Cross-Platform Native Applications
Best Practices for Cross-Platform Native Applications
Kevin Whinnery
Write Better JavaScript
Write Better JavaScript
Kevin Whinnery
Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)
Kevin Whinnery
What's New in Titanium 1.5
What's New in Titanium 1.5
Kevin Whinnery
Getting Started with Titanium
Getting Started with Titanium
Kevin Whinnery
More from Kevin Whinnery
(10)
Get Pumped for the HTML 5 Gamepad API
Get Pumped for the HTML 5 Gamepad API
Designing Modules for the Browser and Node with Browserify
Designing Modules for the Browser and Node with Browserify
Second Screen Apps with the Google Cast SDK
Second Screen Apps with the Google Cast SDK
Let's Write Better Node Modules
Let's Write Better Node Modules
Taking UX to the Real World
Taking UX to the Real World
Best Practices for Cross-Platform Native Applications
Best Practices for Cross-Platform Native Applications
Write Better JavaScript
Write Better JavaScript
Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)
What's New in Titanium 1.5
What's New in Titanium 1.5
Getting Started with Titanium
Getting Started with Titanium
Recently uploaded
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
UiPathCommunity
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
Aggregage
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
DianaGray10
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
Jamie (Taka) Wang
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
shyamraj55
201610817 - edge part1
201610817 - edge part1
Jamie (Taka) Wang
20230104 - machine vision
20230104 - machine vision
Jamie (Taka) Wang
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
IES VE
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Will Schroeder
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
Liveplex
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
Matt Ray
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
infogdgmi
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
Brian Pichman
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
Daniel Santiago Silva Capera
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
DianaGray10
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
DianaGray10
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
DianaGray10
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
Adtran
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
IES VE
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UbiTrack UK
Recently uploaded
(20)
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
201610817 - edge part1
201610817 - edge part1
20230104 - machine vision
20230104 - machine vision
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
Write Better JavaScript
1.
2.
3.
4.
Object-Oriented Programming in
JavaScript
5.
Useful JavaScript Patterns,
Tricks, and Style Guidelines
6.
JavaScript in Titanium
Mobile
7.
8.
9.
10.
Object-Oriented (Prototypical Inheritance)…
or not
11.
Flexible Objects
12.
First-Class Functions
13.
14.
Covers the good
and bad
15.
I use patterns
from this book every time I write JS
16.
17.
18.
19.
false
20.
0
21.
‘’
22.
null
23.
undefined
24.
NaN
25.
Truthy Values:
26.
Everything else
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
Add new features
and functionality to it (the parasites, if you will)
48.
Pass it off
as an instance of a new object
49.
50.
51.
52.
Self-calling function provides
encapsulation
53.
54.
Uses functional scope
to provide a public interface to a module
55.
56.
Function interfaces can
rationalize many input types
57.
58.
Passable, and callable
59.
Can replace “this”
inside function with something more useful
60.
call: call a
function with known arguments
61.
62.
63.
64.
65.
66.
JavaScript file contents
(cohesion)
67.
Google Style Guidelines:
http://bit.ly/g_style
68.
69.
Huge files –
if you want to write 13,000 lines in a file, go back to enterprise Java
70.
Semicolons are not
optional – you don’t want the interpreter writing code for you
71.
72.
73.
74.
75.
Android – Rhino
– Java-based, meant for the server-side, just okay in terms of performance
76.
Coming soon –
Android/V8 – C-based, super duper fast, minimum Android version 2.2 (don’t freak out, check the version distribution stats)
77.
78.
CommonJS Module Spec
79.
80.
81.
82.
JavaScript: The Good
Parts
83.
Eloquent JavaScript (free!)
84.
High Performance JavaScript
85.
86.
@BrendanEich
87.
@functionsource
88.
@dalmaer
89.
@thomasfuchs
90.
@zacharyjohnson
91.
@wycats
92.
@DavidKaneda
93.
@rem
94.
95.
http://badassjs.com- then, after
that, go here
96.
http://jsbin.com - handy
test harness
97.
https://github.com/cjohansen/juicer - Great
compression and obfuscation utility (Ruby)
98.
99.
Editor's Notes
A closure is a function, with a referencing environment for the free variables (arguments) to that function – it provides the function with a scope, that will live on for the life of the closure. It’s also the only way to create scope in JavaScript.
Download Now