Visual Programming Week # 09 TinyDB, WebTinyDB, Web API
VP Lecture Note by Dr. Hanh Pham Outline Database TinyDB WebTinyDB WebAPI: stock quotes & charts References VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham Database Purpose: to store data permanently Similar: Files In APP Inventor: TAG = key or name (file name) VALUE = data (info in file) Two cases: TinyDB: store data on the phone/tablet WebTinyDB: store data on the web(cloud) VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham TinyDB Use your APP “Store” button to enter/store these 5 items ( pairs of <Tag,Value> ) to your TinyDB. Then, use the “Get” button to read each of them. TAG VALUE today Back to school yesterday It was very cold 111 first 222 Number 2 333 Ha ha ha VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham TinyDB VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham TinyDB VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham WebTinyDB 1) To SEE the WebTinyDB online: http://npvpdb2.appspot.com/ 2) An APP which talks to WebTinyDB => VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham WebTinyDB VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham WebTinyDB VP Lecture Note by Dr. Hanh Pham
VP Lecture Note by Dr. Hanh Pham Web Service API: Web Service for PROGRAMS (Client Apps): PROGRAM sends QUERRY To Web Page PROGRAM receives RESULT (texts or an Image of a CHART) from that Web Page VP Lecture Note by Dr. Hanh Pham
Web Service API: Yahoo Finance Stock PRICE QUERRY To Yahoo Server: http://download.finance.yahoo.com/d/quotes.csv?s=%40%5EDJI,GOOG&f=nsl1op Where GOOG is the stock symbol/ID of Google Company RESULT from Yahoo Server to OUR APP: Google Inc., GOOG, 1122.578, 1119, 1114.28 Which is in CVS format VP Lecture Note by Dr. Hanh Pham
Web Service API: Yahoo Finance Stock CHART QUERRY To Yahoo Server: http://chart.finance.yahoo.com/z?s=GOOG Where GOOG is the stock symbol/ID of Google Company RESULT from Yahoo Server to OUR APP: Image file: VP Lecture Note by Dr. Hanh Pham
Web Service API: Yahoo Finance VP Lecture Note by Dr. Hanh Pham
Web Service API: Yahoo Finance VP Lecture Note by Dr. Hanh Pham
Web Service API: Yahoo Finance VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART QUERRY To Web Page: http://chart.apis.google.com/chart?chxt=y&chbh=50,10,0&chs=300x225&cht=bvs&chco=A2C180,3D7930&chd=t1:11,22,15|11,22,15&chtt=Vertical+bar+chart Receive RESULT (an Image of a CHART): VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART QUERRY To Web Page: http://chart.apis.google.com/chart?chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec&chxt=x,y&chs=300x300&cht=r&chco=FF0000&chd=t:63,64,67,73,77,81,85,86,85,81,74,67,63&chls=2,4,0&chm=B,FF000080,0,0,0 Receive RESULT (an Image of a CHART): VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART VP Lecture Note by Dr. Hanh Pham
EXTRA Web Service API: Google CHART 1) Go to the Google Wizard Charts web page and find the right kind of Chart (based on the requirement) 2) Reset/change the parameters such as Title, Data (including Max), Label, Margin (based on the requirement) 3) Copy, Analyze, and Split the request: ORIGINAL REQUEST: http://chart.apis.google.com/chart?chs=300x225&cht=p3&chds=0,1000000&chd=t: 32,50,100&chl=A|B|C&chma=50,50&chtt=Voting+Results DIVIDED into: => , &chl=A|B|C&chma=50,50&chtt=Voting+Results 32 Textbox1 50 Textbox2 100 Textbox3
EXTRA Web Service API: Google CHART VP Lecture Note by Dr. Hanh Pham