Benjamin Balder Bach on Nostr: If you need to convince someone about the importance of "Locality of Behavior" (LoB) ...
If you need to convince someone about the importance of "Locality of Behavior" (LoB) in #Django, show them a large project that attempted to do "don't repeat yourself" (DRY) on a bunch of Django Rest Framework serializers 🍝
It's a pattern I've seen repeated with both models, forms and class-based views. Class-inheritance invites DRY'ing of loosely related objects that often turn out to diverge once the project has evolved.
Anyways good luck out there with the DRY'ing, LoB'ing and YAGNI'ing 🤹♂️
Published at
2025-08-12 09:50:27 UTCEvent JSON
{
"id": "ae96181fed6b9417ff80075fe2536931849c9106e57614e81aab5884e767490e",
"pubkey": "63252c368d5c7aee5a206d7756c29719807c3eb4289b01e101a2090233a1c2ac",
"created_at": 1754992227,
"kind": 1,
"tags": [
[
"proxy",
"https://social.data.coop/@benjaoming/115015170649668638",
"web"
],
[
"t",
"django"
],
[
"proxy",
"https://social.data.coop/users/benjaoming/statuses/115015170649668638",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://social.data.coop/users/benjaoming/statuses/115015170649668638",
"pink.momostr"
],
[
"-"
]
],
"content": "If you need to convince someone about the importance of \"Locality of Behavior\" (LoB) in #Django, show them a large project that attempted to do \"don't repeat yourself\" (DRY) on a bunch of Django Rest Framework serializers 🍝\n\nIt's a pattern I've seen repeated with both models, forms and class-based views. Class-inheritance invites DRY'ing of loosely related objects that often turn out to diverge once the project has evolved.\n\nAnyways good luck out there with the DRY'ing, LoB'ing and YAGNI'ing 🤹♂️",
"sig": "2a085048fd89c1b241a6e3dde5ffebe907b041536bcaec2309808ec8b835ee0af709916cd0fb610f1f7afae790c529f8b5b478f30c50ccc118092db0315b04ff"
}