Object Oriented Programming Best Practices
summary
Advocates defining private class fields and pairing them with getter/setter methods so assignments run validation, using JavaScript’s class accessors as classic properties; insists to call super in constructors so parent initialization and future changes apply to subclasses; recommends a toString per class and to define custom exception classes (throw objects not strings); argues SOLID principles improve maintainability and that adopting TypeScript yields clearer, safer OOP.
AI-written summary · about
chapters (11)
- 0:00Start
- 1:32Best Practice
- 3:30Code Sample
- 15:10The toString Method
- 15:44Exceptions Classes
- 17:38The SOLID Design Principles
- 17:56Single Responsibility
- 19:33Open Closed
- 22:23Liskov Substitution
- 24:29Interface Segragation
- 25:27Dependency Inversion
related talks
45mBeyond design patterns and principles - writing good OO code
24mThe Dangers of Object-Oriented Designs
01h 00mBack to Basics: Object-Oriented Programming
45mOOP revisited
38mWhat Object-Oriented Programming Was Supposed to Be: Two Grumpy Old Guys’ Take on ...
51mFunctional Principles for Object Oriented Development
54mPatterns for Programming in JavaScript
58m#OOP vs Data Oriented Programming Which One to Choose
