Domanda

If the question appears to be off topic then please migrate to some other suitable domain on stackexchange.

Q.why to have GUI along with CLI, when you already have command line interface?

I'm currently developing an application. As of now application has a command line interface.

The target machines for application will be 80% servers and 20% workstations. I'm considering to provide GUI too for the application.

GUI Use Case: Product registration is main use case i.e. my product needs license key to run. And after that only some text info will be shown every time its launched. Only 2-3 buttons to perform extended functions.

CLI Use Case: Product registration will expect some arguments as command line arguments. Later the 2-3 extended functions available in GUI can also be started from command line.

È stato utile?

Soluzione

Some of the reasons you might want a GUI are:

  • Some, or all, of the users are not comfortable with the command line interface
  • It may be easier to use a GUI, due to the complexity of the application. Think about Adobe Illustrator, the GUI is much simpler than writing postscript files or similar
  • There are visualizations, graphs and similar things that are better in a GUI than in ASCII

I suspect that the main thing that would motivate you, based on your description, is the first one. If you have some users that aren't comfortable with the command line interface, then you may want to provide a GUI.

One thing to consider, there are a few applications I have used that basically build their GUI as a front end for the command line version, so there is a lot of shared code.

Altri suggerimenti

  1. Information organization. UI applications has a richer toolkit to present the data - e.g. checkbox is much faster to parse at a glance then to distinguish "true" from "false", charts give instant insight into dataset, different fonts help to drive user attention, etc.
  2. Performance. Console application IO is inherently slow. The console application you see is actually two applications (UI application called terminal emulator and actual application running in the background) that communicate over 3 pipes (e.g. character-by-character copy). Terminal emulator knows nothing about actual application and can't make any assumptions - it only parses the streams and reacts on control codes. UI applications are fused into one - instead of inefficient "emit string with control codes > switch context to different application > parse the string > update presentation" they only need to update the presentation (which they do just the same way terminal emulator does - but instead they may be optimized, e.g. cache some regions beforehand to avoid re-rendering).
  3. User-friendliness. Non-IT people are much more used to UI.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
scroll top