Why should you care about writing a console application in 2019 where everyone is talking about user experience, artificial intelligence (AI) and web apps? I’ll give you four reasons.
Creating a console application is more straightforward than building an application that has a rich user interface. You do not need to know or use any user interface languages, tools or frameworks. You can implement a console application using simple C# programming.
(Open-source) Libraries help you with repetitious tasks like argument parsing, output formatting, menu creation etc. You don’t have to start from scratch. Nowadays, it’s simpler than ever to build a console application focused on the business logic you want to implement.
Console applications do not need to change with every new shiny framework, or tool that’s trending right now.
Once created, a console application does not have to be changed every day. Sure, if the requirements change or if you want to add a new feature you have to change the code or add new code.
Usually adding new functionality to a user interface forces you to move things around and consider further changes to provide a great user experience.
You can focus more on the features your application provides than building a user-interface that people do not need. It is of course not applicable to all users and all programs, but for example valid for development tools.
Developers want to get their job done as fast as possible. It’s the reason why console applications which can be executed from the command line are popular in the developer community.
Creating a console application is much cheaper compared to an application including a user interface. There are a lot of questions if you want to build a good user experience for an application with a user interface. A console app provides a much simpler yet effective interface for the user.
Making use of libraries allows you to save time and cost while you focus on the job that needs to be done. It not only makes your application code much simpler; it also helps to finish the project in a shorter period.
Nowadays in the age of continuous integration and continuous deployment automation has become very important. If you need to execute custom code, often console applications allow you to write the code you need in your favorite environment.
Console applications can be executed from the command line by default which allows for simple server-side automation or client-based scripting. I love it when I’m able to write a script that does a series of tasks for me.
Automation not only helps to speed up the workflow, but it also helps to avoid errors. Manually executed tasks are always risky. You don’t know who does them and if the person is not experienced with these tasks, it can lead to errors. By automating tasks, you save yourself and your team from making avoidable mistakes.
If you want to know more about how to build a modern C# console application check out my latest free YouTube video where I show three very helpful C# libraries which allow you to write your applications quickly and with a high-quality console interface.
This article was originally published on claudiobernasconi.ch on April 10th, 2019.