Introduction to Programming and App Inventor. Introduction What is a computer program? Introducing App Inventor Getting hands on with App Inventor.

Slides:



Advertisements
Similar presentations
Understanding an Apps Architecture ASFA Computer Science: Principles Fall 2013.
Advertisements

Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
App Inventor Barb Ericson July 3, 2013.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computers: Tools for an Information Age
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Ch 14. Understanding an App’s Architecture Two perspectives 1.Programmer: a)Components & Behaviour b)Designed in Component designer Blocks editor 2.End-user:
Introduction to AppInventor Dr. José M. Reyes Álamo.
1 Introduction to Human Computer Interaction  Livecode Overview  Based on Livecode User Guide from RunRev Ltd. (2010) 
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
How to Use App Inventor in Your Classroom Julie Friesen Piper Middle School Technology 6 th -8 th Grades Edmodo Group Code to Join for More Resources:
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
ACS-1805 Introduction to Programming 1805 introduces students to programming using technology for creating programs that run on Android devices. Android:
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Topics Introduction Hardware and Software How Computers Store Data
Microsoft Visual Basic 2005: Reloaded Second Edition
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1 Introduction to Computing and Programming.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
App Inventor MIT App Inventor.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
CSC1200 INTRODUCTION TO PROGRAMMING Dr. Maureen Markel
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Lesson 1 – Getting Started with App Inventor
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Visual Basic.NET Windows Programming
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Development Environment
App Inventor إعدادأشرف رفاعي أحمد
Introduction to Programming and Visual Basic
Topics Introduction Hardware and Software How Computers Store Data
Chapter 1: An Introduction to Visual Basic 2015
CSCI-235 Micro-Computer Applications
Introduction to Event-Driven Programming
FOP: Buttons and Events
Introduction to Visual Basic 2008 Programming
Visual Programming week # 02 APP (Application) Architecture.
CS101 Introduction to Computing Lecture 19 Programming Languages
Understanding an App’s Architecture
3.01 Apply Controls Associated With Visual Studio Form
Lesson 1: Buttons and Events – 12/18
Chapter 16 – Programming your App’s Memory
TRANSLATORS AND IDEs Key Revision Points.
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
Topics Introduction Hardware and Software How Computers Store Data
Programming Languages
Introduction to AppInventor
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Programming Logic and Design Eighth Edition
Chapter 3 Software.
Presentation transcript:

Introduction to Programming and App Inventor

Introduction What is a computer program? Introducing App Inventor Getting hands on with App Inventor

Create applications or “apps” for android devices App Inventor uses a screen designer to visually create the user interface App Inventor has a Blocks Editor that allows you to: Create actions Visually assemble code blocks

App Inventor provides an Android emulator that runs on your computer. The emulator (Figure 1- 3) is a simulated Android phone.

 Apple Inventor Runs in the Cloud (Web-based)  Part of MIT’s Center for Mobile Learning.  Advantages of the cloud-based approach  You can access App Inventor from any computer connected to the Internet  Your files are maintained and backed up by the host  Develop programs in a Web browser on your personal computer and test them on an Android device  All you need is an Internet connection and a Web browser on the developer computer  Download app to test programs on an android device

 Consider someone trying to complete a task  Brushing their teeth or making a sandwich  What if this individual needed written instructions to complete wither of these tasks?  What if written instructions were still needed evean after performing this task 100 times?  Would you consider this person smart?  All a computer can do is follow the instructions found in a program  It’s actually not “smart” at all

 It’s said the CPU is the “brain” of a computer  But all the CPU does is follow instructions  So the CPU is really not a “brain” as we think of it  The “intelligence” of a computer is in the instructions found in its programming  Those instructions are written by people  So people are actually the “brains” of a computer  This course teaches you how to be the brains of a computer!

A computer program is a set of instructions that a computer follows to perform a task A computer is a device that follows instructions to store, manipulate, and retrieve data When a computer is performing instructions, we say it is running or executing a program A program contains an algorithm… a set of well-defined, logical steps taken to perform a task

 The CPU can only executes instructions represented in machine language  Machine language consists of binary numbers such as for instructions  People find machine language very tedious  So most programming is done in a high-level language that makes the process more English-like  A program called a compiler translates high-level language programs to machine language

 Each high-level language has its own syntax  Syntax is a set of rules for formatting programming statements that must be strictly followed  Programmers call these statements code  Each high-level language has its own syntax  In traditional programming languages you write code by typing the instructions you need  Software called a compiler then translates your high- level language program to machine language  An executable program is a.exe file with machine language instructions the CPU can execute

 App Inventor is not truly a programming language  It’s actually a development environment  You create programs in a point & click environment  Program constructs are represented as puzzle pieces  You fit the pieces together & supply a bit more information  Uses identical logic as any other programming language  Behind the scenes App Inventor creates and runs Java code C++ C# Java  Visual Basic  Pascal  Python

 New programmers make lots of syntax errors  These are errors in how a statement is formatted  Similar to grammatical errors in English  For example “Boy run house” makes no sense  Syntax errors rarely happen In App Inventor since you don’t type programming statements.  Instead of typing, you drag and drop code blocks  Blocks are “snapped” together like puzzle pieces

 The steps to create an app in App Inventor: Go to the App Inventor website in your web browser Create a new project or open an existing project Create the user interface in the Designer Use the Blocks Editor to define the algorithm Also called the behavior or actions of the application Connect an Android device or the Android emulator to your project to test your algorithm  An app consists of components & their behaviors

 Used to set up the user interface  Consists of fundamental components on the screen  Defines how the user will interact with the application  Components can be visible or non-visible  Buttons, text boxes, and labels are visible  These are seen and utilized by the user  Non-visible components aren’t seen by users  But add features such as the LocationSensor  Component properties can be set including height, width, alignment, text to appear, etc.

 Provides different types of components that can be used  Each has different characteristics  A component type can be used in an app by dragging it from the Palette to the Viewer column

 Components you place on the simulated screen in the Viewer may look slightly different on your Android device  Note the shapes of the text boxes and buttons are not identical between the Viewer and device in this example

 Components Column Lists components placed in your app in a hierarchical tree format Lets you specify a meaningful name for a component  The Media Column Allows you to manage the media files (images, videos, and audio files) used in your app

 Component names can contain only letters, numbers, and underscores ( _ )  The 1st character of a component name must be a letter  Component names cannot contain spaces  Always change component names that will be used in the Blocks Editor to a meaningful name

Optional naming conventions used in the text  Pascal casing convention in which the 1st letter of each word is capitalized such as LabelContactName or LabelTotalPoints Optional naming conventions I prefer  I use camel casing in which the 1st letter of each word is capitalized except for the 1st word  I use 3 letter abbreviations for component types such as lblContactName or lblTotalPoints

 Lets you set values that determine how a component appears in the user interface  For example, can set the size, alignment, and text to appear

 An app is driven by events  Pressing a button or rotating your phone are examples of events  Think of an app as a set of event handlers  Behaviors are found in the event handlers  They define how the app responds to events  The key challenge of programming is to provide instructions that define the behaviors  Behaviors are defined in the Blocks Editor

 Most events are initiated by the user  Pressing a button triggers an event  Changing the device orientation triggers an event  Some events are not user-initiated  Events can be triggered by a timer (the clock)  Events can be triggered when two objects collide  An app need not react to every possible event  Programmer decides the events an app will react to by attaching a behavior to the event

 A block looks like a puzzle piece  A block executes some part of a behavior  Blocks become part of a behavior by dragging it from the Blocks column to the Blocks Viewer

 Organized into: Built-In – The basic blocks that may be used in App Inventor Screen1 – Shows blocks related to the components added in the Designer Any component – This is an advanced feature that allows a programmer to work generically with any component in the app

 The figure shows some of the built-in math blocks available in App Inventor  Note we have blocks for:  Addition  Subtraction  Multiplication  Division  Random Numbers and more