Search
Lessons (14)
- Interfaces vs Abstract Classes
An interface is a contract with no code; an abstract class is a half-built parent with shared …
- Abstraction
… That's abstraction paying off. Abstract classes: a partly built blueprint An abstract class can't be created …
- D — Dependency Inversion Principle
High-level business logic should depend on abstractions, not on concrete details like databases or email providers. The …
- OOP Mistakes and Interview Questions
… Encapsulation is a lock; abstraction is a simple dashboard. </details <details <summary <strong 4. Interface vs abstract class …
- KISS: Keep It Simple, Stupid
… class NotificationStrategyFactory { create(type) { return new (this.registry.get(type))(); } } class AbstractNotificationStrategy { send() { throw new Error("abstract"); } } class …
- SOLID at a Glance
… exporters class ExcelExporter { export(report) {} } // without editing old ones class ReportService { constructor(repository, notifier) { // D: injected abstractions this …
- What Is Object-Oriented Programming?
… the data is protected by the object class BankAccount { balance = 0; // private: only code inside the class can …
- Which Pattern Do I Need?
… God object One class that knows and does everything Split by responsibility (SRP) Premature abstraction Interfaces with a …
- Creational Patterns: How to Make Objects
… One place decides which class to create new + if/else repeated everywhere Abstract Factory Create matching families of …
- Inheritance
… notifications ts abstract class Notification { constructor(protected recipient: string, protected message: string) {} send() { if (!this.message.trim()) throw …
- What Are Design Patterns?
… JavaScript's first-class functions , closures and modules make several of them much simpler: - Strategy → just pass a …
- What Is Software Architecture?
… lives 🔴 High Design How is one part organised? Classes, patterns (Strategy, Repository), module APIs 🟡 Medium Code How …
- JavaScript Language Fundamentals
… values vs references, equality and coercion, let/const scope, functions, objects and prototypes, classes, modules, array methods and …
- Structural Patterns: How to Connect Objects
… making incompatible pieces fit, adding features without editing classes, and hiding complexity behind simple fronts. --- 1. Adapter 🔌 Analogy …