Programming with App Inventor Storing Data

Slides:



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

Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Session Variables Storing Session Variables on the Server.
Chapter 51 Scripting With JSP Elements JavaServer Pages By Xue Bai.
No Texting While Driving. Introduction You'll design the app so that it sends a response to any text message received. You'll also allow the user to customize.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
VBA Modules, Functions, Variables, and Constants
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Basic Computer Organization CH-4 Richard Gomez 6/14/01 Computer Science Quote: John Von Neumann If people do not believe that mathematics is simple, it.
SMS Mobile Botnet Detection Using A Multi-Agent System Abdullah Alzahrani, Natalia Stakhanova, and Ali A. Ghorbani Faculty of Computer Science, University.
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.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
index.php Palmyra Area High School 1.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
WC2011 Programming Mobile Devices Android Development Day 2.
Android, where is my car? Summary. This is the just the summary of topic after it was taught in the lecture class. The LocationSensor component can report.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
靜宜大學資管系 楊子青 1 Working with Databases (II) 靜宜大學資管系 楊子青
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Summer Computing Workshop. Introduction  Boolean Expressions – In programming, a Boolean expression is an expression that is either true or false. In.
Loops, Databases, Procedures, and Lists Dr. José M. Reyes Álamo.
Tutorial 51 Programming Structures Sequence - program instructions are processed, one after another, in the order in which they appear in the program Selection.
If statements and validation. If statement In programming the if statement allows one to test certain conditions and respond differently depending on.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
1 Chapter 20 – Data sources and datasets Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
What is Programming? Computer programming is about telling the computer what it is we want it to do We tell the computer what we want it to do by sending.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Using Databases in the RememberHack Week 5. Databases Organized collection of data Intended to organize, store, and retrieve large amounts of data easily.
JavaScript, Fourth Edition
The Module Road Map Assignment 1 Road Map We will look at… Internet / World Wide Web Aspects of their operation The role of clients and servers ASPX.
Silberschatz, Galvin and Gagne  Operating System Concepts UNIT II Operating System Services.
Incorporating Feedback Lesson 5 0. Check-in: paper prototype By now, your paper prototype should be complete, so that you can begin creating your app.
Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha Stored Procedure used in PosgreSQL.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha Function, Trigger used in PosgreSQL.
SE-2840 Dr. Mark L. Hornick 1 Introduction to Ajax Asynchronous Javascript And XML.
CHAPTER 6 LESSON B Creating Custom Forms. Lesson B Objectives  Suppress default system messages  Create alerts and messages to provide system feedback.
Controlling Program Flow with Decision Structures.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Variables, operators, canvas, and multimedia Dr. Reyes.
Computer Science Up Down Controls, Decisions and Random Numbers.
- Sharing, - Layout, - & using Screens with App Inventor Earl Bergquist, Garfield High School Crucial Things to know:
Mobile Application Development Data Storage. Android provides several options for you to save persistent application data. The solution you choose depends.
Phonegap Bridge – Storage CIS 136 Building Mobile Apps 1.
By Hello Team Awesome World™.  To avoid strangers using others’ keys, cards, and passwords to enter the buildings, our team will develop a face recognition-based.
 Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do.
Visual Programming week # 02 APP (Application) Architecture.
CIS 136 Building Mobile Apps
Microsoft Visual Basic 2005 BASICS
DBM 405 Innovative Education- -snaptutorial.com
Loops, Databases, Procedures, and Lists
Stored Procedure used in PosgreSQL
Working with Databases (I) 靜宜大學資管系 楊子青
CIS 136 Building Mobile Apps
Working with Databases (I) 靜宜大學資管系 楊子青
Chapter 10 ADO.
Training & Development
Chapter 3: Process Management
Presentation transcript:

Programming with App Inventor Storing Data

Data Storage The App Inventor provides simple database capabilities to store information needed or created by your program. This information, once stored, will be available to you after your device (Android phone or tablet) application has ended and even after the Android device has been powered off. This is persistent memory that will be available until it is specifically deleted. The data can be save either online or on your device’s local memory (SIM card). The two objects provided are called the tinyDB and tinyWebDB. The tinyDB is listed among the objects in the Basic Palette But no matter how you combine them, Boolean expressions evaluate to either True or False.

Data Storage The tinyWebDB is listed in the Palette in the App Designer under the Other stuff section. The tinyWebDB has one attribute in the Properties that can be modified, the ServiceURL or online location of the database server. No location is provided for the local database of the tinyDB. TinyWebDb by default uses a shared testing database that is used by all App Inventors. Your data saved in this testing database will eventually be overwritten. You may create a ‘private’ shared database that will limit which users have access. The instructions for creating the ‘private’ database are located online with the help for the tinyWebDB object.

Data Storage Both DB objects work exactly the same way with respect to storing data. Data stored to these databases is stored under a unique tag generated by your program. A ‘tag’ is used as an easy way to identify what you have stored. Important: The tag must be unique. For example, if you store a List under the tag ‘answerList’ and the store another List under that same tag ‘answerList’, you will have overwritten the first List losing you data. The following two blocks (associated with both the tiny and tinyWeb DB objects store information: You need to provide the unique tag for each of the values to stored. But no matter how you combine them, Boolean expressions evaluate to either True or False.

Data Storage Retrieving data using the DB Objects varies slightly. The tinyDB provides a .StoreValue block and a simple .GetValue block which returns the value associated with the tag. The tinyWebDB needs slightly different methods since there is a web server that provides for communication across the Internet. Basically, with the tinyWebDB, you send a command to the db web server and then wait for the web server to signal back (via an event block) that the command has completed. With the tinyDB, the .GetValue command actually retrieves the data from the local database which you can assign to a local variable Events

Data Storage .GotValue Event After initiating the .GetValue for the tinyWebDB, you must use the .GotValue event block to obtain the data from the online data base. You need to compare the tagFromWebDB value to the tag under which the data was originally stored to determine what data was is be read. Below is sample code that executed when the online db signals the data has been retrieved. This code executed in this block is a prime example of where a procedure could be utilized. To view yours (and others) data save online, browse to the ServiceURL provided in the properties for the tinyWebDB. If you create a ‘private’ shared online database, the ServiceURL will be slightly different. View the testing database: http://appinvtinywebdb.appspot.com Viewing the online database can be very helpful in making sure your data was stored.

Data Storage .WebServiceError Event There is one other event for the tinyWebDB called .WebServiceError that can be ‘handled’ to report when the online database is having problems. If .StoreValue has been initiated and the Internet connection is not available or the database is not responding, this event maybe trigger and provide helpful information. The block below show how to set the text of a label to the error message returned when there is a WebServiceError.