On this page
  1. Object-Oriented Programming
  2. Contents
  3. Encapsulation & Polymorphism
  4. Class-Based vs. Prototype-Based Dispatch
  5. Composition Over Inheritance

Object-Oriented Programming

Prev: Imperative & Procedural Programming | Up: paradigms | Next: Functional Programming
Rel: Python OOP, Python Object & MRO, JS Prototype Chain, Modularity, Cohesion & Coupling
Ref: Wikipedia — Object-Oriented Programming
Tags: #public #prog #programming #paradigms #oop


Contents


Encapsulation & Polymorphism

OOP groups state and the operations that preserve its invariants into objects:


Class-Based vs. Prototype-Based Dispatch


Composition Over Inheritance

Deep inheritance hierarchies tightly couple subclasses to parent internals (the fragile base class problem). Prefer composition (holding collaborator objects that implement small interfaces) over multi-level class inheritance.

Linked from

Related notes