Avoiding Dependencies(stevesmithblog.com)

submitted by ssmithssmith(1160) 3 years, 8 months ago

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.

add a comment |category: |Views: 558

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story