About Console.Waterworks
Console.Waterworks is a NuGet package. It aim is to help you write extendable
and command-based console programs in C# and .Net. One of the main struggles
with writing software is the need to write "plumbing code". It is the code which
does not solve the main problem but it is necessary for us to reach a
solution. This is why we all feel frustrated when we need to write it. It feels
like we are going the long way round to that dream holiday in the sun. This is
qwhy I created Console.Waterworks. I believe we should face frustration when it
finds us and only then. Why go looking for it?
Amongst other things, Console.Waterworks has this one very handy trick. It
allows you to write methods which become a run-time command -- which is quite
the time saver. When you use Console.Waterworks, you, also, do not need to parse
end-user input. The reason why is because Console.Waterworks does it for
you. This means, when people run your program, they type the method name in and
your code begins executing. On top of that, Console.Waterworks handles bad input
and method parameters, as well.
Do not panic if none of what I just said made sense. I threw a lot of
information at you in a short span of time. It is okay and not
unexpected. Because of this, I have prepared several images showing
Console.Waterworks in action. Please feel free to check it out. It should help
explain what Console.Waterworks is and how it works.
Good Input Data Flow
Bad Input Data Flow
Code Example - Validating Input
Another feature Console.Waterworks has is the self-documenting help section. To
use it, decorate your "command-methods" in the "Console Commands" class and
create a command-method to display it.
Code Example - Built-in Help
Disclaimer
Console.Waterworks is based on the
ConsoleApplicationBase repository by
TypecastException.
Pre-Requisites
To use Console.Waterworks, I recommend you meet the following pre-requisites:
Git.Abbether
Console.Waterworks is on Git.Abbether. Feel free to check out the source code, clone
it and fork it: Git.Abbether Repository