5 ms·
What they meant by DRY is otherwise known as SPOT — Single Point Of Truth — which is harder to misinterpret. The same “truth” — which can be data, values, behav
by layer8 7y ago
What they meant by DRY is otherwise known as SPOT — Single Point Of Truth — which is harder to misinterpret. The same “truth” — which can be data, values, behavior, policy, etc. — should not be defined multiple times in separate places, because a future change would have to be applied to all the places, or else cause different parts of a program or datastore to have inconsistent views on what the “truth” is.
If you google for it, you will find the synonymous “Single Source Of Truth”, which however makes for a worse acronym.
- maest 7y agoIncidentally, this may explain why caching is hard - cache invalidation in particular. By definition, it must violate this SPOT/SSOT principle.
- layer8 7y agoWhile there is a thematic connection, SPOT is usually more of a design-time (or coding-time) principle. Caches still represent the same source, just time-delayed.
- regularfry 7y agoThat's not quite true; it's closer to say that it's very easy to design a cache mechanism which accidentally violates SPOT.