I am asking a design question .
Assume that there is a class in the Application (Where all the requests go through this particular class)
Could anybody please tell me whether it is good to make this particular class as Singleton or not ??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If this class have properties like DB connection info, or other “global” settings, it’s a good idea to think it as a Singleton Class. Other benefit is that if the class is Singleton, you don’t need to instantiate it every time you need it, there will be just only one instance.