Re: Classes vs. Modules
An application that starts from the command line with different potential
switches attached is the one I had in mind. Another could be applications
that start differently based on the user logged into the domain. Really,
any application that has multiple startup paths where those startup paths
are determined in a non-GUI way.
"Tom Leylan" <tleylan@nospam .netwrote in message
news:e4uIhvUTHH A.496@TK2MSFTNG P06.phx.gbl...
An application that starts from the command line with different potential
switches attached is the one I had in mind. Another could be applications
that start differently based on the user logged into the domain. Really,
any application that has multiple startup paths where those startup paths
are determined in a non-GUI way.
"Tom Leylan" <tleylan@nospam .netwrote in message
news:e4uIhvUTHH A.496@TK2MSFTNG P06.phx.gbl...
Scott: Rather than just say "can benefit greatly" try to list one item,
two or three if there are than many benefits. I personally know of no
benefit so if you posted one it would help me and I'm sure others. What
don't we understand about this?
>
>
"Scott M." <s-mar@nospam.nosp amwrote in message
news:O79iODUTHH A.1636@TK2MSFTN GP02.phx.gbl...
>
>
two or three if there are than many benefits. I personally know of no
benefit so if you posted one it would help me and I'm sure others. What
don't we understand about this?
>
>
"Scott M." <s-mar@nospam.nosp amwrote in message
news:O79iODUTHH A.1636@TK2MSFTN GP02.phx.gbl...
>But don't forget that not all apps are Windows Forms apps. Console apps
>can benefit greatly from sub main.
>>
>>
>"Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
>news:UaqdnU71u 9Zty1DYnZ2dnUVZ WhednZ2d@comcas t.com...
>>
>>
>can benefit greatly from sub main.
>>
>>
>"Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
>news:UaqdnU71u 9Zty1DYnZ2dnUVZ WhednZ2d@comcas t.com...
>>On 2007-02-10, Scott M. <s-mar@nospam.nosp amwrote:
>>>But if you were to create a class that handled program flow during
>>>startup,
>>>you'd be doing extra work to get you to exactly what you could have
>>>automaticall y with a module and Sub Main.
>>>>
>>>>
>>>"Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
>>>news:9PqdnSI fra5JplDYnZ2dnU VZ_uHinZ2d@comc ast.com...
>>>>On 2007-02-09, Scott M. <s-mar@nospam.nosp amwrote:
>>>>>I don't know if I agree with that. A module can be used as a
>>>>>starting
>>>>>point
>>>>>for your application along with a Sub Main. This can be helpful in
>>>>>directin g the flow of the application startup.
>>>>>
>>>>So can a class.
>>>>>
>>>>--
>>>>Tom Shelton
>>>
>>It's not any extra work to make a class the startup object versus a
>>module -
>>well except for maybe making a private sub new so that no one can make
>>instances of your Program class.
>>>
>>Of course, in VB 2005 - you pretty much have to use a form as your
>>startup
>>object anyway. You dont' get to do a submain. Well, that isn't
>>strictly
>>true, but if you want to use the application framework that VB.NET
>>provides
>>then you do (and why wouldn't you - visual styles, single instance app,
>>settings, etc).
>>>
>>--
>>Tom Shelton
>>>But if you were to create a class that handled program flow during
>>>startup,
>>>you'd be doing extra work to get you to exactly what you could have
>>>automaticall y with a module and Sub Main.
>>>>
>>>>
>>>"Tom Shelton" <tom_shelton@co mcastXXXXXXX.ne twrote in message
>>>news:9PqdnSI fra5JplDYnZ2dnU VZ_uHinZ2d@comc ast.com...
>>>>On 2007-02-09, Scott M. <s-mar@nospam.nosp amwrote:
>>>>>I don't know if I agree with that. A module can be used as a
>>>>>starting
>>>>>point
>>>>>for your application along with a Sub Main. This can be helpful in
>>>>>directin g the flow of the application startup.
>>>>>
>>>>So can a class.
>>>>>
>>>>--
>>>>Tom Shelton
>>>
>>It's not any extra work to make a class the startup object versus a
>>module -
>>well except for maybe making a private sub new so that no one can make
>>instances of your Program class.
>>>
>>Of course, in VB 2005 - you pretty much have to use a form as your
>>startup
>>object anyway. You dont' get to do a submain. Well, that isn't
>>strictly
>>true, but if you want to use the application framework that VB.NET
>>provides
>>then you do (and why wouldn't you - visual styles, single instance app,
>>settings, etc).
>>>
>>--
>>Tom Shelton
>>
>
Comment