Concepts / Introduction to Modern User Interfaces

Introduction to Modern User Interfaces

A command-line interface is defined by typed commands and typed computer responses.

  • Programming

Who Could Talk to Early Computers

Every time you tap an icon or type a command, you are taking part in a conversation with a computer. That conversation has not always been direct. Before you can understand the modern ways people interact with computers, you need to know how the interaction began, and who was allowed to take part in it.

What do you think happens?

In early computing, could an ordinary person, or even most programmers, type commands straight into the computer and read its replies?

  • Yes, everyone had a direct connection

  • No, people handed programs and data to attendants who ran them and returned the results later

Reveal answer
Answer:

No. Ordinary people, including most programmers, could not approach the computer directly. Programs and data were handed to attendants, who entered them into the computer and returned the response later.

This is the situation a command-line interface changed. The shift was about who could communicate with the computer, not only about how it looked.

Following a Command and Its Response

A command-line interface is defined by typed commands and typed computer responses. The interaction can be followed as a short loop. First, the user types a command. Then the computer produces a response, which is typed back to the user. The loop repeats: the user can type another command, and the computer answers again.

The loop is what makes the interface interactive. The user does not simply submit material to an attendant and wait for a later delivery. The user communicates with the computer through the terminal, and each reply can shape the next command.

Usertypes commandsComputerproduces responses1. types a command2. response typed back3. types the next command
What happens step by step, in order, when a user types a command and the computer replies?
Worked example

Tracing a Short Session

A user wants to see a list of files, then ask the computer to show one of them. Trace the exchange using only the command-and-response loop.

  1. 1
    Step 1: user types a command

    The user types a request for a file list into the terminal. The command is the user's input.

  2. 2
    Step 2: computer responds

    The computer produces a response, which is typed back to the user's terminal. The response is the computer's output.

  3. 3
    Step 3: user types a follow-up

    Because the user is communicating directly, the user reads the reply and types a new command that depends on it.

  4. 4
    Step 4: loop repeats

    The computer answers again. The pattern of command, response, command, response is the interactive exchange.

Result

The session is a chain of typed commands and typed responses. Each exchange is a complete, visible turn in one conversation with the computer.

Timesharing and the Command-Line Style

Timesharing is the idea that let several people use one computer at the same time. It allowed multiple people to interact directly with one computer by switching the computer's attention rapidly between them. Each person's terminal could connect to the same machine, and each user received a turn at the computer's processing.

Timesharing and the command-line interface answer different questions. Timesharing describes shared access: who can use the computer, and how many people can share it. A command-line interface describes the communication style: typed commands and typed responses. The two are related in history but they are not the same thing.

The command-line style also appeared in early personal computers. There, the same typed pattern existed, but only one person was involved at a time. That difference is why the two concepts should not be treated as synonyms. A command-line interface can describe a typed exchange even when no other user is sharing the computer.

Shared access to onecomputermany users, one machineTyped commandsuser inputAttention switchedbetween usersrapid switchingTyped responsescomputer output
How is the role of timesharing (sharing one computer among many users) different from the interaction style of a command-line interface (typed commands and responses)?

How a GUI Puts Components on Screen

Definition

A graphical user interface, or GUI, is an interface that lets people interact with a computer through visual components.

When people use a computer through a GUI, they work with visual elements drawn on the screen rather than with an invisible system alone. The computer draws GUI components on the screen, and the user sees them there. The diagram below follows that path from what a program provides to what the user sees and handles.

Program's componentswindows, buttons, iconsComputer draws themon the screenScreen showscomponentsvisible to the userUser manipulates themmouse or finger
How do the windows, buttons, and icons get from the program's data to the pixels the user sees, and then to the user's hand?

Mistakes When Comparing the Two Styles

  • Common mistake

    Treating timesharing and the command-line interface as synonyms

    What it looks like

    Saying that a computer with a typed interface must be shared by many users.

    Why it fails

    Timesharing describes shared access to one computer. A command-line interface describes the typed communication style. Early personal computers used the typed style with only one person involved.

    Do this instead

    Ask two separate questions: how many people share the computer, and how do they communicate with it?

  • Common mistake

    Assuming a GUI is the only way to communicate with a computer

    What it looks like

    Believing that typed commands belong only to the past.

    Why it fails

    The source defines a command-line interface as typed commands and typed responses. It is a distinct interaction style from a GUI, and the two describe different kinds of communication.

    Do this instead

    Describe the interface by its style: typed exchange for a command-line interface, visual components for a GUI.

  • Common mistake

    Thinking the user must wait for a later delivery in a command-line exchange

    What it looks like

    Imagining that every command goes to an attendant and returns the next day.

    Why it fails

    That was the older arrangement. The command-line loop lets the user type a command and receive a typed response directly through the terminal.

    Do this instead

    Trace the loop: command, response, next command, each within the same interactive session.

  • Common mistake

    Confusing a button with the window that contains it

Checking Your Understanding of Both Styles

EASY

For each situation, decide whether it is best described as a command-line exchange, a GUI interaction, or a case of timesharing. Situations: (a) a user types a command and reads a typed reply; (b) a user drags a scroll bar on a touchscreen; (c) several users' terminals connect to one computer, and the computer switches its attention between them. Explain your choice for each in one sentence.

Hints
  • Ask whether the user is typing commands or acting on visual components.
  • Timesharing is about shared access; the command-line style is about the typed exchange.
  • A single situation can involve more than one idea, so check whether you are describing access or communication.

Key Takeaways

  • A command-line interface is defined by typed commands and typed computer responses, repeated in a loop that makes the exchange interactive.
  • Timesharing allowed multiple people to interact directly with one computer by switching its attention rapidly between them; it describes shared access, not the communication style.
  • Early personal computers used the command-line style with only one person at a time, so the two concepts should not be treated as synonyms.
  • A graphical user interface lets people interact with a computer through visual components such as windows, scroll bars, menus, buttons, and icons.
  • The computer draws GUI components on the screen, and the user manipulates them, usually with a mouse or with fingers on a touchscreen.