Un atelier d'architecture · Édition d'ApprentissageAn Architecture Workshop · Learning Edition

Strategy, ou le comportement qu'on injecteStrategy, or the behavior you inject

Un if/else qui grandit d'une branche à chaque nouveau cas transforme une fonction stable en liste ouverte qu'on rouvre à l'infini. Strategy nomme ce qui varie — la formule — l'extrait derrière un contrat et la passe au code qui s'en sert. Puis le fil rouge du volume : quand le contrat n'a qu'une méthode, l'objet n'était qu'une fonction déguisée.An if/else that grows a branch per case turns a stable function into an open list you reopen forever. Strategy names what varies — the formula — extracts it behind a contract and passes it to the code that uses it. Then the volume's red thread: when the contract has a single method, the object was just a function in disguise.

AudienceAudience
Dev qui veut retirer un switch sans sur-construire une hiérarchieDev who wants to remove a switch without over-building a hierarchy
Format
Self-paced
ChapitresChapters
5
Date
Juin 2026June 2026
≈ 18 min●○○○Patterns d'objetsStrategyTradeoff
🔒

La suite est réservéeThe rest is members-only

Le premier numéro est libre. Débloque tout The Architecture Loop — tous les volumes, à vie — pour 5 €, paiement unique.The first issue is free. Unlock all of The Architecture Loop — every volume, forever — for €5, one-time.

Retour au kiosqueBack to newsstand