Re: The use of modules (or not)



Yes thats true - and of course if you are using the singleton pattern, your
singleton object can be the only instance. Many times you might want to use
the class elsewhere in non-global situations.

"Chad Z. Hower aka Kudzu" <cpub@xxxxxxxxx> wrote in message
news:Xns967CAA6545B96cpubhowerorg@xxxxxxxxxxxx
> "Robin Tucker" <idontwanttobespammedanymore@xxxxxxxxxxxxxxx> wrote in
> news:d9900l$k7f$1$8300dec7@xxxxxxxxxxxxxxxx:
>> If you really want to use globals, google for the singleton pattern.
>> There is absolutely nothing wrong with "global" variables in this
>> context, as long as they are managed properly and you protect the
>
> You dont need a singleton to make globals. Its really easy. Declare a new
> class, and add some
> public static (shared in VB) fields, thats it.
>
>
> --
> Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
> "Programming is an art form that fights back"
>
> Empower ASP.NET with IntraWeb
> http://www.atozed.com/IntraWeb/


.



Relevant Pages

  • Re: Singleton Pattern
    ... that uses the singleton pattern to create just about everything. ... When you skip globals and start to pass variables ... you alter your design so that you don't have to do that as ... you discover that not everything needs the database and your design ...
    (comp.object)
  • Re: The use of modules (or not)
    ... If you really want to use globals, google for the singleton pattern. ... is absolutely nothing wrong with "global" variables in this context, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: The use of modules (or not)
    ... > If you really want to use globals, google for the singleton pattern. ... > context, as long as they are managed properly and you protect the ... You dont need a singleton to make globals. ...
    (microsoft.public.dotnet.languages.vb)
  • Singleton
    ... The intent of the Singleton pattern as defined in Design Patterns is to ... to make such a Singleton object a global object? ...
    (comp.object)
  • Re: Stop Disposing of an Object Which Inherits From a Control
    ... Do you know any samples showing usage of Singleton object in the compact ... > Hi Chris, ... > You might want to look into the Singleton pattern. ...
    (microsoft.public.dotnet.framework.compactframework)