Console Application Structure
- by Paul Fox
I've written several .Net Console Applications over the past 6 months and we have many more throughout different projects in our organization. I generally stick to the same standard format/structure for my Console Applications. Unfortunately, many of our console applications do not.
I have been looking into ways of standardizing the structure of these Console Applications. I would also like to provide a framework for the basic structure of a Console Application and provide easy access to standard ways of handling things such as argument passing, logging, etc.
Can anyone suggest Best Practices for addressing these concerns? I have been reading this MSDN article on Console Applications in .Net which suggests a Design Pattern for Console Apps. The example uses a Template Method pattern to handle some of the concerns I listed earlier.
Two negatives of using this approach are listed in the article.
Ending up with twice as many classes
Having many simple, similar classes
Can anyone suggest better, or more standard, ways of handling this? What about listing additional negatives with this approach?