Sessions

Modular Javascript – Javascript Tutorial on the Object Literal Pattern

Modular Javascript – Javascript Tutorial on the Object Literal Pattern

1 year ago
This javascript tutorial covers the javascript object literal pattern for web developers. We’ll cover how to build a basic module in javascript. The object literal pattern is also shown in this great e-book by Addy Osmani: addyosmani.com/resources/essentialjsdesignpatterns/book/#modulepatternjavascript The simplest pattern for modular javascript is the object literal pattern – it adds all values and methods […]
Modular Javascript #2 – Converting jQuery to an Object Literal Module

Modular Javascript #2 – Converting jQuery to an Object Literal Module

1 year ago
In this video, we’ll convert plain jQuery code to an object literal module. It will still use jQuery, but the pattern will be much cleaner and easier to maintain. Missed video #1? youtu.be/HkFlM73G-hk Source code for this video: Web developers often don’t see the value of changing the way they write javascript code – this […]
Modular Javascript #3 – Revealing Module Pattern Javascript Tutorial

Modular Javascript #3 – Revealing Module Pattern Javascript Tutorial

1 year ago
The revealing module pattern allows us to create private variables in a Javascript Module. Here’s a writeup on this pattern: addyosmani.com/resources/essentialjsdesignpatterns/book/#revealingmodulepatternjavascript Here’s the code for this video: Here’s video 1 in case you missed it: We write a revealing module pattern by starting with a self-executing anonymous function also known as an IIFE (immediately invoked […]
Modular Javascript #4 – PubSub Javascript Design Pattern

Modular Javascript #4 – PubSub Javascript Design Pattern

1 year ago
Last video, we covered the revealing module pattern – where we expose an API allowing modules to talk to each other. This works well for smaller amounts of modules, but can have issues when many modules need to talk to each other. Here’s the pubsub code I’m using in this example: gist.github.com/learncodeacademy/777349747d8382bfb722 In this video, […]
Modular Javascript #5 – PubSub Implementation

Modular Javascript #5 – PubSub Implementation

1 year ago
Let’s take the pubsub pattern that we learned from the last video and integrate it with a few other JS modules. The result will be 2 modules that are very loosely coupled to other modules. This loose coupling will allow the application to grow significantly larger without encountering problems. Again, here’s the pubsub code I’m […]
Modular Javascript #6 – Classical Inheritance & OOP with JS

Modular Javascript #6 – Classical Inheritance & OOP with JS

1 year ago
In this video, we will start covering object oriented programming in Javascript. There are several ways to do it – the first is called “classical inheritance”. Here’s the link to the “inherit” function I use here: github.com/nodejs/node-v0.x-archive/blob/master/lib/util.js#L634-L644 Using a constructor, a prototoype, and the “new” keyword, we can create multiple copies or “instances” of a […]
Modular Javascript – Prototypal Pattern vs Classical OOP in JS

Modular Javascript – Prototypal Pattern vs Classical OOP in JS

1 year ago
While many JS devs still use classical OOP, many have switched to the prototypal pattern for Module Inheritance and Instantiation. Here’s the prototypal pattern for JS and why some devs find it simpler to use. View Classical Inheritance here: View the whole modular JS playlist here: SOURCE CODE HERE: codepen.io/anon/pen/gaggvG?editors=001 Basically, when coding JS OOP […]