A JavaScript developer's guide to Rails: What does Composition Over Inheritance mean?
SMRTR summary
Rails relies heavily on inheritance and mixins, confusing JavaScript developers used to explicit imports. While framework code uses inheritance, thoughtbot recommends composition for application code. Composition makes dependencies visible through constructor injection, enables faster testing with doubles, and eliminates hunting through inheritance chains to understand code structure.
SMRTR provides this summary for quick context. The original article belongs to Daily.dev.
Read the original article