Back to Browse

Composition vs Inheritance in JavaScript

12.4K views
Oct 18, 2017
12:22

This is more of an intermediate topic in JavaScript. Understanding the implications of how you architect your applications will help you down the road as your application becomes more mature and requires updates. Inheritance and Composition are two approaches to designing your Objects to be maintainable. This video focuses on the weakness of Inheritance when your objects start to morph in the future. The examples in this video are built without Classes. They use Object.create and Object.assign to show the more standard JavaScript syntax. Code GIST: https://gist.github.com/prof3ssorSt3v3/14e0432af3add454f59d7ffcc0e18ee4 If you want more information about how to use Object.create( ) or Object.assign( ) watch these: Object.assign: https://www.youtube.com/watch?v=UkGsRyGeI2g Object.create: https://www.youtube.com/watch?v=qqyZn8X9M3I

Download

1 formats

Video Formats

360pmp417.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Composition vs Inheritance in JavaScript | NatokHD