OO JavaScript Training

Duration: 1 Day

Course Overview:

In this object-oriented JavaScript training class, you will learn that JavaScript is in fact an object-oriented language although its OO features are not usually used by most JavaScript programmers. You will learn how write JavaScript to take advantage of these object-oriented features.

Course Objectives:

·         Learn that JavaScript is, in fact, object oriented.

·         Learn to create new objects in a variety of ways.

·         Learn to be careful with the this keyword.

·         Learn the difference between call() and apply().

·         Learn to extend existing objects.

·         Learn the differences between class-based and prototype-based programming.

·         Learn to construct objects from other objects.

·         Learn how JavaScript accomplishes inheritance.

·         Learn to define constructor functions.

·         Learn how JavaScript resolves object members.

·         Learn about the prototype object.

Course Outline:

Object-Oriented Aspects of JavaScript

·         Introduction to JavaScript is Object Oriented

·         Why Create JavaScript Objects?

·         Creating Simple Objects

o   Building objects

o   Declaring objects

o   Using factory functions

o   Constructors

·         Memory usage

·         The perils of this

·         Calling or Applying functions

·         Extending Existing Objects

·         Merging Objects

·         Dynamic Languages

o   Duck Typing

    • Implement Duck Typing in OO JS

·         Private members

Prototype-Based Programming

·         Class-Based Programming

·         Prototype Based Programming

o   Prototyping

·         Prototypal Inheritance

o   Overriding Properties

·         Constructor functions and prototypes

·         Altering the prototype


·         Extending Standard JavaScript objects