Skip to main content

The four pillars

Abstraction, encapsulation, inheritance and polymorphism are the four ideas every object-oriented language is built to express. Design patterns are just these four applied under pressure, repeatedly, to specific recurring problems - Strategy is polymorphism with a name, Facade is encapsulation drawn around a whole subsystem, Template Method is inheritance with the parent in charge of the order of operations.

Each pillar gets its own page here: the definition and what actually breaks without it, worked examples in at least two unrelated domains, the language mechanics an interview expects you to know cold, the mistake almost everyone makes with it once, and where it resurfaces in the patterns catalogue.

0%0 of 154 pages studied