Рет қаралды 47,550
Guard clauses, on the surface, sound like a great idea. They can reduce conditional complexity by exiting a method or function early. However, I find how guard clauses are used in the real world to be of little value. Often polluting application-level code for trivial preconditions. I will refactor some code to push those preconditions to the edge of your application so your domain focuses on real business concerns.
🔗 EventStoreDB
eventsto.re/codeopinion
🔔 Subscribe: / @codeopinion
💥 Join this channel to get access to source code & demos!
/ @codeopinion
🔥 Don't have the JOIN button? Support me on Patreon!
/ codeopinion
📝 Blog: codeopinion.com
👋 Twitter: / codeopinion
✨ LinkedIn: / dcomartin
📧 Weekly Updates: mailchi.mp/63c7a0b3ff38/codeo...
0:00 Intro
0:48 Refactor
2:38 Edge
3:38 Application Core
5:35 Web
7:30 Application Request
9:19 Tests
#softwarearchitecture #softwaredesign #codeopinion