WebFund 2015W: Tutorial 7: Difference between revisions

From Soma-notes
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''This tutorial is not yet finalized.'''
In this tutorial you'll be learning about and extending [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/ajax-notes.zip ajax-notes].  This application is [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/persistent-notes.zip persistent-notes] from [[WebFund 2015W: Tutorial 6|Tutorial 6]] modified to work from a single page using client-side JavaScript to update the page in response to JSON objects returned from the server.  The application expects there to be a MongoDB instance running on localhost with notes in the same format as that used by the code in [[WebFund 2015W: Assignment 5|Assignment 5]] and [[WebFund 2015W: Assignment 6|Assignment 6]] (and their corresponding tutorials).
In this tutorial you'll be learning about and extending [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/ajax-notes.zip ajax-notes].  This application is [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/persistent-notes.zip persistent-notes] from [[WebFund 2015W: Tutorial 6|Tutorial 6]] modified to work from a single page using client-side JavaScript to update the page in response to JSON objects returned from the server.  The application expects there to be a MongoDB instance running on localhost with notes in the same format as that used by the code in [[WebFund 2015W: Assignment 5|Assignment 5]] and [[WebFund 2015W: Assignment 6|Assignment 6]] (and their corresponding tutorials).


Line 12: Line 10:
* What happens to ajax-notes when mongodb is not running when the app is started?  What if it is shut down while the app is running?
* What happens to ajax-notes when mongodb is not running when the app is started?  What if it is shut down while the app is running?
** You can stop and start mongodb by typing <tt>sudo service mongodb stop</tt> and <tt>sudo service mongodb start</tt>.
** You can stop and start mongodb by typing <tt>sudo service mongodb stop</tt> and <tt>sudo service mongodb start</tt>.
* Implement a delete note button as described in [[WebFund 2015W: Assignment 7|Assignment 7]], Question ?.
* Implement a delete note button as described in [[WebFund 2015W: Assignment 7|Assignment 7]], Question 1.


==Getting Credit for Tutorial==
==Getting Credit for Tutorial==

Latest revision as of 17:29, 9 March 2015

In this tutorial you'll be learning about and extending ajax-notes. This application is persistent-notes from Tutorial 6 modified to work from a single page using client-side JavaScript to update the page in response to JSON objects returned from the server. The application expects there to be a MongoDB instance running on localhost with notes in the same format as that used by the code in Assignment 5 and Assignment 6 (and their corresponding tutorials).

Again note that ajax-notes includes a node_modules directory that may only work in the class VMs. If you are running it in another environment and the JavaScript fallbacks don't work properly you'll need to delete the node_modules directory and then type "npm install" to recreate it.

Tasks/Questions

  • If you prevent notes.js from loading client side, how does the app's functionality change? What about jQuery?
  • What do you get if you manually visit /getNotes when you are logged in? What about when you aren't logged in?
  • Why do the [edit] buttons look more like links?
  • What is the importance of the notesArea class?
  • What happens to ajax-notes when mongodb is not running when the app is started? What if it is shut down while the app is running?
    • You can stop and start mongodb by typing sudo service mongodb stop and sudo service mongodb start.
  • Implement a delete note button as described in Assignment 7, Question 1.

Getting Credit for Tutorial

You can either:

  • Attend most of a tutorial session and show you have made progress on the above tasks and questions (or you spent the time working on Assignment 6), or
  • Show a TA a working implementation of a delete note button.