£199.99 £139.99 for one year of Unlimited learning. Offer ends on 14 November 2022 at 23:59 (UTC). T&Cs apply

Find out more
What is a GUI and why do we have them?
Skip main navigation

What is a GUI and why do we have them?

The earliest computers had no keyboards or monitors. This article looks at the definition of a GUI, and why we have them.

The earliest computers had no keyboards or monitors, and would instead use punchcards for input and line printers to provide output.

When monitors were introduced, these generally used text-based output in response to commands entered by the user.

What is a GUI?

As the potential for computers became increasingly apparent, the first graphical user interfaces (usually abbreviated to GUIs) were introduced in the early 1970s to try and mitigate the steep learning curve of command-line interfaces.

This Wikipedia article gives a history of the GUI.

GUI use-cases

Different use-cases have different requirements for user interfaces:

  • Home users commonly use operating systems such as Windows 10, as these ‘feel’ familiar and intuitive. This consistency means that one computer works much the same as the next.
  • Tablets and smartphones rely on software-based keyboards as well as controls based on gestures (e.g. swiping a finger to scroll) or finger taps, alongside more traditional form-based interfaces.
  • The most powerful computers on the planet tend to run Linux-based operating systems and are typically accessed via a command line because of the flexibility this affords more experienced computer scientists.

You’ll come across a few interface terms throughout this course; some are listed here for your convenience.

Term Definition
User interface Hardware or software to allow users to interact with their computers.
Graphical user interface (GUI) A software interface based around visual elements such as buttons and text boxes.
Form-based GUI A GUI that is similar to a paper-based form, e.g. a sign-up page for a social media platform.
WIMP Acronym for ‘windows, icons, menus, pointers. Typically used as a shorthand way to describe traditional GUI elements.
Command-line interface (CLI) A software interface whereby users type in commands at a prompt to accomplish tasks, such as the Linux terminal.

GUI vs CLI

Both GUIs (Raspberry Pi OS, Windows, macOS) and text-based CLIs (Windows command prompt/PowerShell, the Linux terminal) have their own strengths and weaknesses that are generally complementary.

  • Experienced users can perform flexible, powerful custom commands in CLI environments to complete useful work and can chain commands together. GUI environments tend to require users to complete one task at a time.
  • CLIs generally allow experienced users to work faster than a GUI, but inexperienced users will find a GUI easier to start with.
  • A CLI will require fewer system resources such as hard disk space, RAM, CPU and GPU time to render its interface than the equivalent GUI.
  • Good GUIs can often be used intuitively, and commonly have built-in help readily available, while CLIs require training for users to understand the commands.
  • Users will generally need to memorise CLI commands, while GUIs often provide hints as to what elements do through careful use of icons and labels.

Some workflows lend themselves better to CLIs and others to GUIs. Imagine we wanted to move a file:

In a GUI environment, you could accomplish this in a few different ways. One way would be to click-and-drag the file from its current location to a new one. The CLI version would probably be slower; for example, on Linux, you’d type something like:

cd folderName
cp file.jpg ../newFolder

 

Let’s try something else: what if we had 1000 files in that directory and we only wanted to move the ones that ended with ‘.jpg’?
In our GUI system, you’d probably need to browse to the folder, right-click, sort by type, scroll to where the JPG files were, click on the first one in the list, scroll a bit, hold shift, click on the last one in the list, then drag and drop them into the new directory.

 

On a Linux machine, you’d type:

 

cd folderName
cp *.jpg ../newFolder/

What about ordering a pizza?

On my phone, I would load their website, pick out toppings from beautiful visualisations by tapping and scrolling, tap ‘pay’, and my meal would arrive a short time later — much easier than navigating through a text-based browser using the arrow keys!

The take-away message at this point is that some jobs are better done with a GUI and some with a CLI. In the coming pages, we’ll look at how to create some GUIs using the guizero library.

GUI challenges

  1. For each of these applications, state whether you feel a GUI or a CLI would be better, justifying your answer.
    • A desktop publishing application
    • A photo-sharing application
    • Programs to perform complex file operations on a large system
    • A web browser for a visually impaired user
  2. Identify another specific situation where a command line would be better and one where a GUI would be better.
This article is from the free online

Programming with GUIs

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education