Locality of Behavior principle (LoB):

by Mar 20, 2024

Locality of Behavior principle (LoB):

“The behavior of a unit of code should be as obvious as possible by looking only at that unit of code.”

This principle is starting to get more and more traction. I like it.

You see it in components like React/Vue/Svelte. One file containing code, style, and markup.

Using this one-file approach in .NET Blazor / Razor is my favorite way to write for the web.

Tailwind CSS is also pushing this principle.

Gone are the days of abstractions on top of abstractions? I hope so!


Subscribe to
The Daily Friction

A daily newsletter on automation and eliminating friction

Related Content

Standup meetings

Standup meetings Why have a Teams channel where everyone can post what they are struggling with, so anyone can respond to help and start a 1-on-1 call. If we can have 15-min meetings informing everyone once a day.

read more

Complexity <> Sophisticated

Complexity <> Sophisticated It can be just overly complex, because the person who created it didn't understand it well enough. Teachers face the challenge of breaking down complex subjects for their students. The ability to simplify abstract ideas without losing...

read more
Share This