> Gday dotnetters, > > Ever since I switched to vb.net i find im using Modules more and more, > rarely creating classes, particularly at the entry point into a few utility > console apps im working on. This definitely feels wrong, is it just bad > design? Should i be learning OO design again? > > As an example say Im rewriting msbuild or similar tool, i can see myself > just creating a single method in a Module and that'l be it. Is that bad? > what if it is all i need? Should i create a class with a single Run method? > Seems overkill.... > > Look forward to some responses, perhaps Im hungover :)
>From here : >http://weblogs.asp.net/alex_papadimoulis/archive/2004/06/17/158295.aspx It seems that modules are just some sort of static-method-like thing. And while I completely disagree with the example in that blog post, for a VB.NET programmer that may be useful. I agree with his conclusion: do it if it feels good. Regarding writing an application that consists entirely of a "Run" method. Well, sure, if it only does one (very short) thing. But when it starts to do more you'll naturally end up with a nicer design as a result of implementing it correctly. -- silky http://www.programmingbranch.com/