Videos

Modular Javascript – Prototypal Pattern vs Classical OOP in JS

2 years 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 […]

Modular Javascript #6 – Classical Inheritance & OOP with JS

2 years 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 #5 – PubSub Implementation

3 years 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 #4 – PubSub Javascript Design Pattern

3 years 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 #2 – Converting jQuery to an Object Literal Module

3 years 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 […]