Podcast
Questions and Answers
Which HTTP request method is primarily used to send data to the server to create or modify a resource?
Which HTTP request method is primarily used to send data to the server to create or modify a resource?
What type of HTTP polling involves a client maintaining a persistent connection with the server until new data is available?
What type of HTTP polling involves a client maintaining a persistent connection with the server until new data is available?
What does an HTTP status code in the 4xx range indicate?
What does an HTTP status code in the 4xx range indicate?
Which HTML tag is used to provide alternative text for an image, primarily for screen readers?
Which HTML tag is used to provide alternative text for an image, primarily for screen readers?
Signup and view all the answers
What is the function of the CSS pseudo-element ::after
?
What is the function of the CSS pseudo-element ::after
?
Signup and view all the answers
What characteristic of JavaScript allows for implicit type conversion when mismatched types are encountered?
What characteristic of JavaScript allows for implicit type conversion when mismatched types are encountered?
Signup and view all the answers
Which variable declaration keyword in JavaScript is block-scoped and allows reassignment of its value?
Which variable declaration keyword in JavaScript is block-scoped and allows reassignment of its value?
Signup and view all the answers
When comparing two values in JavaScript, which operator performs type conversion before the comparison?
When comparing two values in JavaScript, which operator performs type conversion before the comparison?
Signup and view all the answers
Which of the following is the correct syntax for a ternary operator in JavaScript?
Which of the following is the correct syntax for a ternary operator in JavaScript?
Signup and view all the answers
In the context of RESTful API design, what does the principle of 'statelessness' mean?
In the context of RESTful API design, what does the principle of 'statelessness' mean?
Signup and view all the answers
Which HTTP header is commonly used for providing authentication information in the HTTP Basic authentication scheme?
Which HTTP header is commonly used for providing authentication information in the HTTP Basic authentication scheme?
Signup and view all the answers
According to typical REST API endpoint rules, how should a collection of resources be represented in a URI?
According to typical REST API endpoint rules, how should a collection of resources be represented in a URI?
Signup and view all the answers
Which of these is not a valid method for REST API authentication?
Which of these is not a valid method for REST API authentication?
Signup and view all the answers
If given a string "123.45"
, which JavaScript function would correctly convert this string to a floating point number?
If given a string "123.45"
, which JavaScript function would correctly convert this string to a floating point number?
Signup and view all the answers
What does the term 'code-on-demand' refer to in the context of RESTful APIs?
What does the term 'code-on-demand' refer to in the context of RESTful APIs?
Signup and view all the answers
Which of the following best describes the primary function of middleware in an Express application?
Which of the following best describes the primary function of middleware in an Express application?
Signup and view all the answers
In the context of web application security, which of the following is NOT a common measure?
In the context of web application security, which of the following is NOT a common measure?
Signup and view all the answers
What is the primary advantage of Node.js's asynchronous and event-driven architecture?
What is the primary advantage of Node.js's asynchronous and event-driven architecture?
Signup and view all the answers
Which of the following best describes the role of the 'Model' in the MVC architectural pattern?
Which of the following best describes the role of the 'Model' in the MVC architectural pattern?
Signup and view all the answers
What is the key concept behind React's use of a virtual DOM?
What is the key concept behind React's use of a virtual DOM?
Signup and view all the answers
In React, what is the primary purpose of the useEffect
hook?
In React, what is the primary purpose of the useEffect
hook?
Signup and view all the answers
Which of the following is NOT a typical advantage of using established design patterns?
Which of the following is NOT a typical advantage of using established design patterns?
Signup and view all the answers
What is the main difference between require('fs')
and require('http')
in Node.js?
What is the main difference between require('fs')
and require('http')
in Node.js?
Signup and view all the answers
Study Notes
HTTP Requests
- Partial get request: retrieves a portion of information
- Conditional get request: determines if a fresh copy from the server is needed
- Head request: returns only the header data, not the body
- Options request: specifies allowed HTTP methods
- Put request: uploads documents to the server
- Delete request: deletes data from the server
HTTP Polling Types
- Short polling: client sends frequent small requests; server responds immediately
- Long polling: client maintains a connection; server responds when new data is available
HTTP Status Codes
- 200: OK (request successful)
- 201: Created (resource created successfully)
- 204: No Content (request successful, no content to return)
- 401: Unauthorized (client not authenticated)
- 402: Payment Required
- 403: Forbidden (client lacks permission)
- 404: Not Found (resource not found)
- 500: Internal Server Error (server error)
- 1xx: Informational (server is processing the request)
- 2xx: Successful (request completed successfully)
- 3xx: Redirection (client needs to make a further request)
- 4xx: Client Error (client-side issue)
- 5xx: Server Error (server-side issue)
HTML
- Hyperlinks: allow immediate activation of links
- Meta tags: provide descriptions of HTML files
- Viewport: defines a viewport for the HTML file
-
<em>
: emphasizes a particular meaning in a sentence -
<i>
: emphasizes a term (e.g., technical term) -
<strong>
: highlights important information -
<b>
: draws attention, but doesn't indicate importance
Other
-
<b>
: draws attention without indicating importance (HTML tag) - Self-closing HTML tags (e.g.,
<br>
) - Nested lists (
<li>
within<li>
,<ol>
within<ol>
) - List types in
<ol>
,type=1
,type=i
- List starting points using
start
attribute - Reversed lists
<ol reversed
- Alternative text (
alt
) for screen readers
CSS
- Pseudo-elements (
::after
): add content after existing content -
rem
vsem
: different units of measurement in CSS
JavaScript
- Dynamic vs. interpretive scripts
- Weakly typed languages
- Cross-platform capability
- Automatic declaration styles vs redeclaration
-
var
(less preferred) vs.const
(block scoped)
REST APIs
- Uniform interface
- Unique URIs
- Resource manipulation through representations
- Hypermedia
- Statelessness
- Client-server architecture (separation between client and server which improves scalability)
- Cacheability (responses can be marked cacheable to improve performance)
- Layered system
- Code-on-demand
- Design patterns in React, MVC, Model, View, Controller, and virtual DOM
- useState vs useEffect
Node.js and Express
- Node.js execution environment in Chrome’s JavaScript runtime (speed and efficiency)
- Asynchronous and event-driven (speeds up tasks)
- Highly scalable and non-blocking operation
Design Patterns and Frameworks
- Why use existing design patterns? (saves time and effort, reduces errors)
- Design pattern benefits
- Provide clear steps for solutions to common problems.
- Useful real-world scenarios
React (JavaScript Framework)
- Virtual DOM (lightweight in-memory representation of the actual DOM)
-
useState
for declaring variables affected by state changes -
useEffect
for writing code with data dependencies
WebSockets
- HTTP limitations (server intensity, message ordering, and latency)
- WebSockets benefits (increased bandwidth, reduced latency, improved scalability)
Security Considerations
- Authentication and authorization
- HTTPS (SSL/TLS)
- Cross-Origin Resource Sharing (CORS)
- Token expirations and refresh
- Input validation
- Output encoding
- Rate limiting
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge of web development concepts with this quiz covering HTTP methods, polling techniques, HTML tags, and CSS. Challenge yourself to understand how these components interact to create dynamic web experiences.