Web Development Flashcards

1
Q

What’s HTML5?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s a websocket?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s a virtual DOM?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does the virtual DOM have advantages over manipulating the actual DOM?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is a virtual DOM implemented?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is DOM?

A

The Document Object Model is a template model of the page that the browser creates.

It’s constructed as a tree of objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is WebGL?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a REST API?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the guiding principles of REST

A
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What’s a resource in REST?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What’s a resource representation in REST?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a media type in REST?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s a resource method?

A

A uniform interface for communicating. For HTTP, this is GET/PUT/POST/DELETE methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does REST differ from HTTP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What’s HTML?

A

Hyptertext markup language. A standardized system for tagging text files to achieve font, color, graphic, and hyperlink effects on world wide web pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What’s CSS?

A

CSS, or cascading style sheets, adds styles like fonts and colors to websites. If HTML is the foundation, CSS is the flair

17
Q

What’s CSS3?

A

CSS3 is the latest evolution of CSS language. It brings a lot of new features and additions, like rounded corners, shadows, gradients, transitions or animations, as well as new layouts like multi-columns, flexible box or grid layouts.

18
Q

What’s an HTTP cookie?

A

A small piece of data sent from a website and stored on the user’s computer by the user’s web browser while the user is browsing.

19
Q

What are HTTP cookies designed for?

A

Cookies were designed to be a reliable mechanism for websites to remember stateful information (such as items added in the shopping cart in an online store) or to record the user’s browsing activity (including clicking particular buttons, loggin in, or record which pages were visited in the past).

They can also be used to remember arbitrary pieces of information that the user previously entered into form fields such as names, addresses, passwords, and credit cards.

20
Q

What are the types of HTTP cookies?

A

Session, persistent, secure, http-only, same site cookie, third party cookie, super cookie, authentication cookie.

21
Q

What’s an authentication cookie?

A

Authentication cookies are the most common method used by web servers to know whether the user is logged in or not, and which account they are logged in with.

22
Q

What’s SOAP?

A

Simple object access protocol (SOAP). An XML-based messaging protocol. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure call) request-response dialogues.

It is not tied to any particular transport protocol, though HTTP is the most popular.

It is not tied to any particular operating system or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand SOAP messages.

23
Q

What’s HTML?

A

HTML (Hypertext markup language) is not a programming lanugage; it’s a markup language used to tell your browser how to structure web pages you visit.

24
Q

What’s CSS?

A

CSS (Cascading style sheets) is used to style and layout webpages - for example, to alter the font, color, size and spacing of your content, split it into multiple columns, or add animations or other decorative features.

25
Q

What’s the same-origin policy?

A

Under the policy, a web browser permits scripts contained in a first web page to access data in a second web page, but only if both web pages have the same origin.

26
Q

What’s an origin?

A

an origin is defined as a combination of URI scheme, host name, and port number. This policy prevents a malicious script on one page from obtaining access to sensitive data on another web page through that page’s Document Object Model.

27
Q

Why is same origin policy important?

A

This mechanism bears a particular significance for modern web applications that extensively depend on HTTP cookies to maintain authenticated user sessions, as servers act based on the HTTP cookie information to reveal sensitive information or take state-changing actions.

A strict separation between content provided by unrelated sites must be maintained on the client-side to prevent the loss of data confidentiality or integrity.

28
Q

What’s cross site request forgery?

A

cross site request forgery attacks take advantage of the fact that the same origin policy does not apply to HTML tags.