JavaScript/Notes/

From Noisebridge
< JavaScript(Difference between revisions)
Jump to: navigation, search
(Introduction)
Line 17: Line 17:
 
'''Resources'''  
 
'''Resources'''  
 
[[Web Development Resources]]
 
[[Web Development Resources]]
 +
  
 
== [[JavaScript/Notes/Debugging|Debugging]] ==
 
== [[JavaScript/Notes/Debugging|Debugging]] ==
 
Browsers provide debuggers that can be launched from a breakpoint, the application's menu, or the debugger keyword in the script.
 
Browsers provide debuggers that can be launched from a breakpoint, the application's menu, or the debugger keyword in the script.
 +
  
 
== [[JavaScript/Notes/ParameterObject|Parameter Object]] ==  
 
== [[JavaScript/Notes/ParameterObject|Parameter Object]] ==  
 
Passing around lists of parameters? Typechecking arguments? Stop doing that. Here's how to make your code clearer and less error-prone.
 
Passing around lists of parameters? Typechecking arguments? Stop doing that. Here's how to make your code clearer and less error-prone.
 +
  
 
== [[JavaScript/Notes/TypeConversion|Type Conversion]] ==
 
== [[JavaScript/Notes/TypeConversion|Type Conversion]] ==
 
There are five primitive types in JavaScript: Null, Undefined, Boolean, String, Number. Various operations in JavaScript require conversion to and from primitive values.
 
There are five primitive types in JavaScript: Null, Undefined, Boolean, String, Number. Various operations in JavaScript require conversion to and from primitive values.
 +
  
 
== [[JavaScript/Notes/ClassnameSwap|ClassName Swap]] ==
 
== [[JavaScript/Notes/ClassnameSwap|ClassName Swap]] ==
 
Event Delegation and the Cascade.
 
Event Delegation and the Cascade.
 +
  
 
== [[JavaScript/Notes/Function|Functions]] ==  
 
== [[JavaScript/Notes/Function|Functions]] ==  
 
Functions are callable objects with an internal <nowiki>[[Scope]]</nowiki> property. Learn how to call functions and pass functions to other functions, where they can be later called.
 
Functions are callable objects with an internal <nowiki>[[Scope]]</nowiki> property. Learn how to call functions and pass functions to other functions, where they can be later called.
 +
  
 
== [[JavaScript/Notes/Array|Array Methods added to EcmaScript 5]]==
 
== [[JavaScript/Notes/Array|Array Methods added to EcmaScript 5]]==
Line 37: Line 43:
  
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 +
  
 
== [[JavaScript/Notes/Prototype|Prototype]] ==
 
== [[JavaScript/Notes/Prototype|Prototype]] ==
Line 44: Line 51:
  
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 +
  
 
== [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]]==
 
== [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]]==
Line 57: Line 65:
  
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 +
  
 
== [[JavaScript/Notes/Singleton|Singleton]] ==
 
== [[JavaScript/Notes/Singleton|Singleton]] ==
Line 64: Line 73:
  
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 +
  
 
== [[JavaScript/Notes/IBD|Interface-Based Design]] ==
 
== [[JavaScript/Notes/IBD|Interface-Based Design]] ==
Line 70: Line 80:
  
 
Two interfaces with a similar signature. The Devil's in the details -- encapsulate them!
 
Two interfaces with a similar signature. The Devil's in the details -- encapsulate them!
 +
  
 
=== [[JavaScript/Notes/EventNotificationSystem|Event Notification System]]===
 
=== [[JavaScript/Notes/EventNotificationSystem|Event Notification System]]===
Line 77: Line 88:
  
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 +
  
 
=== [[JavaScript/Notes/DomEvents|DOM Events Adapter]]===
 
=== [[JavaScript/Notes/DomEvents|DOM Events Adapter]]===
Line 84: Line 96:
  
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 +
  
 
== [[JavaScript/Notes/Factory|Factory]] ==
 
== [[JavaScript/Notes/Factory|Factory]] ==

Revision as of 18:32, 7 January 2014

You down with OOP? - Yeah you know me!

Contents

Introduction

Teacher: Garrett Smith Held Wed and Friday, 7-9pm, Sunday 9:30 AM

Twitter: @xkit (follow & mention).

LinkedIn: Garrett Smith (endorsements welcome)

Web: http://dhtmlkitchen.com/

dhtmlkitchen at gmail.com

Overview: JavaScript Language Fundamentals and design patterns for web programming.

Resources Web Development Resources


Debugging

Browsers provide debuggers that can be launched from a breakpoint, the application's menu, or the debugger keyword in the script.


Parameter Object

Passing around lists of parameters? Typechecking arguments? Stop doing that. Here's how to make your code clearer and less error-prone.


Type Conversion

There are five primitive types in JavaScript: Null, Undefined, Boolean, String, Number. Various operations in JavaScript require conversion to and from primitive values.


ClassName Swap

Event Delegation and the Cascade.


Functions

Functions are callable objects with an internal [[Scope]] property. Learn how to call functions and pass functions to other functions, where they can be later called.


Array Methods added to EcmaScript 5

Sort, map, filter, and more.

Prerequisite: Functions.


Prototype

The prototype chain is used for reading property resolution.

User-defined functions can be used to construct new objects. Objects have, on their prototype chain, the constructor's prototype.

Prerequisite: Functions.


Scope Chain and Identifier Resolution

This class covers closures.

Prerequisite: Functions.


Custom Events

Fire custom events from your own user-defined objects.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Singleton

Singleton with information hiding in function scope.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Interface-Based Design

Prerequisite: Custom Events.

Two interfaces with a similar signature. The Devil's in the details -- encapsulate them!


Event Notification System

An abstract system for event notification.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


DOM Events Adapter

An system for DOM event notification, designed to handle delegation and specific event models.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Factory

The Factory pattern, the Decorator pattern, newApply, and the holy grail: Abstract Factory.

Prerequisite: Functions.

Prerequisite: Parameter Object

Prerequisite: Scope Chain and Identifier Resolution.

Personal tools