WebFund 2016W Lecture 13

From Soma-notes
Revision as of 17:32, 1 March 2016 by Soma (talk | contribs) (Created page with "==Video== The video from the lecture given on March 1, 2016 [http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/lectures/comp2406-2016w-lec13-01Mar2016.mp4 is now availab...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Video

The video from the lecture given on March 1, 2016 is now available.

Notes

In lecture

Lecture 13
----------

To get help with assignment 4, look at Assignment 5 from Winter 2015.

closures

DOM
 - document object model
 - set of JavaScript objects for accessing the current page in the browser
 
client-side JS can access the DOM
  (data structures representing the current web page)

server-side JS can access the operating system

client-side JS is *limited* in its access
 - because such access is dangerous
 - ANYONE can run JavaScript in your browser
 - so, JavaScript in the browser is sandboxed


execution sandbox is an environment for running untrusted programs
 - sandbox limits access and resources

Client-side JavaScript has no native way to
  (well, it used to...)
  - access local files
  - open network connections
  - run multiple threads
  - access other windows/programs


Originally JavaScript was so limited it could do no background processing
 - could only run when the page was loaded or when the user acted

Microsoft messed it up
 - Outlook Web Access
 - they built an ActiveX control which implemented XMLHttpRequest()
   - but really, it was a way to do GETs and POSTs in the background
 - other browsers implemented the API natively

Now you could update data in a web page without reloading the page