OOP
OOP
ELI5 — The Vibe Check
OOP is a way of organising code by modelling the world as objects — things that have properties (what they are) and methods (what they do). A Dog object has a name, a breed, and can bark(). Everything is a thing with stuff and actions.
Real Talk
Object-Oriented Programming is a paradigm that structures software around objects — instances of classes — rather than functions and logic alone. Core pillars are encapsulation, inheritance, abstraction, and polymorphism.
Show Me The Code
class Animal {
constructor(public name: string) {}
speak(): string { return "..."; }
}
class Dog extends Animal {
speak(): string { return "Woof!"; }
}
new Dog("Rex").speak(); // "Woof!"
When You'll Hear This
"We're using OOP patterns throughout the backend." / "OOP vs functional is a classic holy war in programming."
Related Terms
Class
A class is a blueprint for creating objects.
Functional Programming
Functional programming is like cooking with strict rules: no shared bowls, no side dishes contaminating each other, and every dish must be exactly reproduc...
Generic
A generic is like a recipe that works for any ingredient.
Interface
An interface is like a job description. It says 'whatever fills this role must be able to do X, Y, and Z' without caring how they do it.
Method
A method is just a function that belongs to an object or class. Your Dog object has a bark() method — it's the dog's personal function.