Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should I add a GUI?

I write many scripts at home and on the job. Most of the time the scripts get used only a few times to accomplish their chosen task and then are never used again. However, sometimes I write a script to do something more complicated, something that requires user input. It is at this point that I usually agonize over whether to implement a GUI or stick with a y/n, press 1-10, etc. command-line interface. This type of interface can become tedious to use and difficult to maintain.

I know some things lend themselves to a GUI more than others, such as selecting things in a giant list. However, the time it takes to switch a command-line application to use a GUI is prohibitive. For me, it takes a good amount of time to add a GUI with even the most simple framework I can find.

I am curious if any developers have a method of determining at what point their script has grown enough to need a GUI. Or am I going about this the wrong way, should I always be writing my scripts assuming I might later add a GUI?

like image 218
Jeremy Mack Avatar asked Nov 28 '22 05:11

Jeremy Mack


1 Answers

This doesn't answer your question but FWIW an intermediate step, between UI and command-line, is to have a configuration file instead of a UI:

  1. Edit the configuration file
  2. Run the program

A configuration file format can, if necessary, be complicated and well-commented.

like image 191
ChrisW Avatar answered Dec 01 '22 00:12

ChrisW