title: Singleton pattern with Web application, Not a good idea!
body: <p>I found something funny, I notice it by luck while I was debugging other thing.  I was applying MVP pattern and I made a singleton controller to be shared among all presentations. </p>
  
  <p>Suddenly I figured out that some event is called once at first postback, twice if there is two postback, 100 times if there is 100 postbacks.</p>
  
  <p>because Singleton is based on a static variable which hold the instance, and the static variable live across postbacks, and I wired the event assuming that it will be wired once, and rewired for each postback.</p>
  
  <p>I think we should think twice before applying a singleton in a web application, or I miss something??</p>
  
  <p>thanks  </p>