4 ms·
If I’ve understood then, a narrow waist architecture follows two principles: - code to an interface not an implementation - segregate interfaces, don’t overlo
by blowski 2y ago
If I’ve understood then, a narrow waist architecture follows two principles:
- code to an interface not an implementation
- segregate interfaces, don’t overload them with responsibilities
- layer8 2y agoThat’s not really an architecture though, it’s just basic principles of modularization.
- blowski 2y agoTrue, which is perhaps why it's unclear what the difference is between a "skinny waist" and hexagonal architecture, "ports and adapters".
- mrkeen 2y agohexagonal architecture gives you the direction of the "waist", not its thickness. You could have a really skinny interface (one method call only): class TaxLogic { data = iDatabase.loadOneDatabaseRow(id); process(data); } interface IDatabase { loadOneDatabaseRow(id); } class PostgresDb implements IDatabase { loadOneDatabaseRow(id) {...} } But this violates ports and adapters because the logic is on the outside and the database is on the inside.