Tags: USCCode/pinboard
Tags
HW8: ajax /board, json response to /board/ 1. GET /board/1.json return json representation of board. 2. GET /board/1 does a GET .json and then draws all the info using javascript. (Model in js not in HTML s in HW7) 3. Add and Remove pins from board with one button 4. Change title of board by clicking on it. 5. private checkbox 6. handle server errors by reverting back to old model 7. Only editor should be able to see extra buttons. Non-editor should not see private pins.
HW7: Ajaxify pin edits 1. Browser events, propagation, .on() 2. .html() .val() .text(): dynamic HTML 3. .ajax(), 4. handle error: (temporary server code change to test). Change client back if server reports error. Show error message that goes away (like gmail) 5. Client vs server Pin model (MVC). Is the client-side model in HTML, or in JSON? (solution uses HTML, but getPin() extracts the json 6. re-direct on POST but not on 'xhr' POST: make sure bookmarklet still works!
1. Store a PIN: url+caption+date posted+owner 2. setup /pic folder of pics for testing 3. GET /pin shows me My pins 4. GET /pin/123 shows that pin, and for for editing it 5. POST /pin creates a new pin, redirects to that /pin/123, gives pin unique id using datastore id() 6. POST /pin/123 updates an existing pin 7. POST /pin/123?cmd=delete deletes pin 123 8. make sure only owner can view/update/delete his pins