Day 23 - Th, April 18, 2013
===========================
Schedule:
* Minute cards.
* AJAX and JSON-RPC
* More database: joins, transactions, multithreading, synch, etc.
Questions/TODO
--------------
(This is an example of using the `jQuery JavaScript library `__ with `AJAX `__ and
`JSON-RPC `__)
Grab the latest version of https://github.com/ctb/cse491-webz; for example,
on the CSE cluster, you could do::
mkdir day23
cd day23
python2.7 -m virtualenv env
source env/bin/activate.csh
pip install simplejson
to get the environment running, and then ::
git clone https://github.com/ctb/cse491-webz.git
cd cse491-webz
python app.py
Now, go to the URL of the Web server, and take a look at the
'/content' URL, which is loading from 'somefile.html'. (You can look
at the `source of 'somefile.html' on github `__, if you want.)
On the '/content' page, you'll see three input box regions
The value in the first is set dynamically by JavaScript using the jQuery
library.
The value in the second is output in an alert box upon change.
The two values in the third are summed and displayed on the page.
TODO:
1. At your table, talk through the code for the first and second input
boxes. What's going on? (One thing you can do to find out is edit
the HTML to remove the first