1 posts in topic
Flat View  Flat View

Posted By:   Raj_Joe
Posted On:   Thursday, October 14, 2004 10:05 AM

Can I make all the classes that do not carry any data as singleton.What I mean is I have a delegator class which need not be instantiated for all the requests.I just need one instance as it just has delegation code and no data.

Re: Doubt

Posted By:   priya_soparkar  
Posted On:   Friday, October 29, 2004 12:29 AM

I think the explaination of your doubt is not very much clear and explainatory.

The basic purpose of singleton class is not related to having data inside the class or not.

The main aim of singleton class is to have a single instance of the class to be present in the application.

The ideal example being your connection class that is shared between multiple application modules.

And as far as your doubt of delegation is concerned , are you trying to use the facade pattern ?

Please elaborate more on your requirement,

About | Sitemap | Contact