The paper book is already a design
Look at the club's paper book. Somebody drew columns by hand with a ruler: day, hour, court, name.
Those columns are a data design. They say what the club needs to remember about every booking.
Your job is to design the same thing for a computer, and to design the screen the staff will use.
Key words
| Word | What it means | Example |
|---|---|---|
| Interface | What the user sees and uses on the screen. | a form with buttons |
| Wireframe | A simple plan of a screen with no colour or style. | boxes and labels |
| Field | One piece of information in a record. | hour |
| Record | All the fields about one thing. | one booking |
| Data dictionary | A table that describes each field: name, type, example and rule. | hour, integer, 10, 9 to 20 |
| Data type | The kind of value a field holds. | integer or string |
| Integer | A whole number. | 10 |
| Float | A number with a decimal point. | 4.5 |
| String | Text in quote marks. | "Sam" |
| Boolean | True or False. | True |
| CSV | A plain text file where each line is a record and commas (,) separate the fields. | Sam,1,10 |
| Accessibility | Making a tool usable by as many people as possible. | clear labels, big buttons |
The cells students fill in are left blank in this preview.
A data dictionary for a booking
| Field | Data type | Example | Rule |
|---|---|---|---|
| member | string | Sam Jones | 1 to 30 characters: letters, spaces, hyphens, apostrophes |
| is_member | Boolean | True | True or False |
| court | integer | 1 | Only 1 or 2 |
| hour | integer | 10 | From 9 to 20 |
| price | float | 4.0 | Worked out, never typed |
The cells students fill in are left blank in this preview.
Choose the data type of each field
Have a go
Choose the data type of each field
6 questionsTry it: a record becomes a CSV line
booking = {"member": "Sam", "court": 1, "hour": 10}
line = booking["member"] + "," + str(booking["court"]) + "," + str(booking["hour"])
print(line)
back = line.split(",")
print(back)
print(int(back[2]) + 1)
# split(",") cuts the text at each comma.
# Why do we need int() on the last line?
Make a free account to save your work and track your progress.
How the screens link
flowchart LR
home[Home: today's bookings] --> form[Booking form]
form --> confirm[Confirmation and price]
form --> error[Error: say what is wrong]
confirm --> home
error --> form
home --> cancel[Cancel a booking]
cancel --> home
Try it: a very simple form
<h1>Book a court</h1>
<label for="name">Name</label>
<input id="name">
<label for="court">Court (1 or 2)</label>
<input id="court" type="number" min="1" max="2">
<label for="hour">Hour (9 to 20)</label>
<input id="hour" type="number" min="9" max="20">
<button>Book</button>
Make a free account to save your work and track your progress.
A clear form works for more people
Tip
Give every box a label that says what to type. Make buttons big. Do not use colour alone to show a mistake: say it in words too. A person with a small phone, or a person who cannot see well, must be able to use it.
Stage 3: make the booking form
This is stage 3 of the Hillside practice project. Make the booking form. Give every box a label. Limit the court to 1 or 2 and the hour to 9 to 20. Add a Book button. Make it simple for desk staff. Your teacher marks it from the preview.
<h1>Book a court</h1>
<!-- Add a label and a box for the member's name. -->
<!-- Add a label and a box for the court (1 or 2). -->
<!-- Add a label and a box for the hour (9 to 20). -->
<!-- Add a Book button. -->
Make a free account to save your work, or press Start lab to work through the whole lesson.
Check: the screen and the data
Have a go
Check: the screen and the data
4 questionsStage 3: your data dictionary
Make a data dictionary for the Hillside booking tool. Use a table with the columns Field, Data type, Example and Rule. Include at least member, court, hour, is_member and price. Then write three lines of the CSV file the tool would save. Last, say which field you would never show on a big screen and why.
A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.
Make a free account to save your work, or press Start lab to work through the whole lesson.
Key words crossword
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Final check
Have a go