Singleton nerelerde kullanılır?

Genel olarak bir sınıftan kaç tane obje üretilidğini kontrol etmek istendiğinde singleton yapısı kullanılmış olur.Tek bir nesneye ihtiyaç duyulan durumlarda (veri tabanı bağlantıları, port bağlantıları, dosya işlemleri, loglama işlemleri,bildirimlerde, iş katmanı servislerimizde) kullanılır ..

Read more

What is a factory constructor?

A factory constructor is a constructor that can be used when you don’t necessarily want a constructor to create a new instance of your class . This might be useful if you hold instances of your class in memory and don’t want to create a new one each time (or if the operation of creating an instance is costly).

Read more