Intro to Web Clients (Week 6, part #2) Flashcards
What is an important distinction relating to JS, the browser and Node?
JavaScript + browser !== JavaScript + Node
What are the key ideas with JS + browser? (7)
1) You’re dealing with a user!
2) Input and output via HTML & CSS (& DOM)
3) Deployment of your app is different
4) Different APIs in browser -> AJAX (XHR)
5) Dependencies on libraries -> ‘importing’ JS libraries is different e.g. CDN vs npm install, node packages –> npm cannot always work due to security issues in browser so need to design code differently
6) Project structure is different -> JS, HTML, CSS, other assets
7) Similar terminology, different meaning -> e.g. “routes” & “routing”
What does “deployment of your app is different” mean in terms of JS + browser
1) You don’t know which browser, or version.
2) You don’t know the network-connection quality.
3) You don’t know whether cookies are enabled.
4) You don’t know the computing power of the hosting machine.
What is CDN?
Content delivery network -> a geographically distributed group of servers which work together to provide fast delivery of Internet
What does HTML stand for?
Hyper Text Markup Language
What is HTML?
Most basic building block of the Web. It describes and defines the content of a webpage.
Other technologies besides HTML are generally used to describe a webpage’s appearance/presentation(CSS) or functionality (JavaScript).
What is the difference between content and data?
DATA
1) gives us raw material from where we can provide information about our users
2) what’s in javascript structures (arrays & objects) want to inject data in html content
CONTENT
1) digestible forms of information.
2) what’s in HTML elements
What is a single page web application (SPA)?
A web page that changes it view
What type of language is HTML?
declarative
What is HTML comprised of?
A declaration of a document type (HTML), together with a hierarchical structure of (nested) HTML elements, with elements and attributes
In terms of HTML, how are elements identified?
by tags
In terms of HTML, what do elements typically contain?
some kind of content(to display)
In terms of HTML, what may elements have?
attributes
In terms of HTML, what do attributes define?
characteristics of elements
In terms of HTML, what do attributes often have?
values(for the characteristics)
In terms of HTML, what do attributes allow for?
cross-referencing to CSS and JavaScript
In terms of HTML, what may attributes be?
custom-defined
Give the general heirarchy of an HTML document.
See images doc -> #1
What are some elements of html?
tags, attributes
Identify open and closing tags, content and element for:
[p]Javascript callbacks are turtles all the way down.[/p]
Note: [ = < and ] = >
[p] = opening tag
[/p] = closing tag
Javascript callbacks are turtles all the way down. = content
entire thing = element
Identify the name and value and attribute:
[p class=”comment”]Javascript callbacks are turtles…[/p]
Note: [ = < and ] = >
class = name
“comment” = value
class=”comment” => attribute