Blake Caraway

Design Patterns

Decouple Your Code For Testability

I've received a handful of comments/questions surrounding part of the code sample from my previous post. The comments I received have to do with the few lines of code in the Authentication WebService that included a custom interface and a call to a third party tool. Here's the code in question: public class Authentication : WebService{ private IWebContext _webContext = ObjectFactory.GetInstance&l... [WebMethod] public bool IsLoggedIn() { return this._webContext.IsUserAuth...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati