flâneur — a map of the web's best reading

Design Patterns

grantslatton.com · 3,301 words · saved by 1 readers

A software design pattern is just what the name suggests: a pattern that comes up repeatedly in software design. Just like an architect may design two different houses, there are a lot of similar problems faced. For example, where to position the door to a room? The middle of a wall? The corner? Does it open in or out? A skilled architect may say "this is a small bedroom, so I'll apply the corner-door-that-swings-outwards pattern". The architect has used his experience to match a common situation to a common solution. That's a design pattern. In code, you may have a situation where you need to keep around several different pieces of state in order to construct objects that need the state. Maybe all these different pieces of state are tedious to keep organized. This is a common problem! And it has a common solution — the "factory pattern" discussed more below. Design patterns are much-maligned, but that's just because people blow them out of proportion, and that generates an equal and o

Design Patterns A software design pattern is just what the name suggests: a pattern that comes up repeatedly in software design. Just like an architect may design two different houses, there are a lot of similar problems faced. For example, where to position the door to a room? The middle of a wall? The corner? Does it open in or out? A skilled architect may say "this is a small bedroom, so I'll apply the corner-door-that-swings-outwards pattern". The architect has used his experience to match a common situation to a common solution. That's a design pattern. In code, you may have a situation w

Explore this link on the map →

saved by

related reading