Chapter 5 Flashcards
To learn Chapter 5 concepts
What is the event handler for vanilla JavaScript?
addEventListener
What is a touch event?
Any action taken by an application when a gesture is applied
What does ‘ontouchstart’ do?
It is an event that will trigger when someone is using a touch screen and touches the screen to start
What does API stand for?
Application Programming Interface
Now, define what API is
An API is a set of routines, protocols, and tools that we use to build apps. Specifically for programming graphical user interface elements otherwise known as GUI elements.
What is a Web Worker?
These are APIs that allows scripts to run background in parallel; they connect to multiple webpages to get real-time data. From Mozilla Developers network:
Web Workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web application. The advantage of this is that laborious processing can be performed in a separate thread, allowing the main (usually the UI) thread to run without being blocked/slowed down.
What is a Web Socket?
An API with consistent communication between a client and a web server.
What is full-duplex communication?
It’s an old networking term that means two devices connected to a network can communicate back and forth at the same time
Geolocation API
an interface that uses latitude and longitude coordinates to provide a devices’ location
What is a try-catch sequence?
Try to do something, if it doesn’t work we’ll catch an error message and if we do catch an error message we want something else to happen
What are the main events associated with WebSocket communcations
onopen: when a socket opens
onmessage: when the web server receives a message
onclose: when a socket closes
File API
Used for uploading files from local storage to remote server
Web Storage
Saves session data within the browser or device memory. The sessionStorage() method keeps data until the browser is closed (for one session) localStorage() saves large data persistently (session-to-session).
Local storage
Used to save persistent data. It is stored in key/value pairs. It is browser-specific
Hardware capabilities
GPS
Accelerometer
Camera
JavaScript is a
- dot notation scripting language used to enhance web pages
Steps involved in creating an app are:
Plan your project
Design the user interface
Update the manifest file
Write Code
Build the app
Debug and test
Package
Validate
Deploy
What is an App package
A file that explains what files are needed in order for an app to run properly.
What is a process?
A process is a program that’s being executed
What is state management
It is maintaining browser data
App state
Starts when a web browser sends the first request for a webpage to a web server
Session state
Happens when the first request for an application opens a session, and ends when we close the session
Persistent state
Refers to the data an application needs after a session ends and this data is used the next time one gets on a website
localStorage
Data is stored from session to session without any time limit
sessionStorage
data is stored only for one session, and once the browser closes that session is deleted
window.sessionStorage
Save data to sessionStorage:
sessionStorage.setItem(“key”, “value”);
Read sessionStorage data:
var name = sessionStorage.getItem(“key”);
App Container
A memory space in which an app can run without interference from other apps
App Package
The result of compressing files and folders into a single file which can then be installed as an app. An executable
ALM
Application Lifecycle Management