JavaScript/Notes/: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
(Undo revision 47017 by TimFerris (talk))
 
(84 intermediate revisions by 7 users not shown)
Line 1: Line 1:
You down with OOP? - Yeah you know me!
You down with OOP? - Yeah you know me!
== Introduction ==
'''Overview:''' JavaScript Language Fundamentals and design patterns for web programming. See [[JavaScript]].


In this course, I'll explore Object Oriented JavaScript as it pertains to client side web programming.
'''Teacher:''' [[User:Garrett|Garrett Smith]]  


== [https://noisebridge.net/wiki/JavaScript/Notes/Introduction Introduction] ==
'''Resources'''
Hearken to the days of <code>view-source:</code>! The history of free online education for web programming led the web where it is today.
[[Web Development Resources]]


== [https://noisebridge.net/wiki/JavaScript/Notes/Array Array Methods added to EcmaScript 5]==


== [https://noisebridge.net/wiki/JavaScript/Notes/Scope Scope Chain and Identifier Resolution]==
'''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:
<blockquote><p>ECMAScript defines the standard for JavaScript ([http://ecma-international.org/ecma-262/5.1/#sec-1 &sect; 1]).</p></blockquote>


== [https://noisebridge.net/wiki/JavaScript/Notes/IBD Interface-Based Design]==
All references used in this class are linked from the [[Web Development Resources]] page.
Two interfaces with a similar signature. The Devil's in the details -- encapsulate them!


=== [https://noisebridge.net/wiki/JavaScript/Notes/EventNotificationSystem Event Notification System]===
== [[JavaScript/Notes/Debugging|Debugging]] ==
Browsers provide debuggers that can be launched from a breakpoint, the application's menu, keyboard shortcut, or the debugger keyword in the script.
 
 
== [[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.
 
 
== [[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.
 
 
== [[JavaScript/Notes/ClassnameSwap|ClassName Swap]] ==
Event Delegation and the Cascade.
 
 
== [[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.
 
 
== [[JavaScript/Notes/Array|Array Methods added to EcmaScript 5]]==
Sort, map, filter, and more.
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
 
== [[JavaScript/Notes/Prototype|Prototype]] ==
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:''' [[JavaScript/Notes/Function|Functions]].
 
== [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]]==
This class covers closures.
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
 
== [[JavaScript/Notes/CustomEvents|Custom Events]] ==
Fire custom events from your own user-defined objects.
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
 
== [[JavaScript/Notes/Singleton|Singleton]] ==
Singleton with information hiding in function scope.
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
 
== [[JavaScript/Notes/IBD|Interface-Based Design]] ==
 
'''Prerequisite:''' [[JavaScript/Notes/CustomEvents|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!
 
 
=== [[JavaScript/Notes/EventNotificationSystem|Event Notification System]]===
An abstract system for event notification.
An abstract system for event notification.
=== [https://noisebridge.net/wiki/JavaScript/Notes/DomEvents DOM Events Adapter]===
 
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
 
=== [[JavaScript/Notes/DomEvents|DOM Events Adapter]]===
An system for DOM event notification, designed to handle delegation and specific event models.
An system for DOM event notification, designed to handle delegation and specific event models.


== [https://noisebridge.net/wiki/JavaScript/Notes/Factory   Factory]==
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
== [[JavaScript/Notes/Factory|Factory]] ==
The Factory pattern, the Decorator pattern, newApply, and the holy grail: Abstract Factory.
The Factory pattern, the Decorator pattern, newApply, and the holy grail: Abstract Factory.


== [https://noisebridge.net/wiki/JavaScript/Notes/ParameterObject Parameter Object] ==  
'''Prerequisite:''' [[JavaScript/Notes/Function|Functions]].
Passing around lists of parameters? Typechecking arguments? Stop doing that. Here's how to make your code clearer and less error-prone.
 
'''Prerequisite:''' [[JavaScript/Notes/ParameterObject|Parameter Object]].
 
'''Prerequisite:''' [[JavaScript/Notes/Scope|Scope Chain and Identifier Resolution]].
 
== [[JavaScript/Notes/PrivateProxy|PrivateProxy]] ==
The private proxy exposes a public interface object. This public interface object delegates some of its responsibility to a private instance.


<!-- The truth:  
'''Prerequisite:''' [[JavaScript/Notes/Factory|Factory]].


I hoped she would support me as a musician so that we could each be successful.  
== [[JavaScript/Notes/Testing|Testing]]==
Unit testing with YUI Test.


JavaScript? :-(
== [[JavaScript/Notes/Promises|Promises]] ==
-->
ECMAScript 6 Promises.

Latest revision as of 22:13, 7 March 2015

You down with OOP? - Yeah you know me!

Introduction[edit]

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]

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]

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]

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]

Event Delegation and the Cascade.


Functions[edit]

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]

Sort, map, filter, and more.

Prerequisite: Functions.


Prototype[edit]

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]

This class covers closures.

Prerequisite: Functions.


Custom Events[edit]

Fire custom events from your own user-defined objects.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Singleton[edit]

Singleton with information hiding in function scope.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


Interface-Based Design[edit]

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]

An abstract system for event notification.

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.


DOM Events Adapter[edit]

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

Prerequisite: Functions.

Prerequisite: Scope Chain and Identifier Resolution.

Factory[edit]

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]

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]

Unit testing with YUI Test.

Promises[edit]

ECMAScript 6 Promises.