Tuesday, March 8, 2016

Pluralsight: Structuring JavaScript

March 8, 2016

2 hours on course: Structuring JavaScript on pluralsight, from 8:00pm - 10:00pm.

Julia is a big fan of pluralsight online courses. She spent time to read JavaScript books in 2014 over 6 months; while this time the learning is more effective with excellent teaching.

She still works on how to take courses on pluralsight. She likes to take notes, and tracks her progression.

Read technical article by the course lecturer:

1. Techniques, Strategies and Patterns for Structuring JavaScript Code

2. the prototype pattern

3. the revealing module pattern

Take learning check later.

5 out 10 incorrect questions:

Which of the following code samples demonstrate creating closure:
Answer:



Related clip: Closure Demo 2

JavaScript's "this" keyword always represents the current object instance being used.
Answer:
False

Related Clip: Using the Revealing Prototype Pattern with 'this'

Which pattern is the best one to use with JavaScript code?
Answer:
There isn't one "best solution"

What features does the Revealing Module Pattern offer?
Answer: All of above
  Define public and private members
  Can include a self-calling function
  Encapsulates code

What is a  key difference between the Prototype and Revealing Prototype patterns?

Answer:
Revealing Prototype allows public and private members to be defined.

Notes to review:
The Prototype Pattern
Pros:
Leverage JavaScript's built-in features
"Modularize" code into re-usable objects
Variables/ functions taken out of global namespace
Functions loaded into memory once
Possible to "override" functions through prototyping

Cons:
"this" can be tricky
Constructor separate from prototype definition

Actionable Item

Dec. 20, 2016
Share the blog on the stackexchange.com - Radix Sort Code Review

No comments:

Post a Comment