Untitled
48 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Explain how async/await simplifies asynchronous JavaScript code compared to traditional Promises.

async/await makes asynchronous code look and behave a bit more like synchronous code. It improves readability by reducing nested callbacks and .then() chains, making it easier to reason about the flow of execution.

Describe the key differences between React and Angular in terms of their architecture and typical use cases.

React is a library focused on the view layer and uses a component-based architecture with a Virtual DOM for efficient updates. Angular is a comprehensive framework that typically uses two-way data binding and is often preferred for large-scale applications.

Explain how React's Virtual DOM improves performance compared to directly manipulating the real DOM.

The Virtual DOM minimizes direct manipulations to the real DOM by batching updates. React updates the Virtual DOM first, then calculates the minimal set of changes needed and applies those changes to the real DOM, reducing re-rendering and improving performance.

Describe the purpose of React hooks and give a specific example of how useState is used.

<p>React hooks allow functional components to use state and other React features that were previously only available in class components. <code>useState</code> is used to declare a state variable and a function to update it; for example, <code>const [count, setCount] = useState(0);</code> initializes a state variable <code>count</code> to <code>0</code>.</p> Signup and view all the answers

Contrast the approaches of REST APIs and GraphQL for data fetching, highlighting the benefits of GraphQL.

<p>REST APIs use fixed URLs to return data, potentially over-fetching or under-fetching data. GraphQL allows the client to specify exactly the data they need, reducing unnecessary data transfer and improving efficiency.</p> Signup and view all the answers

Explain the role of middleware in backend development and provide a practical example.

<p>Middleware functions execute between a request and the final response in a backend application. A practical example is logging incoming requests to track application usage and debug issues.</p> Signup and view all the answers

Describe two methods to prevent SQL Injection attacks and explain why they are effective.

<p>Prepared statements and input sanitization are effective methods to prevent SQL injection. Prepared statements precompile the SQL query, separating the code from the data, while input sanitization escapes or removes potentially harmful characters from user inputs, preventing them from being interpreted as SQL code.</p> Signup and view all the answers

Explain how database indexing improves query performance, and describe a scenario where it would be particularly beneficial.

<p>Database indexing creates a data structure that allows the database to quickly locate specific rows without scanning the entire table. It benefits queries with <code>WHERE</code> clauses on indexed columns, especially in large tables where a full table scan would be slow.</p> Signup and view all the answers

In the Model-View-Controller (MVC) architecture, how do the View and Controller interact to process a user's button click on a webpage?

<p>The View detects the button click and notifies the Controller. The Controller then processes the input and updates the Model, which in turn updates the View.</p> Signup and view all the answers

Explain how using a Content Delivery Network (CDN) optimizes a full-stack application.

<p>A CDN stores and serves static files from geographically distributed servers, reducing latency and improving loading times for users, regardless of their location.</p> Signup and view all the answers

Describe the key differences between the 'Feature Branching' and 'Git Flow' Git workflows.

<p>Feature Branching isolates each new development or feature into its own branch, while Git Flow uses a more structured system with <code>main</code>, <code>develop</code>, <code>feature</code>, and <code>release</code> branches for managing different stages of development.</p> Signup and view all the answers

Outline the steps you would take to resolve a Git conflict during a merge operation.

<p>First, use <code>git diff</code> to examine the conflicting changes. Then, manually edit the files to integrate the desired changes, and finally, use <code>git add</code> to stage the resolved files and <code>git commit</code> to finalize the merge.</p> Signup and view all the answers

Compare and contrast microservices and monolithic architectures, focusing on their impact on deployment and scaling.

<p>Microservices involve deploying small, independent services, allowing for scaling individual components. Monolithic architecture deploys as one large unit, which can make scaling and updates more complex.</p> Signup and view all the answers

Explain how Docker containers help in resolving compatibility issues across different computing environments.

<p>Docker containers package an application with all its dependencies into a lightweight, isolated environment, ensuring it runs consistently across any system that supports Docker, regardless of the underlying OS or infrastructure.</p> Signup and view all the answers

Describe the process by which OAuth allows a user to log in to an application using their existing Google account, without the application directly accessing their Google password.

<p>The user authorizes the application to access their Google account. Google provides the application with an access token, which the application uses to make API calls to Google on behalf of the user, without needing the user's password.</p> Signup and view all the answers

Explain how sanitizing user data helps in preventing Cross-Site Scripting (XSS) vulnerabilities.

<p>Sanitizing user data involves removing or encoding any potentially malicious code (e.g., JavaScript) from user inputs before displaying them on a webpage, preventing the execution of unintended scripts in the user's browser.</p> Signup and view all the answers

Explain how the CSS box model influences the total width of an element and how you would account for the border and padding to achieve a specific element width.

<p>The box model includes content, padding, border, and margin. The total width of an element is the sum of content width, padding, and border. To achieve a specific width, subtract the padding and border from the desired width when setting the content width.</p> Signup and view all the answers

Describe a scenario where using semantic HTML tags significantly improves accessibility and SEO, and explain why.

<p>Using <code>&lt;article&gt;</code> tags to define blog posts improves accessibility for screen readers, allowing users to navigate content more effectively. Additionally, it boosts SEO as search engines can better understand the structure and content of the page.</p> Signup and view all the answers

Outline a strategy using at least three methods to optimize a website's loading speed, and describe how each method contributes to the overall performance improvement.

<ol> <li><strong>Minify Files</strong>: Reduce the size of CSS and JavaScript files to decrease download times.</li> <li><strong>Enable Browser Caching</strong>: Allows browsers to store static assets locally, reducing server load and speeding up repeat visits.</li> <li><strong>Use Lazy Loading</strong>: Load images and other media only when they are visible in the viewport, improving initial page load time.</li> </ol> Signup and view all the answers

Explain how event delegation works in JavaScript. Include an example of a situation where it would be particularly useful, contrasting it with a less efficient approach.

<p>Event delegation involves attaching a single event listener to a parent element instead of multiple listeners to its children. This is useful when handling events for many similar elements or dynamically added elements. A less efficient approach would be attaching individual event listeners to each child, which is resource-intensive.</p> Signup and view all the answers

Describe a practical application of closures in JavaScript, beyond creating a simple counter, and explain how the closure helps maintain data privacy or state.

<p>Closures can be used to create encapsulated modules with private state. For instance, a module that manages user authentication can use a closure to keep the authentication status private, only exposing functions to log in or log out. This prevents external code from directly modifying the authentication state.</p> Signup and view all the answers

Compare and contrast the use of callbacks and promises for handling asynchronous operations in JavaScript, highlighting one advantage and one disadvantage of each approach.

<p><strong>Callbacks</strong>: Advantage - widely supported in older browsers; Disadvantage - can lead to callback hell with complex asynchronous flows. <strong>Promises</strong>: Advantage - cleaner syntax with <code>.then()</code> and <code>.catch()</code>, making asynchronous code easier to read and manage; Disadvantage - not natively supported in very old browsers (requires polyfills).</p> Signup and view all the answers

How do async and await simplify asynchronous JavaScript code, and what are the potential drawbacks of using them?

<p><code>async</code> and <code>await</code> make asynchronous code look and behave a bit more like synchronous code, which improves readability. Potential drawbacks can include: Requires careful error handling with <code>try...catch</code> blocks, and can sometimes hide the asynchronous nature of the code, potentially leading to performance bottlenecks if not used judiciously.</p> Signup and view all the answers

You are building a single-page application. Outline the steps to optimize its performance, considering aspects like initial load time, rendering, and data management. Mention at least 3 different techniques.

<ol> <li><strong>Code Splitting</strong>: Break the application into smaller chunks, loading only the necessary code for each route or feature to reduce initial load time.</li> <li><strong>Virtualization</strong>: Use techniques like windowing for long lists to render only the visible items, improving rendering performance.</li> <li><strong>Debouncing/Throttling</strong>: Limit the rate at which functions are executed in response to rapid events (e.g., resizing, scrolling) to prevent performance bottlenecks.</li> </ol> Signup and view all the answers

Explain a scenario where using CSS Grid would be more advantageous than using CSS Flexbox for website layout.

<p>CSS Grid is more advantageous when you need to create a complex two-dimensional layout with rows and columns, such as a magazine-style layout where elements span multiple rows and columns.</p> Signup and view all the answers

Describe how lazy loading images can improve website performance and user experience.

<p>Lazy loading improves website performance by only loading images when they are about to come into the user's viewport, reducing initial page load time and saving bandwidth. This provides a faster, more responsive user experience, especially on image-heavy pages.</p> Signup and view all the answers

Contrast the core architectural philosophies of React and Angular.

<p>React is a UI library focused on the view layer, emphasizing component-based architecture and a virtual DOM for efficient updates. Angular is a comprehensive framework providing a full solution including data binding, dependency injection and templating, promoting structured application development.</p> Signup and view all the answers

How do React Hooks like useState and useEffect enhance component functionality, and what problem do they solve?

<p>React Hooks allow functional components to manage state and perform side effects, solving the problem of needing class components for these functionalities. <code>useState</code> enables state variables, and <code>useEffect</code> handles lifecycle-related tasks, leading to cleaner and reusable code.</p> Signup and view all the answers

Describe a situation where you would choose Redux over useState for state management in a React application.

<p>Redux is preferred over <code>useState</code> when dealing with complex applications needing to share state across numerous components. Redux offers a centralized store that simplifies state management and predictability, making it easier to maintain and debug large-scale applications.</p> Signup and view all the answers

Explain the concept of two-way data binding in Angular; give an example of how it simplifies development.

<p>Two-way data binding in Angular synchronizes data between the model and the view, automatically updating the UI when the data changes and vice versa. This simplifies development by reducing the manual effort needed to keep the UI and data consistent, such as in form inputs connected to component properties.</p> Signup and view all the answers

Differentiate between synchronous and asynchronous programming and provide a scenario where asynchronous programming is essential in backend development.

<p>Synchronous programming executes code sequentially, blocking further execution until each operation completes. Asynchronous programming allows multiple operations to run concurrently without blocking. Asynchronous programming is essential in backend development for handling I/O operations like database queries or network requests, preventing the server from freezing while waiting for these operations to complete.</p> Signup and view all the answers

Explain how using JSON Web Tokens (JWT) enhances security in a backend authentication system.

<p>JWTs enhance security by providing a secure way to authenticate users and transmit data. When a user logs in, the server generates a JWT containing user information and signs it with a secret key. Subsequent requests from the user include the JWT, which the server verifies for authenticity and authorization, without needing to query the database repeatedly.</p> Signup and view all the answers

Explain how you might use a JWT to manage user sessions in a stateless backend environment, detailing the steps from user login to accessing protected resources.

<p>Upon login, the server creates a JWT containing user information and signs it. The client stores this token and includes it in the headers of subsequent requests. The server verifies the token's signature for each request, granting access to protected resources if valid.</p> Signup and view all the answers

Describe a scenario where using a microservices architecture would be advantageous over a monolithic architecture. Explain the benefits specific to the scenario.

<p>An e-commerce platform benefits from microservices by independently scaling and updating each function like product catalog, shopping cart, and payment processing. This allows focused development and reduces system-wide downtime during updates.</p> Signup and view all the answers

Outline the steps you would take to implement robust error handling in a Node.js backend application, including how you would log errors and return appropriate responses to the client.

<p>Implement try-catch blocks for error detection. Use a logging library (e.g., Winston or Morgan) to record errors with timestamps and context. Return appropriate HTTP status codes and meaningful error messages to the client.</p> Signup and view all the answers

Describe a situation where you might choose a NoSQL database over a relational database. What characteristics of that situation make NoSQL a better choice?

<p>For storing user profiles with varying attributes in a social media application, a NoSQL database like MongoDB is preferable. Its flexible schema accommodates diverse user data efficiently, unlike the rigid structure of SQL databases.</p> Signup and view all the answers

Explain how database transactions ensure data integrity, illustrating with an example of transferring funds between two bank accounts.

<p>Database transactions ensure that a series of operations either all succeed or all fail together. Example: Transferring funds involves debiting one account and crediting another; if one fails, the transaction rolls back to prevent data inconsistency.</p> Signup and view all the answers

Describe how CORS prevents unauthorized requests and how you would configure a server to allow requests from https://example.com.

<p>CORS prevents cross-origin requests by restricting web pages from making requests to a different domain than the one which served the web page. To allow requests from <code>https://example.com</code>, the server includes the header <code>Access-Control-Allow-Origin: https://example.com</code> in its responses.</p> Signup and view all the answers

Explain the differences between unit, integration, and end-to-end tests. Describe a scenario for each type of testing in a web application project.

<p>Unit tests check individual functions, like validating an email format. Integration tests verify interaction between components, such as user authentication linking to the database. End-to-end tests simulate user workflows, like placing an order from start to finish.</p> Signup and view all the answers

Describe the tools you would use to test API endpoints and how you would validate different aspects of the API's response (e.g., status code, response time, and data structure).

<p>I would use Postman or Insomnia to manually test API endpoints. I can validate status codes, response times, and data structure. I can automate API testing with Jest and Supertest.</p> Signup and view all the answers

Explain the core difference between pseudo-classes and pseudo-elements in CSS and provide an example of each.

<p>Pseudo-classes style elements based on their state (e.g., <code>:hover</code>), while pseudo-elements style specific parts of an element (e.g., <code>::before</code>).</p> Signup and view all the answers

Describe two significant features introduced in ES6 (ECMAScript 2015) and explain how they improve JavaScript development.

<p>ES6 introduced <code>let</code> and <code>const</code> for block-scoped variable declarations, improving code clarity and reducing errors. Arrow functions provide a more concise syntax for writing functions and handle <code>this</code> context differently.</p> Signup and view all the answers

Explain event delegation in JavaScript. Why is it considered an efficient method for event handling?

<p>Event delegation involves attaching a single event listener to a parent element to handle events triggered by its child elements. This is efficient because it reduces the number of event listeners, improving performance, especially with dynamically added elements.</p> Signup and view all the answers

What are web components? Briefly describe the three main technologies they are built upon and their roles.

<p>Web components are reusable UI elements built with custom elements (defining new HTML tags), shadow DOM (encapsulating styles and markup), and templates (defining reusable markup structures).</p> Signup and view all the answers

Describe two techniques for handling browser compatibility issues in frontend development, explaining how each addresses the problem.

<p>Feature detection (e.g., using Modernizr) checks if a browser supports a specific feature and applies alternative code if it doesn't. Polyfills provide missing functionality in older browsers by implementing the standard API using JavaScript.</p> Signup and view all the answers

Explain the concept of lazy loading. How does it contribute to improved web performance, and in what scenarios is it most beneficial?

<p>Lazy loading defers the loading of resources (e.g., images) until they are needed, typically when they are about to enter the viewport. This improves initial page load time and reduces bandwidth usage, especially beneficial for pages with many images or videos.</p> Signup and view all the answers

In the context of backend development, differentiate between SQL and NoSQL databases, highlighting a key use case for each.

<p>SQL databases (e.g., MySQL) use structured tables with predefined schemas, suitable for applications requiring data integrity and complex relationships. NoSQL databases (e.g., MongoDB) store flexible, JSON-like data, ideal for applications with evolving data structures and high scalability needs.</p> Signup and view all the answers

What is an ORM (Object-Relational Mapper)? How does it simplify database interactions in backend development?

<p>An ORM (Object-Relational Mapping) allows interacting with databases using code instead of raw SQL queries. It maps database tables to objects, simplifying database operations and improving code readability and maintainability.</p> Signup and view all the answers

Flashcards

Box Model in CSS

The box model describes the four layers of an element: Content, Padding, Border, and Margin, controlling spacing and size.

Semantic HTML Tags

Semantic HTML tags (like <header>, <article>, <footer>) clearly describe the purpose of the content they enclose, improving SEO and accessibility.

Website Load Faster

Increase website speed by minimizing files, using a CDN, enabling caching, and implementing lazy loading.

Event Delegation

Event delegation adds a single event listener to a parent element to handle events for all its children, improving performance and handling dynamic elements.

Signup and view all the flashcards

Closure in JavaScript

A closure is when a function remembers variables from its parent function even after the parent function has finished executing.

Signup and view all the flashcards

Asynchronous Operations in JavaScript

Handle asynchronous operations using Callbacks, Promises (.then()), and Async/Await.

Signup and view all the flashcards

View (in MVC)

Displays data to the user; the UI.

Signup and view all the flashcards

Controller (in MVC)

Processes user input and updates the Model and View.

Signup and view all the flashcards

Web Server Role

Receives user requests and sends back the correct webpage or data.

Signup and view all the flashcards

Microservices Architecture

Breaking an application into small, independent services.

Signup and view all the flashcards

Monolithic Architecture

One big, single unit application.

Signup and view all the flashcards

Docker Containers

Lightweight, isolated environments to run applications consistently.

Signup and view all the flashcards

OAuth Authentication

Lets users log in with existing accounts (Google, Facebook).

Signup and view all the flashcards

SQL Injection

Injecting harmful code into databases.

Signup and view all the flashcards

async/await

A cleaner way to handle promises, making asynchronous code easier to write and read.

Signup and view all the flashcards

Virtual DOM

React is fast because it uses a copy of the webpage in memory to minimize direct changes to the actual webpage.

Signup and view all the flashcards

React Hooks

Hooks enable functional components to use state and other React features, previously only available in class components.

Signup and view all the flashcards

REST API vs. GraphQL

REST API uses fixed URLs, while GraphQL allows clients to request specific data, offering more flexibility.

Signup and view all the flashcards

Middleware

Middleware functions execute between a request and the final response in backend development, handling tasks like logging or authentication.

Signup and view all the flashcards

Prevent SQL Injection

Prepared statements and escaping input data are used. ORM frameworks.

Signup and view all the flashcards

SQL vs. NoSQL

SQL databases use tables and relationships, while NoSQL databases store data in JSON-like documents.

Signup and view all the flashcards

Database Indexing

An index improves database performance by helping to locate data faster, similar to a table of contents in a book.

Signup and view all the flashcards

When to use Flexbox?

Best for one-dimensional layouts (row or column).

Signup and view all the flashcards

When to use CSS Grid?

Better for two-dimensional layouts (rows and columns).

Signup and view all the flashcards

Optimize website performance

Minimize files, lazy load, optimize images, use caching.

Signup and view all the flashcards

React's Virtual DOM

Updates only changed UI parts, avoiding full re-renders.

Signup and view all the flashcards

Synchronous Programming

Runs step by step.

Signup and view all the flashcards

Asynchronous Programming

Code can run in parallel.

Signup and view all the flashcards

REST vs. GraphQL

Sends multiple requests, GraphQL fetches all data in one request.

Signup and view all the flashcards

JWT (JSON Web Token)

A secure token to verify users without storing session data on the server.

Signup and view all the flashcards

Microservices

Breaks an app into smaller, independent services.

Signup and view all the flashcards

Error Handling

Using try-catch, logging, and meaningful error messages.

Signup and view all the flashcards

Relational vs. Non-Relational Databases

SQL (structured) vs. NoSQL (flexible).

Signup and view all the flashcards

Database Transactions

Ensures all operations succeed or fail together.

Signup and view all the flashcards

Optimize Database Query

Using indexing, avoiding '*' in columns, optimize queries.

Signup and view all the flashcards

CORS (Cross-Origin Resource Sharing)

Checks if a web app can access resources needed from another domain.

Signup and view all the flashcards

Pseudo-classes vs. Pseudo-elements

Pseudo-classes style elements based on their state (e.g., :hover), while pseudo-elements style specific parts of an element (e.g., ::before).

Signup and view all the flashcards

Key ES6 Features

ES6 introduced features like let, const, arrow functions, template literals, and modules.

Signup and view all the flashcards

Web Components

Web components are reusable UI elements built with custom elements, shadow DOM, and templates.

Signup and view all the flashcards

Browser Compatibility

Using feature detection (Modernizr), polyfills, and CSS prefixes.

Signup and view all the flashcards

Lazy Loading

Lazy loading loads images or resources only when needed, improving page performance.

Signup and view all the flashcards

MVC vs. MVVM

MVC separates data, UI, and logic; MVVM enhances UI handling with data binding.

Signup and view all the flashcards

RESTful API

REST APIs use HTTP methods (GET, POST, PUT, DELETE) to communicate between a client and a server.

Signup and view all the flashcards

Study Notes

  • The document contains common interview questions and answers, separated into frontend, backend, full stack development, database management, API and third-party integration, debugging, testing, optimization, and collaboration best practices.

The Box Model in CSS

  • The box model contains four layers for webpage elements: content, padding, border, and margin.
  • Content is the actual text or image inside of the element.
  • Padding is the space around the content.
  • Border is a line surrounding the padding.
  • Margin is the space outside the border to separate elements.
  • The box model is important because it helps in designing layouts by controlling element spacing and size.

Semantic HTML Tags

  • Semantic tags clearly describe the purpose of elements.
  • <header> is used for the top section of a page.
  • <article> represents an independent piece of content.
  • <footer> is used for the bottom section of a page.
  • Semantic tags improve SEO, make code easier to read, and help screen readers understand the page.

Website Loading Speed Optimization

  • Minimize file sizes of images, CSS, and JavaScript to improve loading speed.
  • A CDN (content delivery network) loads files from servers close to users.
  • Caching involves storing files locally in the browser to avoid reloading them.
  • Lazy loading involves loading images only when needed.

Event Delegation in JavaScript

  • Instead of adding an event to every button, add a single event to their parent.
  • Event delegation improves performance.
  • Handles dynamic elements (new buttons added later still work).

Closures in JavaScript

  • A closure is when a function remembers the variables from its parent function even after the parent function is gone.
  • Closures keep data private, like a secure counter.
  • Closures also save memory.

Asynchronous Operations in JavaScript

  • Callbacks are a function inside another function.
  • Promises (.then()) wait for the task to complete.
  • Async/await is a cleaner way to handle promises.

React vs. Angular vs. Vue

  • React uses Virtual DOM and is component-based
  • Angular is a complete framework supporting two-way data binding, used by large companies
  • Vue is lightweight, simple, and good for small projects.

React's Virtual DOM

  • The Virtual DOM is like a copy of the real webpage
  • React updates this copy first and then changes only the necessary parts in the real DOM.
  • Using the virtual DOM makes updates faster, and reduces unnecessary re-rendering.

Hooks in React

  • Hooks let one use state and other features without writing class components.
  • useState() stores and updates values.
  • useEffect() runs code when the component updates.

REST API vs GraphQL

  • REST API uses fixed URLs.
  • GraphQL lets the client ask for exactly the data it needs.

Middleware in Backend Development

  • Middleware is a function that runs between the request and the final response.
  • Middleware is used for logging requests.
  • Middleware is used for checking if a user is logged in before allowing access.

Preventing SQL Injection

  • Use prepared statements instead of inserting user input directly.
  • Escape input data (sanitize values).
  • Use ORM frameworks, like Sequelize in Node.js.

SQL vs. NoSQL Databases

  • SQL uses tables and relationships.
  • NoSQL stores data in JSON-like documents.

Database Indexing

  • An index is like a table of contents for a book and helps find data faster.
  • Without an index, the database searches all rows, which is slow.

The MVC Architecture

  • Separates a web app into Model, View, and Controller.
  • Model handles data (database).
  • View displays data (UI).
  • Controller processes user input and updates Model & View.

Role of a Web Server

  • A web server like Apache or Nginx receives user requests and sends back the correct webpage or data.

Deploying a Web App on AWS or Azure

  • Setup a server (EC2 on AWS).
  • Upload code (via Git, FTP).
  • Setup a database (like MySQL or MongoDB).
  • Configure security (firewalls, HTTPS).

Optimizing a Full-Stack Application

  • Use caching to reduce database queries.
  • Minify and compress files for faster loading.

Using a CDN

  • A CDN can be used to serve static files.

Common Git Workflows

  • Feature branching involves each feature having its own branch.
  • Git Flow uses main, develop, feature, and release branches.

Handling Git Conflicts

  • Use git diff to see changes.
  • Manually edit conflicting files.
  • Use git rebase or git merge.

Microservices vs. Monolithic Architecture

  • Microservices breaks the application into small, independent services.
  • Monolithic, the whole application is one big unit.

Docker Containers

  • Docker creates lightweight, isolated environments to run applications.

OAuth Authentication

  • OAuth lets users log in with Google, Facebook, etc., instead of creating new accounts.
  • Users authorize the app to access their data.
  • The app gets an access token to make API calls.

Web Security Vulnerabilities

  • SQL Injection injects harmful code into databases.
  • Cross-Site Scripting (XSS) injects JavaScript into web pages.
  • CSRF (Cross-Site Request Forgery) tricks users into performing actions.
  • Preventing vulnerabilities involves validating input.
  • Use HTTPS
  • Sanitize user data

HTML Element Types

  • Inline elements take up only as much space as needed, e.g., <span>.
  • Block elements take the full width of the container, e.g., <div>.
  • Inline-block elements behave like inline elements but allow setting width and height.

CSS Flexbox vs Grid

  • Flexbox is best for one-dimensional layouts (either row or column).
  • Grid is better for two-dimensional layouts (both rows and columns).

Optimizing Website Performance

  • Minimize CSS and JavaScript files, use lazy loading, optimize images, and use caching.

React vs. Angular vs Vue

  • React is a lightweight UI library.
  • Angular is a full-fledged framework with built-in features.
  • Vue.js is easy to learn and combines React's and Angular's best features.

React's Virtual DOM Performance

  • The Virtual DOM improves performance by updating only the changed parts of the UI instead of re-rendering the whole page.

React Hooks

  • Hooks allow using state and lifecycle features in functional components with useState, useEffect.

React State Management

  • Application state can be managed with useState, and libraries like Redux for global state.

Angular's Two-Way Data Binding

  • It automatically updates the UI when the data changes and vice versa.

Lifecycle Methods in React and Angular

  • Lifecycle methods control the component's behavior at different stages, like mounting, updating, and unmounting.

Frontend Form Validation

  • Form validation is done using JavaScript validation methods or libraries like Formik in React.

Synchronous vs. Asynchronous Programming

  • Synchronous code runs step by step, while asynchronous code can run in parallel.

Advantages of Node.js for Backend

  • Is used for developing fast, non-blocking, and it is great for real-time applications.

RESTful APIs vs. GraphQL

  • REST sends multiple requests for different data, while GraphQL fetches all needed data in one request.

Middleware in Express.js

  • Middleware functions process requests before they reach the final handler.

Backend Authentication

  • Authentication is done using login credentials, sessions, or tokens like JWT.

JWT (JSON Web Token)

  • JWT is a secure token that helps verify users without storing sessions.

Microservices vs. Monolithic Architectures

  • Microservices break an app into smaller services, while monolithic apps are built as a single unit.

Error Handling in Backend

  • Application errors can be handled using try-catch blocks, logging errors, and returning meaningful error messages.

Relational vs. Non-Relational Databases

  • Relational databases (SQL) store structured data, while non-relational databases (NoSQL) store flexible data.

Indexing Database Performance

  • Database indexing speeds up search queries by creating a quick lookup structure.

Transactions in Databases

  • A transaction is a sequence of operations that must succeed together or fail together.

Optimizing Database Performance

  • Indexing, avoiding unnecessary columns, and optimizing SQL queries, optimize database performance.

Making API Calls

  • API calls are made Using fetch() or built-in browser APIs.

CORS (Cross-Origin Resource Sharing)

  • CORS allows a web app to access resources from a different domain.

Third-Party Authentication

  • The OAuth authentication and APIs like Firebase Auth, authenticate through third-party apps.

WebSockets vs REST APIs

  • WebSockets allow real-time communication, unlike REST, which sends requests and responses.

Debugging JavaScript

  • Debug most efficiently using console.log(), browser dev tools, and breakpoints.

Testing Types

  • Unit tests check small pieces of code, integration tests check multiple components, and end-to-end tests check the full system.

Testing Tools

  • Jest, Mocha, Cypress, and Selenium are used for testing.

API Endpoint Testing

  • Using Postman or automated tools like Jest and Supertest.

Memory Leaks in JavaScript

  • Memory Leaks happen when unused memory isn't released.
  • Prevent Memory Leaks by clearing event listeners and variables.

Optimizing Web Application Speed

  • Compress files, optimize images, use caching, and reduce HTTP requests.

Version Control with Git

  • Using commands like git init, git add, git commit, and git push.

Git Merge vs. Rebase

  • Merge combines changes with a new commit, while rebase moves changes onto another branch.

Resolving Merge Conflicts

  • Resolve merge conflicts, by manually choosing which changes to keep and committing them.

Agile and Scrum

  • Agile is a flexible development approach, and Scrum is a framework for managing Agile projects.

Ensuring Web Application Security

  • Web application security is ensured Using HTTPS, validating user input, and preventing SQL injections and XSS attacks.

Improving Code Maintainability

  • Code maintainability is improved by writing clean, well-documented code and following coding standards.

localStorage vs sessionStorage vs cookies

  • localStorage stores data permanently.
  • sessionStorage clears data when the session ends.
  • Cookies send data with every request.

Making a Website Responsive

  • Use media queries, flexible layouts, and CSS frameworks like Bootstrap or Tailwind.

Position Types in CSS

  • relative moves the element from its normal position.
  • absolute positions it relative to the nearest ancestor.
  • fixed keeps it in place on the screen.

CSS Pseudo-Classes vs Pseudo-Elements

  • Pseudo-classes style elements based on state (e.g., :hover).
  • Pseudo-elements style specific parts of an element (e.g., ::before).

ES5 vs ES6 in JavaScript

  • ES6 introduced features like let, const, arrow functions, template literals, and modules.

Event Delegation in JavaScript

  • Allows handling events at a parent level instead of adding event listeners to individual child elements.

Web Components

  • Web components are reusable Ul elements built with custom elements, shadow DOM, and templates.

Handling Browser Compatibility Issues

  • Using feature detection (Modernizr), polyfills, and CSS prefixes.

Lazy Loading

  • It loads images or resources only when needed, improving page performance.

MVC vs. MVVM Architecture

  • MVC separates data, UI, and logic.
  • MVVM enhances Ul handling with data binding.

RESTful API

  • it follows HTTP methods (GET, POST, PUT, DELETE) to communicate between a client and a server.

NoSQL vs. SQL Databases

  • SQL databases use structured tables.
  • NoSQL databases store flexible JSON-like data.

ORM (Object-Relational Mapping)

  • Allows interacting with databases using code instead of SQL.

Key Differences Between Python and PHP

  • Python is more readable and widely used in Al
  • PHP is specialized for web applications.

Cron Job

  • A cron job is a scheduled task that runs at specific intervals, like sending emails or cleaning up databases.

Rate Limiting

  • Controls the number of API requests a user can make, using tools like express-rate-limit in Node.js.

Handling File Uploads

  • Using Multer in Node.js, Django FileField in Python, or move_uploaded_file() in PHP.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Untitled
110 questions

Untitled

ComfortingAquamarine avatar
ComfortingAquamarine
Untitled Quiz
6 questions

Untitled Quiz

AdoredHealing avatar
AdoredHealing
Untitled
44 questions

Untitled

ExaltingAndradite avatar
ExaltingAndradite
Untitled Quiz
18 questions

Untitled Quiz

RighteousIguana avatar
RighteousIguana
Use Quizgecko on...
Browser
Browser