Persistent Data

Download Report

Transcript Persistent Data

CS 104 – Fall 2011
Exploring Computer Science
November 7, 2011
- Persistent Data
General Notes

Persistent Data




Class example



Local variables within an app
Storage on local phone database
Storage on a web server
Simple high score tracker
Same example using all three ideas
Discussion of Team Project Ideas

Presentation to rest of class
Local variables



Variables are useful for
storing the state of an
app as it is executing
The contents of a
variable are lost from
each start/stop of the
app; variables in a
program are volatile
Example

cs104_highScore_local
Storing data on the phone



The TinyDB component allows information to be
stored on the phone in a pair/value combination;
TinyDB has GetValue and SetValue
Stores values across executions of app on same
phone; Does not work on emulator
Example: cs104_highScoreDB
Persistence on a web server


TinyWebDB allows information to be stored
on a server, to be access by different users
Example: cs104_highScoreDB_web
Discussion of Team Projects

Give a summary of your app



What does it do?
Who would use it?
What special/neat features will you implement in
your app?