Modular Javascript #3 - Revealing Module Pattern Javascript Tutorial
The revealing module pattern allows us to create private variables in a Javascript Module.
Here's a writeup on this pattern:
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#revealingmodulepatternjavascript
Here's the code for this video:
http://codepen.io/anon/pen/ZGoKYN?editors=101
Here's video 1 in case you missed it:
https://www.youtube.com/watch?v=HkFlM73G-hk&index=18&list=PLoYCgNOIyGACnrXwo5HMCfOH9VT05znGv
We write a revealing module pattern by starting with a self-executing anonymous function also known as an IIFE (immediately invoked function expression).
This runs a function and sets it's return value as our module's value. If we return an object of methods, then those methods are what other modules have "public" access to. What's nice about this, is we can create any variables within the function and no other modules have access to them unless we expose them via our return object.
Modular JS #1 - Object Literal Pattern pt 1:
https://www.youtube.com/watch?v=HkFlM73G-hk&index=1&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f
Modular JS #2 - Object Literal Pattern pt 2:
https://www.youtube.com/watch?v=m-NYyst_tiY&index=2&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f
Modular JS #3 - Revealing Module Pattern:
https://www.youtube.com/watch?v=pOfwp6VlnlM&index=3&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f
-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
https://www.youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-
Видео Modular Javascript #3 - Revealing Module Pattern Javascript Tutorial канала LearnCode.academy
Here's a writeup on this pattern:
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#revealingmodulepatternjavascript
Here's the code for this video:
http://codepen.io/anon/pen/ZGoKYN?editors=101
Here's video 1 in case you missed it:
https://www.youtube.com/watch?v=HkFlM73G-hk&index=18&list=PLoYCgNOIyGACnrXwo5HMCfOH9VT05znGv
We write a revealing module pattern by starting with a self-executing anonymous function also known as an IIFE (immediately invoked function expression).
This runs a function and sets it's return value as our module's value. If we return an object of methods, then those methods are what other modules have "public" access to. What's nice about this, is we can create any variables within the function and no other modules have access to them unless we expose them via our return object.
Modular JS #1 - Object Literal Pattern pt 1:
https://www.youtube.com/watch?v=HkFlM73G-hk&index=1&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f
Modular JS #2 - Object Literal Pattern pt 2:
https://www.youtube.com/watch?v=m-NYyst_tiY&index=2&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f
Modular JS #3 - Revealing Module Pattern:
https://www.youtube.com/watch?v=pOfwp6VlnlM&index=3&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f
-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
https://www.youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-
Видео Modular Javascript #3 - Revealing Module Pattern Javascript Tutorial канала LearnCode.academy
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
JavaScript Modules: From IIFEs to CommonJS to ES6 ModulesModular Javascript #4 - PubSub Javascript Design PatternJS Interview - Revealing Module - Question 3What Is The Fastest Way To Load JavaScriptJavascript Design Patterns #1 - Factory PatternModular Javascript - Javascript Tutorial on the Object Literal PatternSingleton Pattern - Design PatternsModular Javascript #2 - Converting jQuery to an Object Literal ModuleJavascript Closure tutorial ( Closures Explained )JavaScript ES6 ModulesAsync JavaScript - Callbacks, Promises, Async/AwaitUnderstanding The Factory Design PatternJavascript Design Patterns #2 - Singleton PatternNull Object Pattern - Design PatternsJavaScript Modules with Import/Export Syntax (ES6) - JavaScript Tutorial16 JavaScript Module Pattern and Revealing Module PatternJavaScript Patterns: The Traditional Module PatternJS "this" and Function References - What is it all about?