CPSC 110-08: Computing with Mobile Phones

Understanding an App's Architecture

CS Principles

This activity introduces the main architectural features of an App Inventor program considered as a digital artifact. It focuses on the following learning objective:

Introduction

In this lesson we will focus on the architecture of an App Inventor app. Rather than looking at the app as a user might -- i.e., in terms of how it looks and what it does -- we will look at it from a programmer's perspective. We will look at its internal structure.

App Inventor Structure

The following figure provides an overview of an App Inventor app.

Components

Behavior - Event-driven Programming Architecture

Memory and Data

Another important part of an App Inventor app is its memory, which is where the app's data are stored. There are three different kinds of memory:

Kind of MemoryDescriptionWhere to Find It
PropertiesStore data associated with some componentSetters and getters in the component's 'drawer'
Global VariablesStore data for the whole appIn the My Blocks > MyDefinitions drawer
ArgumentStore data for an event handler or a procedureIn the My Blocks > MyDefinitions drawer