3 ms·
Small quibble, I really like inverting the (business logic) –> (persistence) dependency. That way your business logic drives everything, which aligns with your
by ellius 7y ago
Small quibble, I really like inverting the (business logic) –> (persistence) dependency. That way your business logic drives everything, which aligns with your point about the app being "logic with an HTTP interface." Agree wholeheartedly with the rest.
- veeralpatel979 7y agoThanks! Are you suggesting business logic depends on persistence or persistence depends on business logic? How is the second option possible?
- ellius 7y agoThe second option is possible if you declare an abstract dependency (preferably just a contract like an interface) and make your persistence layer implement it. I highly recommend "Clean Architecture" if you'd like to learn more about that approach.