Unit 5 - Building Apps
Lesson 1: Introduction to Event-Driven Programming
- Callback function: a function specified as part of an event listener; it is written by the programmer but called by the system as the result of an event trigger.
- Event: An action that causes something to happen.
- Event-driven program: a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)
- Event handling: an overarching term for the coding tasks involved in making a program respond to events by triggering functions.
- Event listener : a command that can be set up to trigger a function when a particular type of event occurs on a particular UI element.
- UI Elements: on-screen objects, like buttons, images, text boxes, pull down menus, screens and so on.
- User Interface: The visual elements of a program through which a user controls or communicates with the application. Often abbreviated UI.
Lesson 2: Multi-Screen Apps
- Debugging: Finding and fixing problems in an algorithm or program.
- Event-driven program: a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)
- Event handling: an overarching term for the coding tasks involved in making a program respond to events by triggering functions.
Lesson 3: Building an App: Multi-Screen App
- Event-driven program: a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)
- Event handling: an overarching term for the coding tasks involved in making a program respond to events by triggering functions.
Lesson 4: Controlling Memory with Variables
- Data Type: All values in a programming language have a "type" - such as a Number, Boolean, or String - that dictates how the computer will interpret it. For example 7+5 is interpreted differently from "7"+"5"
- Expression: Any valid unit of code that resolves to a value.
- Variable: A label for a piece of information used in a program.
Lesson 5: Building an App: Clicker Game
- ==: The equality operator (sometimes read: "equal equal") is used to compare two values, and returns a Boolean (true/false). Avoid confusion with the assignment operator "=",
- Global Variable: A variable whose scope is "global" to the program, it can be used and updated by any part of the code. Its global scope is typically derived from the variable being declared (created) outside of any function, object, or method.
- If-Statement: The common programming structure that implements "conditional statements".
- Local Variable: A variable with local scope is one that can only be seen, used and updated by code within the same scope. Typically this means the variable was declared (created) inside a function -- includes function parameter variables.
- Variable Scope: dictates what portions of the code can "see" or use a variable, typically derived from where the variable was first created. (See Global v. Local)
Lesson 6: User Input and Strings
- Concatenate: to link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)
- String: Any sequence of characters between quotation marks (ex: "hello", "42", "this is a string!").
Lesson 7: If-statements unplugged
- Conditionals: Statements that only run when certain conditions are true.
- If-Statement: The common programming structure that implements "conditional statements".
- Selection: A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
Lesson 8: Boolean Expressions and "if" Statements
- Boolean: A single value of either TRUE or FALSE
- Boolean Expression: in programming, an expression that evaluates to True or False.
- Conditionals: Statements that only run when certain conditions are true.
- If-Statement: The common programming structure that implements "conditional statements".
- Selection: A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
Lesson 9: "if-else-if" and Conditional Logic
- Boolean: A single value of either TRUE or FALSE
- Boolean Expression: in programming, an expression that evaluates to True or False.
- Conditionals: Statements that only run when certain conditions are true.
- If-Statement: The common programming structure that implements "conditional statements".
- Selection: A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
Lesson 10: Building an App: Color Sleuth
- Boolean Expression: in programming, an expression that evaluates to True or False.
- Conditionals: Statements that only run when certain conditions are true.
- If-Statement: The common programming structure that implements "conditional statements".
- Selection: A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
Lesson 11: While Loops
- Iterate: To repeat in order to achieve, or get closer to, a desired goal.
- while loop: a programming construct used to repeat a set of commands (loop) as long as (while) a boolean condition is true.
Lesson 12: Loops and Simulations
- Models and Simulations: a program which replicates or mimics key features of a real world event in order to investigate its behavior without the cost, time, or danger of running an experiment in real life.
Lesson 13: Introduction to Arrays
- Array: A data structure in JavaScript used to represent a list.
- List: A generic term for a programming data structure that holds multiple items.
Lesson 14: Building an App: Image Scroller
- Key Event: in JavaScript an event triggered by pressing or releasing a key on the keyboard. For example: "keyup" and "keydown" are event types you can specify. Use event.key - from the "event" parameter of the onEvent callback function - to figure out which key was pressed.
Lesson 15: Processing Arrays
- for loop: A typical looping construct designed to make it easy to repeat a section of code using a counter variable. The for loop combines the creation of a variable, a boolean looping condition, and an update to the variable in one statement.
Lesson 16: Functions with Return Values
- Return Value: A value sent back by a function to the place in the code where the function was called from - typically asking for value (e.g. getText(id)) or the result of a calculation or computation of some kind. Most programming languages have many built-in functions that return values, but you can also write your own.
Lesson 17: Building an App: Canvas Painter
- Canvas: a user interface element to use in HTML/JavaScript which acts as a digital canvas, allowing the programmatic drawing and manipulation of pixels, basic shapes, figures and images.
- Key Event: in JavaScript an event triggered by pressing or releasing a key on the keyboard. For example: "keyup" and "keydown" are event types you can specify. Use event.key - from the "event" parameter of the onEvent callback function - to figure out which key was pressed.