Using screenshots or the real thing, demonstrate with the class the interfaces for two different modes of interaction:
Discuss as a class the differences and similarities in terms of:
List some other things you think UI developers might need to consider when creating an interface for touchscreen devices like phones.
With their smaller screen size and touch interaction, devices like phones are often used more casually and spontaneously than desktop or laptop computers.
Websites or apps made for touchscreen devices like phones typically:
Many of our accepted names for interface elements came about as real-world metaphors or analogies. For example, the different directories where we place computer files became known as folders as part of a 'file cabinet' metaphor, as physical documents in a traditional office were placed in physical folders before they were stored.
Assign the following to student pairs or teams. They should research to give a short explanation to the class of the origin of the metaphor and when it was first used:
The activities above touch on the second of four principles for good user interface design, ‘Make it comfortable for a user to interact with a product’, distilled from this article hosted by Adobe. A GUI should be:
In this lesson, students will:
This video introduces the first application for this lesson.
An important new line in this code is:
setTimeout(updateClock, 1000);
This creates a simple stopwatch to call the function updateClock() exactly 1 second from now. Because the line is put in before the end of the function itself, the 1-second stopwatch is re-created every time the function runs. This means the function keeps being called every second.
In this course, different environments will be selected based on their suitability for each demonstrated project.
For more on the set-up and environments used, see Lesson 1.
This video builds the digital clock application from the ground up.
Try it yourself before checking the solution code.
By editing the CSS and JavaScript, make the following adjustments to the clock application:
The video below demonstrates how the higher or lower game with a GUI. (This game was also featured in the original course without a GUI.)
Try it yourself before checking the solution code.
By editing the CSS and JavaScript, make the following adjustments to the game:
Give the game a time limit of 20 seconds from when the program first starts. Once the 20 seconds runs out, it should display GAME OVER and then reset the game, regardless of what the player has done so far.
Note: You do not need to show the countdown.
These challenges use the skills covered so far. By writing or modifying their own programs, students have an opportunity to demonstrate Application and Creation
Now that you can set functions to run after a specific time runs out, your challenge is to make a simple clicker game that counts the number of times a button is pressed within a time.
Below is an annotated mock-up for the application's interface, created at diagrams.net.
You can improve the game by
This second challenge is a little different. Your job is to finish an unfinished project for a stopwatch.
To finish the stopwatch, follow these steps: