Introduction - Classes and Object Oriented Programming (OOP) - Javascript In Depth

preview_player
Показать описание
We learn about the concepts behind Object Oriented Programming (OOP) in Javascript and how they build upon the idea or Prototypes. We also compare this to how other traditional OOP-based languages might work like Java or C++.

We rebuild the basic class constructor using functions and the new keyword to see how the work behind the scenes. This show us how the class syntax helps automate some of this work for us with its constructor function. We also check out how to initialize the class state using the this keyword as well as class fields.

We then wrap up the video by looking at class methods and how they relate to methods on the prototype of an object.

Note that this is an advanced topic and will take a lot of practice and trying different things over time to really cement. We'll go through some practice exercises together on the class syntax, constructor function and class methods in the next video in the series.

Chapters:
00:00 Introduction
01:32 What is OOP really about?
06:25 Model a Fantasy Game
08:40 4 Principles of OOP
11:06 JS-Specific OOP Considerations
13:20 Modelling a Player V1
15:15 Modelling a Player V1 Code
19:11 Modelling a Player V2
20:25 Modelling a Player V2 Code
25:00 Class Syntax and Constructor
26:44 Coding our first Player Class
41:19 Class Methods
43:00 Class Methods Code Example
52:19 Class Fields
54:23 Next Steps

Рекомендации по теме
Комментарии
Автор

I just can't understand how his channel is so underrated because his explanations gotta be one of the best, if not the best I have come across on the internet.

confusion
Автор

you're supposed to be a teacher in MIT, though we're so lucky to have you here with us, thank you so much mr. Nader

siraj_safed
Автор

i would like to comment to all of your videos, you are amazing, you explain everything well !! Proud of you really

TheHarist
Автор

Your video is awesome...u were able to explain the fact that object can have individual state as instances of a class or function constructor.

you also made it clear that both the constructor in a class and any other function, variable or even object that we may add within the class are all on the class prototype which is useable by all instances of the Class.

You also explained the FUNCTION CONSTRUCTOR....e.g function AnotherObj(){}
using Another.prototype.say(){} I just added the say function to the prototype like I could place say(){} within a class outside a constructor

You also said that the content of the constructor of a class is for the instance level

THANK YOU VERY MUCH🙏
KINDLY... explain the other concept of OOP and FUNCTIONAL PROGRAMMING

abahiduh
Автор

Your videos are really good. You deserve more recognition.

monistorm
Автор

Great video man ! don't think i'v seen anyone make it this simple yet. Appreciate it dude ! keep going !

MyhzyMusic
Автор

hahaha love how everything keeps getting complicated ;) so far so good, thanks Nader, pretty awesome explanation.

raulbonillaclaramunt
Автор

Best tutorial on intro to OOP. Thanks!

mukacibai
Автор

This is the most accurate explanation of OOP and Classes that I've seen!

k.bernadett
Автор

so by that you mean that there is no differace between the class and self made construct function liked the way you present these hard anologies to geather

Abulkhair
Автор

Damn, you're officially the most underrated channel on YT!

maxpauwels
Автор

Yes! I've been waiting for this video!

alveek
Автор

Really like your explanation of Class. Never thought it can be done in other ways.

psychemist
Автор

Monkeys are the best and Nader is the best! Thanks for a great explanation about classes + OOO

hannaohandrews
Автор

شكرا جزيلاً على هذا الفيديو الرائع نادر💚🌿
Thanks alot for this great video Nader💚🌿

muhammadghanayem
Автор

One of fhe best videos, really nice job

ammarhaidar
Автор

thanks a lot for this video, such great quality of teaching! You deserve more views and more subscribers! here is one more \m/

OXIDE-isgs
Автор

it was an amazing lesson, thank yuo <3

gijbfhjm
Автор

Good explaination, thank for your effort

JungTechLingo
Автор

Explanation better than paid courses out there

ajaybains
welcome to shbcf.ru