Error!
Success!

Avoiding Dependencies

0
kicks

Avoiding Dependencies  (Unpublished)

As a rule, code should not directly depend on external resources such as System.Net.Mail's email sending capabilities. Having code that directly calls out to System.Net.Mail is difficult to unit test as well as difficult to walk through in a test or stage environment without having actual emails sent. Two design patterns can be used to reduce this dependency: Facade and Strategy. The Strategy pattern offers a host of benefits above and beyond what the facade layer provides, as this articles demonstrates with code examples.


Kicked By:
Drop Kicked By: