4 ms·
DRY to me means having a single authoritative source. So for instance, if I need to define a person data structure then I use protobuf. I can add validation rul
by eweise 3y ago
DRY to me means having a single authoritative source. So for instance, if I need to define a person data structure then I use protobuf. I can add validation rules, and types to it. I can generate bindings for java, go, ruby, etc and they can all rely on the same person structure, with the same validations. Code is technically copied but there is still a single authoritative source.
If I need handle bank transactions, then I will create a single "microservice" that knows how to create a transaction and update the account balance. I wouldn't want that logic duplicated in multiple places.