JavaScript/Notes/: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
(Undo revision 47017 by TimFerris (talk))
 
(One intermediate revision by one other user not shown)
(No difference)

Latest revision as of 22:13, 7 March 2015

You down with OOP? - Yeah you know me!

Introduction[edit | edit source]

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

Teacher: Garrett Smith  

Resources Web Development Resources


Reference Conventions: Each section points to specific sections of the pertinent specification for any given subject matter, and for ECMAScript, with a linked section marker. For example:

ECMAScript defines the standard for JavaScript (§ 1).

All references used in this class are linked from the Web Development Resources page.

Debugging[edit | edit source]

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


Parameter Object[edit | edit source]

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


Type Conversion[edit | edit source]

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[edit | edit source]

Event Delegation and the Cascade.


Functions[edit | edit source]

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[edit | edit source]

Sort, map, filter, and more.

Prerequisite: Functions.


Prototype[edit | edit source]

The prototype chain is used by the engine 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[edit | edit source]

This class covers closures.

Prerequisite: Functions.


Custom Events[edit | edit source]

Fire custom events from your own user-defined objects.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Singleton[edit | edit source]

Singleton with information hiding in function scope.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Interface-Based Design[edit | edit source]

Prerequisite: Custom Events.

Two Event Registry interface objects that share a similar signature, each with a different implementation detail suited for a specific task. The Devil's in the details -- encapsulate them!


Event Notification System[edit | edit source]

An abstract system for event notification.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


DOM Events Adapter[edit | edit source]

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

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.

Factory[edit | edit source]

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

Prerequisite: Functions.

Prerequisite: Parameter Object.

Prerequisite: Scope Chain and Identifier Resolution.

PrivateProxy[edit | edit source]

The private proxy exposes a public interface object. This public interface object delegates some of its responsibility to a private instance.

Prerequisite: Factory.

Testing[edit | edit source]

Unit testing with YUI Test.

Promises[edit | edit source]

ECMAScript 6 Promises.