14

I'm starting to develop a new program. It's basically a database interface, run a few queries, show the data in a nice way and be able to easy input new data (like this website).

Thinking about which programs I use daily I realise that only my web-browser is a GUI program, the rest is TUI (in this case TUI is Text User Interface, as in ncurses). So I plan to write this in ncurses with a vim/mutt-like interface. This program will only be used by experienced users and speed is much wanted.

I've found one study about this: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2655855/

All other studies I've found has only looked at novice users and for them GUI is better. For an experienced user that will work daily with the program what is best?

This is sligthly similar but the difference is that this question was about a non-interactive program:
Is the development of CLI apps considered "backward"?

iveqy
  • 468
  • 1
  • 5
  • 10
  • 1
    I think the other question is similar enough that is a duplicate, but others may disagree, It could certainly be the case that this is the 'good kind' of duplicate – jk. Oct 09 '13 at 08:23
  • 1
    I've always taken the view that a command-line interface inside a window managed by a software window manager and displayed on a modern bit-mapped display **is** a GUI and ought to be enough for any user. – High Performance Mark Oct 09 '13 at 08:46
  • 2
    I think this is a seperate topic since non interactive CLI programs can use stdin/stdout to communicate data to other programs and that's a huge benefit from a scripting standpoint. Interactive CLI programs lack that benefit. – iveqy Oct 09 '13 at 12:19
  • @HighPerformanceMark When you ssh a server, the remote server (when the TUI is running) has no idea about the OS of the machine you are doing ssh from, those servers usually has no graphic capabilities because they only run back-end critical things like Oracle or Apache, or they can be a router or a refrigerator. Most CLI or TUI apps are made for terminal only kind of works. – Tulains Córdova Oct 09 '13 at 16:37
  • 4
    NOT A DUPLICATE: `CLI != TUI` (by a long shot) – Thomas Eding Oct 10 '13 at 15:55
  • I think it is not duplicated. CLIs are used in a daily basis and probably nobody thinks that it is a bad idea today. But TUI are different. in 1999 Borland released Turbo Vision C++ opensource due to the fact they stopped working in TUI at that time nobody thought that today 2016 we still use ssh with text terminals and our daily text editor is VI. So in my opinion a TUI today is very useful. You can have a GUI through ssh. For example image an SQL Navigator or DBVisualizer in TUI via ssh instead of sqlplus or mysql CLI? Web application is an option but you need webserver and the port open – Carlos Rafael Ramirez Mar 09 '16 at 16:57
  • CLIs (like git) vs TUIs (like htop) vs Web UIs (stackoverflow) vs GUIs (adobe photoshop or X apps) are all different ways of providing a user interface to the end user. Web UIs atm appears to be winning and taking over GUI apps and taking over some TUIs as well. – CMCDragonkai Jan 23 '19 at 04:52

2 Answers2

25

I don't think it's at all crazy. It all depends on who your target audience is. If you write an app and expect an average user to use it, you are probably better off with a GUI.

If your app is a for developers, especially those that are used to CLI. Or if your app is targeting a sys admin who sits at his workstation and SSH's into 30+ other machines on a daily basis, your tool might just hit the sweet spot for them.

In all my jobs, I always had some kind of "console utilities" module that would make it super easy to query on a command line for different data types from the user and had some kind of menu driver. I'd write that thing in 2 days and then make gradual improvements over time. I've found such utilities to be extremely useful if for nothing else then for quickly spinning up developer tools. Whenever I'd show a new guy how to use them, I'd get a chuckle at non-GUI approach but the bottom line is that those tools accomplished exactly what I needed them to do and non-GUI approach was so lightweight that I could actually introduce and maintain these tools.

DXM
  • 19,932
  • 4
  • 55
  • 85
  • 10
    +1 Building a command-line or text driven version of software can help keep the distinction between the model and the view clear. And since the GUI can take many times the effort of the model, the CLI or text versions are *much* faster to deliver. – andy256 Oct 09 '13 at 01:32
  • 4
    OP interest is in text based user interfaces ( interactive, like F5 does this and F6 does that ), not command line interfaces ( non-interactive, like -a does this and -f does that ). Don't take me wrong, I love CLI and I'm the OP of the question OP linked: http://programmers.stackexchange.com/questions/199803/is-the-development-of-cli-apps-considered-backward – Tulains Córdova Oct 09 '13 at 16:28
  • @user61852: sure, just like htop and vi and all the other cool tools that you can use while SSH'ed into a machine. I was trying to answer from perspective: I have to see entire desktop vs. can I run the tool if all I have (or all I want to use) is a terminal window. – DXM Oct 09 '13 at 16:30
5

I'm not convinced a Text-UI is any different than a tab-oriented GUI, you've simply changing the display technology from pretty pictures to ugly pictures (YMMV :-) )

However, a text-based interface that can have a GUI slapped on top is an excellent idea. Think of all the text-based linux config files, then think of Webmin that allows you to view them as web pages. You can still edit the files by hand if you prefer or if its easier/quicker, but you also get the benefit of the easy-access web view.

So I'd say develop a CLI by all means, but a TUI.. no, no point in it at all. You'd be better off with a web UI first, a touch-app UI second, or a thick-client GUI third.

gbjbaanb
  • 48,354
  • 6
  • 102
  • 172
  • GUI's tend to have lower performance, so if you need speed and you know what you're doing, CLI's/TUI's are probably better. – Andreas Oct 09 '13 at 12:31
  • @Andreas TUI will be used through terminal emulator which is just a GUI application - and they will communicate via character pipes, terminal knows nothing about the application, cannot be optimized that much. The TUI applications are perceived as "faster" is because they are more primitive (don't use advanced visualizations, less smart validation, no lookup controls, etc). Another reason - because TUI elitists believe them to be faster. – Eugene Oct 09 '13 at 15:58
  • 3
    TUIs often *are* faster for many tasks (such as heavy data entry) simply because they're not designed around using a mouse. Unless you're going to make sure your GUI works just as well with the keyboard alone as it does the mouse, then a TUI will often work better. This is something that most spreadsheet applications tend to get right but most everything else with a pretty GUI get horribly wrong. – Evicatos Oct 09 '13 at 18:58
  • @Evicatos You are comparing a basic TUI with a crappy UI application. TUIs tend to be realy inefficient in pretty much every case - e.g. imagine an MS Word replacement with TUI (where you need to format text, insert images, etc.). But what I am getting to is that TUI applications are not inherently fast, just because they don't have to manage windows - as from OS desktop environment there's still UI. Well-designed and well-written UI application is fast and convenient. The main issue with UI applications is increased development complexity, TUIs are much more primitive. – Eugene Oct 09 '13 at 20:19
  • I don't think a WSYSIWYG is a good program to compare. Anything visual is betting in a GUI. Consider instead why is ther tig when gitk already existed? Why is mutt used when multiple GUI MUA exists? Why are people using vim in console instead of in the GUI? – iveqy Oct 09 '13 at 21:55
  • @iveqy Not to start a flame war - but, for instance, vim still stands only because people believe they look smarter when they are using it and don't want to learn modern editors (e.g. Sublime). Sublime, btw, is a prime example how pure UI is faster then VIM+terminal emulator. – Eugene Oct 10 '13 at 00:39
  • @Eugene: The reason I use vim inside a terminal is so that I never have to leave the command line to do anything. I doubt I'd notice program speed between a TUI and GUI text editor. The things I do notice are useability speeds. I'd rather not use a mouse when editing text. That said you don't need a TUI for this (look at gvim). For me it all boils down to workflow integration convenience, and console vim does that for me. I just googled Sublime, and I can't say I'd use it for the same reasons I prefer Vim over Emacs: Modal editing as opposed to CTRL + ALT + SOME_OTHER_KEY. – Thomas Eding Oct 10 '13 at 01:16
  • @Eugene On the other hand, vim (and emacs) have such a massive number of hotkeys and shortcuts, even learning a handful of them can put you on-par with the efficiency of a "modern editor". Even more so if, as ThomasEding says, you're in the terminal all day (so you can combine it with `grep` and other CLI tools). – Izkata Oct 10 '13 at 01:30
  • @ThomasEding You do not have to use mouse in UI (I don't use it in Eclipse, Mail and Finder). And Ctrl+Alt+Up to move line up is much easier then sequence Esc->dd->k->p->i. And I have my terminal one Cmd+Tab away. But need in grep and such is much smaller when I have smart IDE that actually knows what I am editing. In Sublime I do Command+P, type "main.c@main" - and I'm instantly transferred to a proper location. – Eugene Oct 10 '13 at 04:15
  • @Izkata I take it you don't know what multiple cursors is? Pretty much a requirement for modern editors. – Eugene Oct 10 '13 at 04:17
  • @Eugene Looks like just a helper for vim's visual mode and find/replace... But [you can get it if you need it](https://github.com/terryma/vim-multiple-cursors) – Izkata Oct 10 '13 at 09:51
  • @Izkata Just learn at least one editor other then VIM. – Eugene Oct 10 '13 at 15:30
  • web guis are sandboxed, which is not true for a TUI. Say you need to use your app remotely on a terminal, CLI is one option, true, but TUI might be better. – user1095108 Feb 21 '17 at 08:26