Console Application Structure
Posted
by
Paul Fox
on Stack Overflow
See other posts from Stack Overflow
or by Paul Fox
Published on 2011-01-07T19:38:46Z
Indexed on
2011/01/07
19:54 UTC
Read the original article
Hit count: 187
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?
© Stack Overflow or respective owner