JavaScript The Hard Parts: Object Oriented Programming

  Рет қаралды 55,740

Codesmith

Codesmith

Күн бұрын

Go under the hood of Object Oriented Programming and the prototype chain with Will, Codesmith CEO and Co-founder. You will develop a better understanding in:
- 4 approaches to object-oriented programming in JavaScript
- Prototype, _proto_ and the prototype chain
- Factories, constructors, and classes
- ES5 and ES6 approaches
0:00 - Introduction
1:01 - The OOP paradigm
4:13 - Our application: building a quiz game
6:21 - Objects store functions with their associated data
8:48 - Using dot notation to create and access properties
9:42 - Bracket notation vs dot notation
11:29 - Object.create method
13:39 - Keeping our code DRY: using a function to generate objects
15:12 - Running userCreator function
19:54 - What’s the problem with our solution?
21:48 - Optimizing our solution
22:34 - The prototype chain
19:24 - Going under the hood: the “bond” between an object and its prototype
33:43 - The “this” keyword
37:12 - Can we optimize our solution further?
39:09 - The “new” keyword
42:44 - Functions as objects
47:16 - Diagramming our third solution
1:00:01 - The global object
1:02:20 - Tradeoffs of the “new” keyword solution
1:03:23 - ES6 classes: “syntactic sugar”
1:08:49 - Tradeoffs of classes
1:09:33 - Closeout
To test your understanding of these concepts and find more videos, challenges, and solutions you can make a free account on CSX - csx.codesmith.io/
SUBSCRIBE for more! 👉tinyurl.com/codesmithsub 👈
Stay connected to our community!
Codesmith: www.codesmith.io/
Learn JavaScript for Free: csx.codesmith.io/
Free Events & Workshops: www.codesmith.io/coding-events
Follow us to stay updated!
Facebook: / codesmithhq
Instagram: / codesmithio
Twitter: / codesmith_
LinkedIn: / codesmith-llc
#codesmith #objectorientedprogramming #learntocode

Пікірлер: 137
@denisskobalj7555
@denisskobalj7555 4 жыл бұрын
Take notes teachers - this is how you teach! Well done, Will!
@ziamaylan876
@ziamaylan876 3 жыл бұрын
😂
@dhoomketu731
@dhoomketu731 2 жыл бұрын
Well said. This guy is ridiculously good at explaining complicated stuff.
@JasmondWorks247
@JasmondWorks247 Жыл бұрын
@@dhoomketu731 wow. I guess I’ll have to jump on this video, cause this area is complicated for me
@thefallenvalley4340
@thefallenvalley4340 6 ай бұрын
@@dhoomketu731 the simpler one explains, the more they understand it
@timkelly9886
@timkelly9886 3 жыл бұрын
I have been watching videos about object-oriented programming for 7-days straight and this is the best explanation I've come across. I can't recommend this enough and I will be watching all of Codesmith's videos on JavaScript. Thank you, Will, you're teaching style is engaging, fun and no bullshit. P.S. We need a Bootcamp like yours in Sydney, Australia!
@Codesmith
@Codesmith 3 жыл бұрын
Thanks Tim
@timkelly9886
@timkelly9886 3 жыл бұрын
@@Codesmith awesome, I'm sure they're learning a tonne
@mentoriii3475
@mentoriii3475 2 жыл бұрын
ikr, seeing how few people discovered these amazing videos I consider myself lucky i discovered them
@nirajkhatriya2771
@nirajkhatriya2771 2 жыл бұрын
Exactly 👍
@ManontheBroadcast
@ManontheBroadcast 4 жыл бұрын
By far, the best explanation ever, from an instructor that knows the inner-workings of JavaScript.
@jared2224
@jared2224 2 жыл бұрын
Wow! I'm smiling from ear to ear after watching this video because I understand all differences for object creation in js now. The best explanation I've come across as a newbie to javascript!
@Codesmith
@Codesmith 2 жыл бұрын
Thanks Jared - have a look at the closure/callback sessions too and the async one from Michael - should be quite useful
@charname2077
@charname2077 Жыл бұрын
Such an underrated video. I'm blown away by your explanation. This video deserves millions.
@mstamp3291
@mstamp3291 Жыл бұрын
I learned more about the inner workings of JavaScript in this 1 hour video than I have in the last 2 weeks in the full stack bootcamp I'm currently in. Unreal! Thank you so much Will!
@dhoomketu731
@dhoomketu731 2 жыл бұрын
Will is a magician. One heck of a teacher.
@TheMakeupmonika
@TheMakeupmonika 3 жыл бұрын
I truly love this guy. I finally understand what really happens under the hood. I could watch you for hours . Thank you so so much . Your students are really lucky !!!
@salemalmulaifi
@salemalmulaifi 3 жыл бұрын
By far the best video I’ve watched about the subject. Thank you.
@williamdaghouz
@williamdaghouz 2 жыл бұрын
Will’s teaching skills are on a different level. His pedagogy is absolutely amazing.
@nevyanamomchilova8153
@nevyanamomchilova8153 Жыл бұрын
I am just amazed, not only this but all the videos I found in the Codesmith channel are just great! Very well explained, I feel lucky to have found you! Thank you a lot :) Will, your teachings, in particular, are the top, you are a natural talent in that!
@priyajitmukherjee7878
@priyajitmukherjee7878 3 жыл бұрын
Your teaching like peeling off a product and then putting it piece by piece... hats off
@Codesmith
@Codesmith 3 жыл бұрын
Thanks Priyajit - we'd recommend the live workshop now
@unrecited
@unrecited 2 жыл бұрын
best teacher ever - only one who finally opened my eyes to javascript and how it works even after spending years studying it never clicked until I watched his series on
@lizardonastick
@lizardonastick 3 жыл бұрын
Will is that rare thing, a great teacher. I've watched a wide variety of instructional videos on KZbin and elsewhere and taught for some time myself. He's made understanding why and how JavaScript works so much easier.
@jenso413
@jenso413 2 жыл бұрын
brilliant video, this needs way more views. I have been struggling to understand OOP for literally MONTHS, and this just made everything click. thank you, so much edit: I still come back to this video every couple of months lol. So helpful
@priyanayak7942
@priyanayak7942 2 жыл бұрын
Oh my god I was under impression I new OOP in javascript I was wrong . You made it so simpler and I don't have to go back and read again and again same topic. This is really fundamental and easy to understand Thank a ton for sharing the knowledge !!
@MegaDonaldification
@MegaDonaldification 2 жыл бұрын
Thank YOU very much. I finally understand the beautiful science of Object Oriented Programming in Javascript. Now I can disctinctively think of what I would term as data and was I will need to do for functionality. your heavenly concept has bridged and rearranged my thought processes. These was both an active and passive interview coupled with the best, second-to-known scintillating diagramming I have ever witnessed online. Thank you very very much.
@justyna6134
@justyna6134 4 жыл бұрын
The best explanation ever = one one has ever so successfully peeled off OPP = excellent job Mr.CodeSmith ! And 1:01:29 = BINGO !
@webmandman
@webmandman 3 жыл бұрын
Amazing Will. I just learned more about Javascript in this hour than in years of other learning.
@Codesmith
@Codesmith 3 жыл бұрын
That's so good to hear Daniel - thanks so much 🙏
@PIRAKAS666
@PIRAKAS666 3 жыл бұрын
Such an amazing teacher.
@karineghazaryan4202
@karineghazaryan4202 3 жыл бұрын
This teacher is amazing, he explains everything perfectly understandable. Huge thanks.
@Codesmith
@Codesmith 3 жыл бұрын
Glad it was helpful
@zubairumusa9848
@zubairumusa9848 Жыл бұрын
Thanks Will, this helps me a lot in understanding the inner working of the JavaScript OOP. This is recommended to anyone learning JavaScript
@emirmartinez2116
@emirmartinez2116 4 жыл бұрын
Thank you!!! This was a great explanation.
@codellyson
@codellyson 2 жыл бұрын
This is teaching and you Will are a great teacher.
@mohitpassan5388
@mohitpassan5388 Жыл бұрын
Can't thank you enough for this crystal clear explanation! Giving a like and a comment does not feel enough for the knowledge you just passed on to me. Thank you so much!
@Codesmith
@Codesmith Жыл бұрын
Thank you Mohit!! Best thing is to hear the enjoyment
@thesuperiorman8342
@thesuperiorman8342 3 жыл бұрын
One of the best videos I watched on JavaScript. Your teaching style is superb. You're truly gifted
@Codesmith
@Codesmith 3 жыл бұрын
Super kind 🙏
@sideshowlol
@sideshowlol 2 жыл бұрын
When a teacher actually knows what they are talking about, and when they have the necessary teaching ability, it's very apparent. Will is one of those teachers. Thank you Will and the Codesmith team for making this video available: a clear and understandable explanation of Javascript OOP, taught in a way that also makes it fun to learn. Brilliant!
@daryllmamaril4225
@daryllmamaril4225 2 жыл бұрын
Thank you! You make learning actually fun and engaging! Really enjoyed this class!!!!
@Codesmith
@Codesmith 2 жыл бұрын
Thanks Daryll 🙏
@hugon4
@hugon4 2 жыл бұрын
man even with this ads i love this content free on youtube thank you so much the explanation was amazing
@Pharizer
@Pharizer 2 жыл бұрын
Such an amazing teacher! Wow.
@whatthef911
@whatthef911 Жыл бұрын
This is the best video on JavaScript OOP which is fundamentally different than other language OOP. I believe lecture type videos offer the best explanations. I only understood asynchronous C# after watching a detailed lecture.
@jon8236
@jon8236 Жыл бұрын
fantastic video, by far the best explanation I have seen so far.
@SZOKE19940321
@SZOKE19940321 3 жыл бұрын
I am really impressed by this video. The lesson was full of life, the explanations were clear and spot on. So far the most comprehensive resource I have come across. Disappointed by the view & like numbers, deserves much much more. Thank you.
@Codesmith
@Codesmith 3 жыл бұрын
Glad it was helpful 🙌 feel free to share it 😂
@oladotunolufemi
@oladotunolufemi 2 жыл бұрын
This is amazing 💪🏽. The best so far.
@Rajakumar-yg4nc
@Rajakumar-yg4nc Жыл бұрын
what a great explanation ! totally a masterpiece.
@wenli9351
@wenli9351 2 жыл бұрын
The best explanation ever!!! Thank you, Will, you are the best!
@Codesmith
@Codesmith 2 жыл бұрын
Thanks Wen! So glad you enjoyed it - let us all know more topics you'd like to learn about
@emmanuelmathew5594
@emmanuelmathew5594 10 ай бұрын
you are a great teacher . Rare and priceless skill you posses . HATSOFF
@sumairqaisar2565
@sumairqaisar2565 4 жыл бұрын
He is the Richard Feynman of coding..........Absolute skill!!!!!!
@MegaDonaldification
@MegaDonaldification 2 жыл бұрын
Thank you very much for showing me all I know right now as [[JavaScript The Hard Parts: Object Oriented Programming]]. The "Seven Heavens and Unearthing of Javascript OBject ORIented PROGramming" === $$$$$$ ${Data&&Functionality}
@AmitKumar-vy3so
@AmitKumar-vy3so 2 жыл бұрын
one of the best that I have seen sir! I have watched most of the frontend masters you are the best...can you please take on React and optimizations
@nontakennick
@nontakennick Жыл бұрын
Wonderful lecture! Thank you Will!
@BleedingFryTheHeart
@BleedingFryTheHeart 3 жыл бұрын
This gentleman right here is brilliant
@NoudvD63
@NoudvD63 2 жыл бұрын
Loud applause for this explanation! Thanks Will.
@Codesmith
@Codesmith 2 жыл бұрын
Glad you enjoyed it!
@markovujanic
@markovujanic 3 жыл бұрын
If you just now discovered Will, consider yourself lucky, he's a legend and he's style of teaching is the way.
@Codesmith
@Codesmith 3 жыл бұрын
Thanks Marko
@NavdeepSinghEr
@NavdeepSinghEr 2 жыл бұрын
Will, Thanks for the effort. It is a really enlightening lecture regarding the new keyword, _proto_, Prototype. It will certainly help me to nail down interviews.
@Codesmith
@Codesmith 2 жыл бұрын
Amazing Navdeep - good luck with them too
@ankansaha642
@ankansaha642 3 жыл бұрын
Absolutely great
@Fe6b0lA
@Fe6b0lA 2 жыл бұрын
Amazing way to break it down! 🔥
@adamtoth2089
@adamtoth2089 2 жыл бұрын
This is pure gold..
@wbaloo1
@wbaloo1 2 жыл бұрын
Amazing teaching style!
@Aiducateur
@Aiducateur 3 жыл бұрын
Finally, all becomes clear!
@AlexBurov-wk8my
@AlexBurov-wk8my Жыл бұрын
this one was good and informative.Thank you very much
@thefallenvalley4340
@thefallenvalley4340 6 ай бұрын
phenomenal teaching Will👍
@nsikakakpan6638
@nsikakakpan6638 Жыл бұрын
Great tutorial video, i now full understand OOP, thanks to Codesmith KZbin channel.
@MegaDonaldification
@MegaDonaldification 2 жыл бұрын
Thank you very much.
@anthonyhaddad5630
@anthonyhaddad5630 3 жыл бұрын
You definitely deserve more subs and views!
@Codesmith
@Codesmith 3 жыл бұрын
Super kind of you Anthony - feel free to share with the world! :D
@Hizbullla
@Hizbullla 2 жыл бұрын
Brilliant work.
@learnings.academy
@learnings.academy 3 жыл бұрын
i am big of this man, i watched your courses on frontend masters (sadly i couldn't buy course due to my financial limitation and found some where on pirated site, hope you forgive my this action so that i can get relief) great explanation, thank you so much, you deserve more then this, 💕❤
@CharlesRyu
@CharlesRyu 3 жыл бұрын
LOL, I wonder if Will cares about the pirating. Happy that you got to learn though.
@vikumravinayake1882
@vikumravinayake1882 3 жыл бұрын
Best debugger ever man. Thank you very much 👌✌🤟
@Codesmith
@Codesmith 3 жыл бұрын
Thank you 🎉 👍
@stevehapp
@stevehapp 3 жыл бұрын
great explanation. I was thoroughly confused about javascript objects and proto thingiees..
@Codesmith
@Codesmith 3 жыл бұрын
@Steve - glad it was helpful 🙏
@adrianoprovenzano8973
@adrianoprovenzano8973 7 ай бұрын
Really easy to understand explanation of OOP in JS
@Codesmith
@Codesmith 7 ай бұрын
Happy to hear you enjoyed this one! We have a live OOP workshop this Thursday if you are interested in attending: app.codesmith.io/coding-events/javascript-the-hard-parts-classes-and-prototypes-remote-only/2984
@surfphilosophy01
@surfphilosophy01 2 жыл бұрын
Valuable content... Thumbs Up
@mentoriii3475
@mentoriii3475 2 жыл бұрын
Very helpful videos, I'm surprised about the low views your videos have, I consider myself lucky I found these videos
@kandelaarjan363
@kandelaarjan363 2 жыл бұрын
truly amazing.
@pushpakgupta22
@pushpakgupta22 3 жыл бұрын
I will not be one of them is going to be my motto from now. This is like elixir of OOP in js. I will share it to my friends definitely.
@BrantK147
@BrantK147 3 ай бұрын
Brilliant!
@JJ-ot3ps
@JJ-ot3ps 2 жыл бұрын
this guy is amazing!
@christopherirish2804
@christopherirish2804 3 жыл бұрын
Excellent.
@Codesmith
@Codesmith 3 жыл бұрын
Thank you Christopher - glad you like the course
@MEWIIE
@MEWIIE 3 жыл бұрын
Great video!
@fredpies
@fredpies 2 жыл бұрын
great lesson
@imran_ashraf
@imran_ashraf Жыл бұрын
Amazing! 🙂
@arthursato8343
@arthursato8343 3 жыл бұрын
Brilliant pedagogy
@Codesmith
@Codesmith 3 жыл бұрын
Thanks Arthur 💙
@MrYomantanepali
@MrYomantanepali 3 жыл бұрын
Will Will be making more videos ? ( his explanation ) on Closures was just amazing ....
@adamradiv
@adamradiv 3 жыл бұрын
+1. just let man curse and swear, I love it when he's super comfortable :D
@malvin_gaming
@malvin_gaming 2 жыл бұрын
This is so good
@liammahoney1748
@liammahoney1748 3 жыл бұрын
brilliant
@benaliissameddine5697
@benaliissameddine5697 Жыл бұрын
God Bless you 🧡
@Knochenkotzer01
@Knochenkotzer01 2 жыл бұрын
Thanks for this great content. 💥💥💥
@Codesmith
@Codesmith 2 жыл бұрын
Thank you Marian!
@user-pe9qg3hg3k
@user-pe9qg3hg3k 2 жыл бұрын
wow this guy is great
@pluscday2
@pluscday2 3 жыл бұрын
Excellent + 1
@pushpakgupta22
@pushpakgupta22 3 жыл бұрын
21:24 "aaahhh....salmon skin roll"😂 . No jokes this is really really insightful and informative. Had to pause and cite this from friends tho😄😅
@jasonvictor1798
@jasonvictor1798 4 жыл бұрын
Dense video but fantastic!
@icebridge3940
@icebridge3940 3 жыл бұрын
This is that front end DEV oxford education i never had 😭
@sg1894
@sg1894 2 жыл бұрын
I wish I had a teacher as good as him
@Codesmith
@Codesmith 2 жыл бұрын
Thank you! There's more videos that you're welcome to watch
@MegaDonaldification
@MegaDonaldification 2 жыл бұрын
I just realised that parameters and variables inside a function are classed as local variables. And, I thank all of your coleagues from Udemy and film crew that made this videos and others alike on this channel. I am super grateful. I have always struggled with understanding the execution context and have never done one in my whole life until I met you guys on this channel. I have always wanted to find a programmer that teach by diagramming and breaking down each line like day separate fron night, seasons from other seasons. Thank you very much. Words alone can not express how I feel and think right now since I was mesmerised and dazzled by your simplification of programming as a whole. Thank you very much. I strongly feel that i have been dipped in ecma script. Thank you.
@adamradiv
@adamradiv 3 жыл бұрын
58:49 - we've achieved code. stonks
@Codesmith
@Codesmith 3 жыл бұрын
Honored to get a 'stonks' mention
@taofeeqomotolani2311
@taofeeqomotolani2311 Жыл бұрын
What a video😍😍
@Codesmith
@Codesmith Жыл бұрын
Thank you Taofeeq!!!
@sivacharan3987
@sivacharan3987 2 жыл бұрын
Sir,I have a doubt in oop in JavaScript.when can implement anything in JavaScript without oop also.Then what is the use of oop in JavaScript?When do We use oop in JavaScript?
@TheInfamousAlpha
@TheInfamousAlpha 4 жыл бұрын
Under the hood of under the hood OOP
@SuperNZY
@SuperNZY 2 жыл бұрын
they(whoever might be) are always talking about the 'this' keyword in a nested object, and how the keyword is bound to the object's context. For example, how this is bounded in a nested object: const test = { google: true, studiedAt: function() { console.log(this.google) // yes }, where: { location:'L.A.', getLocation: function() { console.log(this.location); // ''L.A.' } } } BUT NO ONE says that : this is always bound to the object on the left-hand-side of the dot (LEGACY) min 36:17. GOLD
@mustafahamid5443
@mustafahamid5443 Жыл бұрын
best ever
@Nanito354
@Nanito354 Жыл бұрын
👍 thumbs
@het314
@het314 3 жыл бұрын
Finally found the video...
@DelannaLeonard
@DelannaLeonard 7 ай бұрын
😭😭😭😭I finally get it!
@Codesmith
@Codesmith 7 ай бұрын
🎉 Awesome!
@logannelsen4932
@logannelsen4932 6 ай бұрын
the sigh at the end lol
@MegaDonaldification
@MegaDonaldification 2 жыл бұрын
Whether or not i get an IT web developer job.
@kllokoq
@kllokoq 2 жыл бұрын
Having a programmer on standby whenever new user joins social media to enter all the data manually, is the way to solve the problem of complexity
@ibsagoalball
@ibsagoalball 3 жыл бұрын
reminds me of the teacher in willie wonka
@TiffanyNg100
@TiffanyNg100 2 жыл бұрын
Don't want to be rude, but the thumbnail caught me off guard. I thought the image on the thumbnail was a criminal because the orange shirt and the white background and how it was shot. Make me wonder why I search for oop for js and get the "news"
@Aaron-sy5yx
@Aaron-sy5yx 3 жыл бұрын
I'm lost from the 3rd one on.
@nickeax
@nickeax 3 жыл бұрын
I think the code example shown on the bottom left of the screen was slightly different to the one the class was viewing. So 'functionStore' for us was actually 'userFunctionStore' for the students in the video.
@nadir15
@nadir15 3 жыл бұрын
Good talk! But the Javascript language author is an absolute idiot! Problem with these individuals is that they haphazardly patch up a language by copying other language concepts, there by making a language inelegant. Contrast this with the design of C++, where every single new concept is studied by a committee in depth and then the new syntax of the language is very carefully selected so the concept is naturally introduced in the language in a very elegant way. Every new character and keyword introduction is debated and pondered upon greatly to ensure that it is most simple for the users of the language. Why would anyone want to confuse function and objects? They are intuitively different things by definition.
@Codesmith
@Codesmith 3 жыл бұрын
I think that's a well put point - it's got a lot better in the past few years - dramatically more thoughtful introduction of new features etc
@nickeax
@nickeax 3 жыл бұрын
He had two weeks to make it!
@brunobueno5638
@brunobueno5638 Жыл бұрын
good video, but very bad audio
JavaScript the Hard Parts: Async & Promises
2:31:24
Codesmith
Рет қаралды 5 М.
JavaScript the Hard Parts: Closure, Scope & Execution Context
57:05
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 8 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 148 МЛН
How many pencils can hold me up?
00:40
A4
Рет қаралды 19 МЛН
6.2: Classes in JavaScript with ES6 - p5.js Tutorial
20:09
The Coding Train
Рет қаралды 399 М.
What is __proto__ ? | Javascript Prototypes Tutorial
23:11
Dave Gray
Рет қаралды 40 М.
Object-oriented Programming in JavaScript: Made Super Simple | Mosh
1:02:49
Programming with Mosh
Рет қаралды 1,9 МЛН
CppCon 2014: Mike Acton "Data-Oriented Design and C++"
1:27:46
JavaScript the Hard Parts: Classes and Prototypes (OOP)
1:45:56
Codesmith
Рет қаралды 1,5 М.
Топ-3 суперкрутых ПК из CompShop
1:00
CompShop Shorts
Рет қаралды 420 М.
Mi primera placa con dios
0:12
Eyal mewing
Рет қаралды 497 М.
Nokia 3310 versus Red Hot Ball
0:37
PressTube
Рет қаралды 3,8 МЛН