Singletons are most useful for Application settings, where you want the
object instantiated for the app and any changes in settings affect all
users.You could put your connection settings in a singleton, for example.
A data layer can be implemented as Static methods, ala the Microsoft Data
Access Application Block, but a Singleton is not a good idea unless everyone
is accessing the same exact data in the same exact manner, or you do not
mind if another person alters someone else's data access path. As this is
not a normal situation, this is not a good place for a singleton pattern.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Srini" <rs*************@yahoo.com> wrote in message
news:0a****************************@phx.gbl...
Hi ,
Can anyone tell me when I can use singleton pattern. Will
it be good for implementing the dataaccess Layer. Will it
be usefull for the buisness object layer . Could you give
me a practicle example for using the singleton object.
Regards,
Srini