Should I use a singleton pattern in my design? RRS feed

  • Question

  • User1361142914 posted

    Hi everybody,

    Let me explain some of my classes to ask if singleton pattern should be implemented. For example, I will have an InventoryManager class which will be used to create new inventoy record in db and manage existing inventoy items specified by their itemIDs. These inventoy items will be represented by InventoryItem class by:

    InventoryItem myItem = new InventoryItem(itemid);

    What do you think about my design? If it is fine, should InventoryManager class be Singleton? If it is singleton then would it create problem for seperate clients? I read much about singleton impelementation in c# however I could not ensure the way I should implement it in my case.

    Best regards..

    Saturday, April 3, 2010 3:33 PM


All replies