User Interfaces Overview

Overview

A user interface is the part of a program that a person sees, hears, and touches. Buttons, text fields, lists, and menus are all parts of a user interface. In this series of tutorials, you will learn how to build user interfaces in Quorum. You will start with a Form, a ready-made window for apps that places your controls and sets up the keyboard for you. Later, if you want controls next to pictures and animation, you can put them inside a Game. This page explains both, shows your first Form, and gives you a map of the rest of the series.

Goals

You have the following goals for this lesson:

By the end of this lesson, you can

  • Learn what a graphical user interface is and why it is designed for people, not for programmers
  • Learn how the same app can need to work differently on a computer, in a web browser and on a phone
  • Run a first Form and use it with only the keyboard
  • Plan which tutorials in the series to read next

Warm up

Pick an app you use every day. Make a list of every part of the screen you can interact with: things you can press, type into, pick from, or scroll. Then imagine that you can't use a mouse or a touch screen, only a keyboard. Could you still use every part of the app? Which parts would be hardest?

Vocabulary

You will be learning about the following vocabulary words:

Vocabulary
TermDefinition
Graphical User Interface (GUI)The parts of a program that a person sees and interacts with, like windows, buttons, and lists.
ControlOne part of a user interface that a person can interact with, like a button, a checkbox, or a text field.
FormA Quorum class that opens a window for an app. A Form holds one or more Pages.
PageOne screen of a Form. You add controls to a Page, and the Form shows one Page at a time.
GameA Quorum class that opens a window and draws the screen many times a second. Controls can be added to a Game, next to pictures and animation.
BehaviorA class with the code that runs when something happens, such as a button being pressed.
FocusThe control that keyboard input goes to right now. Only one control has the focus at a time.
ResponsivenessWhen an interface changes its arrangement to fit the size of the screen or window it is shown on, such as moving a label above its field on a narrow screen.
Screen readerA program that reads the screen aloud or sends it to a braille display, used by people who are blind or have low vision.
Human Computer Interaction (HCI)The field that studies how people use computers and how to design technology that works well for them.

New Code to Learn

You will be using the following new pieces of code:

New Code to Learn
Quorum CodeCode ExampleExplanation
Form NAMEForm formMakes a new Form. A Form is a window for an app.
FORM:GetMainPage()Page page = form:GetMainPage()Gets the first Page that the Form shows.
PAGE:SetTitle(TEXT)page:SetTitle("My First App")Puts a title at the top of the Page.
PAGE:AddButton(TEXT)page:AddButton("Hi")Adds a button with this name to the Page.
FORM:Display()form:Display()Opens the window and shows the Form.

CSTA Standards

This lesson covers the following CSTA K–12 standards:

For teachers · 2026 CSTA K–12 Computer Science Standards

HS-SOC-HU-43

High School · Computing & Society

Evaluate how human choices in using, designing, deploying, and regulating computing technologies have risks, benefits, and long-term impacts.

Also in 1 other lesson

MS-SOC-HU-43

Middle School · Computing & Society

Analyze how the decisions humans make when using computing technologies have ethical and social consequences.

Also in 2 other lessons

MS-ALG-IM-09

Middle School · Algorithms & Design

Evaluate which human-centered design principles are present or missing in an existing computing technology.

Also in 5 other lessons

MS-SYS-HW-30

Middle School · Systems & Security

Examine differences between computing systems based on user needs, system requirements, and potential societal, environmental, and ethical impacts.

Only this lesson so far

S1-SWD-UX-05

Specialty I · Software Development

Create software that serves intended users and contexts using human-centered design principles.

Also in 3 other lessons

Every standard, and the lessons that cover it

Explore

Building a graphical user interface (GUI) is one of the more complex topics in computer science. It takes practice to program one. It is also hard because a GUI is used by people, and people may not understand what the programmer had in mind. Before you write code, it helps to think about who will use your program and how.

Designed for people

A user interface is made for a person, not for a programmer. A button is made to be pressed. A list is made to be scrolled and picked from. A text field is made for typing. Over many years, computer scientists have agreed on how each kind of control should look and act. These agreements are called conventions. For example, people expect a button to do something when they press it, and they expect Tab to move to the next control. Conventions are studied in a field called Human Computer Interaction.

People use computers in many different ways. Some use a mouse. Some use a touch screen. Some use only a keyboard. Some are blind and use a screen reader, which reads the screen aloud or sends it to a braille display. Quorum's controls are built to work with all of these. When you use Quorum's controls and give each one a clear name, a screen reader can tell a person what the control is and what it does.

Every control in this series works with the keyboard, and with touch on a phone or tablet. On a touch screen, you tap a control to use it. With a phone's screen reader on, such as VoiceOver on an iPhone or TalkBack on Android, you swipe right or left to move between controls and double-tap to use the one you are on. On a computer, these keys work everywhere:

Keys that work everywhere
KeyWhat it does
TabMoves the focus to the next control
Shift+TabMoves the focus to the previous control
Space or EnterPresses the button that has the focus

The control that keyboard input goes to is said to have the focus. A screen reader reads the control that has the focus. You will learn more in the Focus and Accessibility tutorials.

One app, many devices

The same app can run on very different computers. Each one has its own screen, its own way of taking input, and its own people using it:

One app on three kinds of computer
Desktop or laptopWeb browserPhone
ScreenLarge, and the window can be resizedWhatever size the browser window isSmall, and part of it can be covered by a camera cutout or system bars
InputKeyboard and mouseKeyboard and mouse, or touchTouch, and sometimes a keyboard
Screen readerFor example, NVDA on Windows or VoiceOver on a MacThe computer's own screen readerFor example, VoiceOver on an iPhone or TalkBack on Android

A good interface works for the people who will use it, on the computers they have. A design that fits a big screen may be too crowded on a phone. A control that is easy to click with a mouse may be too small to tap. Before you build an app, ask who will use it and on what.

A Form helps with this. It arranges its controls to fit the space it has. An interface that changes its arrangement to fit the size of the screen or window is called responsive, and this idea is called responsiveness. For example, when there is room, a Page puts a label beside the field it describes. When there isn't, such as on a narrow screen, it puts the label above the field instead. A Form also keeps its pages away from parts of a phone's screen that a camera cutout or system bar covers.

Your first Form

A Form is a window for an app. Every Form has at least one Page, which is one screen of the app. You add controls to a Page, and the Form places them, one under another, and works out the order that Tab moves through them.

To try it, open Quorum Studio, choose File, then New Project. Under General, choose App. Studio makes a project that looks like this program:

use Libraries.Interface.Forms.Form
use Libraries.Interface.Forms.Page

Form form
Page page = form:GetMainPage()
page:SetTitle("My First App")

page:AddButton("Hi")
form:Display()

Run the program. A window opens with a title and one button named "Hi". Press Tab until the button has the focus, then press Space. Nothing happens yet, because the button has no code to run. You will fix that in the Behaviors tutorial.

Blocks

Forms first, Games later

Quorum has two ways to build a user interface. Both use the same controls, like buttons and lists. They differ in how much Quorum does for you.

Forms and controls in a Game
FormsControls in a Game
Good forApps, like a quiz, a sign-up sheet, or a calculatorGames, and screens where controls sit next to graphics and animation
Where controls goThe Page places them for youYou choose a layout, sizes, and positions
Focus and keyboard orderSet up for you, top to bottomYou set it up yourself
Starting template in Quorum StudioGeneral, then AppGeneral, then Game
Where to startFormsLayouts, later in the series

Most of this series uses Forms. You can build a complete app without ever choosing a size or a position. Putting controls in a Game is the advanced path: you decide where each control goes, how big it is, and which control Tab moves to next. The controls are the same, so what you learn with Forms carries over. When you are ready, the Layouts, Focus and Input Sets tutorials show how.

What you should know first

This series assumes you are already familiar with the online tutorials, from getting started through the later lessons. In particular, you will use actions and classes often, because every behavior you write is a class with an action that runs when something happens.

A map of the series

The tutorials build on each other. Read the first five in order. After that, read the ones you need.

  1. Start here:
  2. Typing and choosing:
  3. Numbers, colors and dates:
  4. Showing data:
  5. Organizing a window:
  6. Talking with the user:
  7. Making it work for everyone:

Engage

In this activity, you and a partner examine the interfaces you use every day, and judge how well they work for different people on different devices. The goal is to learn to think of an app as a set of controls, and to notice which design choices help people and which leave some out. Each of you picks one app you use often that also runs on another kind of device, such as a music player you use on both a phone and a computer. Together, list every control on the app's main screen and name each one by its kind: button, text field, list, checkbox and so on.

Next, compare the two versions of the app. What is different about the screen, the controls and the way you use them? Which differences come from the device, and which seem to be the designers' choices? Write down one thing each version does well for its users and one thing that leaves some people out, such as a control you can't reach without a mouse.

Finally, run the Form from this page. Take turns using it with only the keyboard, using Tab, Shift+Tab, Space and Enter. If you can, turn on your computer's screen reader and notice what it reports when the button gets the focus. Then change the button's name and run it again. What changes in the app, and what changes in what the screen reader reports?

Wrap up

Think about the app you picked in the Engage. Which of its controls follow conventions you already knew? Which ones surprised you? How might the designers have made it easier to use for someone who uses only a keyboard, a screen reader, or a small phone screen?