Using instance vs static facade

Topics: Caching Application Block , Cryptography Application Block, Data Access Application Block, Exception Handling Application Block, General discussion, Logging Application Block, Policy Injection Application Block, Security Application Block, Validation Application Block
Jan 28, 2010 at 8:34 PM

Hello,

What are the advantages and disadvantages of using instances vs static facades in App Blocks? For example, in Logging App Block, there are Logger and LogWriter; in Exception App Block, there are ExceptionPolicy and ExceptionManager, and so on.

Why not always use static since it provides more overrides for methods? If the answer is for Unity injection, why bother if static is always available?

 

Thanks

Jan 29, 2010 at 2:29 AM

I think this will help - http://blogs.msdn.com/bobbrum/archive/2009/06/23/enterprise-library-5-0-some-architecture-changes.aspx

And some insights on static and instance factories -http://www.theserverside.com/discussions/thread.tss?thread_id=9059

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com