Composition vs. Inheritance

twitter logo github logo ・1 min read

I've only recently begun digging into some of the more formal aspects of designing Javascript applications. One thing that has stuck out to me in my research lately has been the significance of choosing whether to use Composition or Inheritance as a model for object creation.

It now seems obvious to me that using Factory Functions and a model of Composition has so many advantages over using traditional Class inheritance, that I can't imagine ever going back. This has all been theoretical for me thus far, but I'm hoping to get some good opportunities to apply these concepts soon.

twitter logo DISCUSS
Classic DEV Post from Aug 8 '18

Should tech companies use quotas to increase diversity?

Experts in diversity and inclusion share their thoughts on whether companies need to use quotas to increase diversity when hiring.

Sam E. Lawrence profile image
Learning Javascript for testing and pleasure. Focused on writing front-end tests in Cypress.