Week 4 - Web Flashcards
What is an event handler?
something which can call code client side uploaded from the server
What can we use to manipulate webpages?
DOM
What does DOM stand for?
document object model
Why can server side be any language possible?
only needs to recieve requests and send HTML pages
Describe client-side web computation and processing?
- actions specific to a user
- local processing, fast response
- takes load off server
- reduces network load
- may incur local storage and processing overhead
Describe server-side web computation and processing?
- common content generated on demand
- benefit for many users accessing same content
- higher overhead at server for each page/document to be dynamically generated
What is dynamic typing?
when a type is assigned when a value is assigned
- but typing is strong
What are javascript primitive types?
numbers
strings
booleans
What are javascript trivial types?
null
undefined
What are javascript composite types?
object
array
Describe numbers in JS
8-byte floating point representation
what does 3 === denote?
checks the type
strict equality
what are the 3 variable keywords?
let
var
const
what does == denote
converts type
What is Node.js
it is an asynchronous event driven
JavaScript runtime
Node is designed to build scalable network
applications
What happens on each connection in node?
Upon each connection the callback is fired,
but if there is no work to be done, Node will
sleep
What does the DOM identify?
- the interfaces and objects used to represent and manipulate a document
- the semantics of these interfaces and objects
- the relationships among these interfaces and objects
What is the JS document?
the html currently being displayed
What is the JS window?
the OS window hosting the page
What is the JS navigator?
the browser application in use
What is the JS screen?
the physical monitor in use
What JS do we use to find objects?
document.getElementById()
What are some events that occur, that JS can be bound to?
- page starting loading
- use clicks a link
- user hovers their mouse over some content
- form submitted
Where should javascript be included on a webpage?
just before
Why should JS be at the bottom of the page?
allows page to load and as much of the DOM tree to be
created
When are scripts executed?
executed in order of appearance during the
browsers HTML parsing process
Where should you define all javascript elements? And why?
- in the HEAD section, since always processed before BODY
- so that the JavaScript objects that represent
the body will have been created