You dont know js prototypal inheritance

broken image

'Class/Inheritance' describes a certain form of code organization and architecture - a way of modeling real world problem domains in our software. But there's a lot of concept and pseudo-code to wade through first, so don't get lost - just stick with it! Class Theory

broken image

We eventually relate these ideas to real concrete JavaScript code in the second half, when we talk about 'Mixins'. Note: This chapter spends quite a bit of time (the first half!) on heavy 'objected oriented programming' theory. We'll see that these concepts don't really map very naturally to the object mechanism in JS, and the lengths (mixins, etc.) many JavaScript developers go to overcome such challenges. We'll first look at 'class orientation' as a design pattern, before examining the mechanics of 'classes': 'instantiation', 'inheritance' and '(relative) polymorphism'. Please ignore this stuff.įollowing our exploration of objects from the previous chapter, it's natural that we now turn our attention to 'object oriented (OO) programming', with 'classes'.

broken image
broken image

You Don't Know JS yet: Objects & Classes - 2nd Edition Chapter 4: Mixing (Up) 'Class' Objects NOTE:Įverything below here is previous text from 1st edition, and is only here for reference while 2nd edition work is underway.