Archive for the ASP.Net Component One Category

Hi guys,

If we know better about the design pattern, it will be usefull a lot for us to build the reusable software component like we want to achieve it, one of the famous pattern is singeleton and much of developer especially in web development until this time still confuse to implemented. Now i wanna to discuss the common usage of singeleton pattern in aspnet which always shown in development project. Lets rock and roll …

There may be numerous programming scenarios when we may need to restrict an
object to a single instance. Some of them are:

  • A single instance of a mail server might be required to process all incoming
    mail requests.
  • The Session object in ASP.NET is implemented using singleton pattern. That
    is why each user will have only one session instance accessible at any point
    of time.
  • The Application object in ASP.NET is also singleton based. There is only
    one instance of the Application object for an entire application.
    We may need a single instance of a logging utility to process all logging
    requests in our application.

(more…)