Events and interactions
I can make an app respond to user actions by using events.
Events and interactions
I can make an app respond to user actions by using events.
These resources will be removed by end of Summer Term 2025.
Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.
These resources were created for remote use during the pandemic and are not designed for classroom teaching.
Lesson details
Key learning points
- Events are actions that apps can respond to.
- Event listeners are used to detect events and run a set of instructions.
- Apps respond to user input by using functions that run when specific events occur.
Keywords
Event - an action that happens in the app which the app can respond to
Event listener - code that waits for a specific event to happen and then runs a set of instructions
Trigger - the action that causes an event to run
Function - a named block of code that performs a task when called
Common misconception
Events happen automatically.
Events only trigger code if an event listener is attached. Without one, the app will not respond.
To help you plan your year 8 computing lesson on: Events and interactions, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your year 8 computing lesson on: Events and interactions, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 3 computing lessons from the Mobile app development unit, dive into the full secondary computing curriculum, or learn more about lesson planning.
Equipment
Access to Code.org's App Lab or some other means of creating apps.
Licence
Prior knowledge starter quiz
6 Questions
Q1.What is the main purpose of a user interface (UI) in an app?
Q2.Which of the following is considered a user interface (UI) element?
Q3.What is the area called where you arrange the layout of your app visually?
Q4.What is the term for a setting that changes how a user interface (UI) element looks or behaves?
Q5.Match each keyword to its description:
the visual part users interact with
the area for arranging app layout visually
a specific part of a user interface
a setting that changes how something looks or works
Q6.Arrange these steps for creating a simple app layout in the correct order:
Assessment exit quiz
6 Questions
Q1.Match each keyword to its description:
an action the app can respond to
code that waits for a specific action
the action that starts code running
a named block of code for a task
Q2.Match each scenario to the correct term:
event
event listener
function
trigger