Web Development Flashcards
What’s HTML5?
HTML5 is the latest evolution of the standard that defines HTML. The term represents two different concepts. It is a new version of the language HTML, with new elements, attributes, and behaviors, and a larger set of technologies that allows the building of more diverse and powerful Web sites and applications.
What’s a websocket?
The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.
What’s a virtual DOM?
For every DOM, there’s a corresponding virtual DOM object. A virtual DOM object is a representation of a DOM object, like a lightweight copy. A virtual DOM object has the same properties as a real DOM object, but it lacks the real thing’s power to directly change what’s on the screen.
How does the virtual DOM have advantages over manipulating the actual DOM?
manipulating the actual DOM is slow. Manipulating the virtual DOM is much faster, because nothing gets drawn onscreen. Think of manipulating the virtual DOM as editing a blueprint, as opposed to moving rooms in an actual hows.
How is a virtual DOM implemented?
When a framework such as react updates, it first updates the virtual DOM. This is fast as it does not have to draw anything on screen. It then compares the new DOM to the previous DOM and then updates only the actual DOM components that changed.
What is DOM?
The Document Object Model is a template model of the page that the browser creates.
It’s constructed as a tree of objects.
What is WebGL?
WebGL is a javascript API for rendering interactive 2D and 3D graphics within any compatible web browser without the use of plug-ins.
WebGL is fully integrated with other web standards, allowing GPU accelerated usage of phyusics and image processing and effects as part of the web page canvas.
What is a REST API?
REST or RESTful API is an architectural style for distributed hypermedia systems and was first presented by Roy Fielding in 2000 in his famous dissertation.
REST is stateless, and should be entered with no prior knowledge beyond the initial URI and a set of standardized media types that are appropriate for the intended audience.
What are the guiding principles of REST
- Client-Server, by separating the user interface concerns from the data storage concerns, we improve the portability of the user interface across multiple platforms and improve scalability by simplifying the server components.
- Stateless - Each requirest from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.
- Cacheable - cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or noncacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests.
- Uniform interface - By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and teh visibility of interactions is improved. In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behavior of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and hypermedia as the engine of application development.
- Layered system - the layered system allows an architecture to be composed of hierarchical layers by constraining component behavior such that each component cannot ‘see’ beyond the immediate layer with which they are interacting.
- Code on demand (optional) - REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This simplifies clients by reducing the number of features required to be pre-implemented.
What’s a resource in REST?
The key abstraction of information in REST is a resource. Any information that can be named can be a resource: a document or image, a temporal service, a collection of other resources, a non-virtual object (e.g. a person), and so on. REST uses a resource identifier to identify the particular resource involved in an interaction between components.
For HTTP, this is defined within the content-type of the http header. For example, an image, html file, json object, form
What’s a resource representation in REST?
The state of resource at any particular timestamp is known as resource representation. A representation consists of data, metadata describing the data and hypermedia links which can help the clients in transition to next desired state.
What is a media type in REST?
The data format of a representation is known as a media type. The media type identifies a specification that defines how a representation is to be processed. A truly RESTful API looks like hypertext. Every addressable unit of information carries an address, either explicitly (e.g., link and id attributes) or implicitly (e.g., derived from the media type definition and representation structure).
What’s a resource method?
A uniform interface for communicating. For HTTP, this is GET/PUT/POST/DELETE methods.
How does REST differ from HTTP?
in the REST architectural style, data and functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs). The resources are acted upon by using a set of simple, well-defined operations. The clients and servers exchange representations of resources by using a standardized interface and protocol - Typically HTTP.
What’s HTML?
Hyptertext markup language. A standardized system for tagging text files to achieve font, color, graphic, and hyperlink effects on world wide web pages.