MERN Stack
1. What is MERN Stack?
Answer:
MERN Stack is a popular full-stack JavaScript technology used for web development. It includes MongoDB, Express.js, React.js, and Node.js. Developers use MERN Stack to build fast, scalable, and dynamic web applications using a single programming language called JavaScript.
2. What is MongoDB?
Answer:
MongoDB is a NoSQL database used to store data in JSON-like documents. It is flexible and handles large amounts of unstructured data efficiently. MongoDB is widely used in modern web applications because of its scalability and speed.
3. What is Express.js?
Answer:
Express.js is a lightweight backend framework built on top of Node.js. It helps developers create APIs, routes, and server-side applications easily. Express.js simplifies backend development and improves application structure.
4. What is React.js?
Answer:
React.js is a JavaScript library used for building user interfaces. It creates reusable components and updates webpages without refreshing the browser. React improves website performance and user experience.
5. What is Node.js?
Answer:
Node.js is a JavaScript runtime environment that runs JavaScript outside the browser. It is mainly used for backend development and API creation. Node.js is fast and supports asynchronous programming.
6. What is Middleware in Express.js?
Answer:
Middleware is a function that works between the request and response cycle in Express.js. It processes requests before sending responses to users. Middleware is commonly used for authentication, logging, and error handling.
7. What is REST API?
Answer:
REST API is a communication system used between frontend and backend applications. It uses HTTP methods like GET, POST, PUT, and DELETE for data operations. REST APIs help applications exchange data efficiently.
8. What is JSX in React?
Answer:
JSX stands for JavaScript XML and is used in React applications. It allows developers to write HTML-like code inside JavaScript. JSX improves readability and makes UI development easier.
9. What are some features of MongoDB?
- Indexing: It offers support for generic secondary indexes and delivers distinctive capabilities for unique, compound, geospatial, and full-text indexing.
- Aggregation: It furnishes an aggregation framework founded on the concept of data processing pipelines.
- Special collection and index types: It includes support for time-to-live (TTL) collections, allowing data that should expire at a specific time to be managed effectively.
- File storage: It offers a user-friendly protocol for storing extensive files and their corresponding metadata.
- Sharding: Sharding involves the segmentation of data across multiple machines.
10. What is State in React?
Answer:
State is an object used to store dynamic data in React components. When the state changes, React automatically updates the user interface. State helps create interactive web applications.
11. List the abbreviation of MERN ?
Answer:
MERN in abbreviated form is:
- M → MongoDB
A NoSQL database used to store application data. - E → Express.js
A backend web framework used with Node.js to build APIs and server-side applications. - R → React.js
A frontend JavaScript library used to create interactive user interfaces. - N → Node.js
A JavaScript runtime environment used to run JavaScript on the server.
12. What is Virtual DOM?
Answer:
Virtual DOM is a lightweight copy of the real DOM used internally by React. It updates only changed elements instead of reloading the full page. This improves website speed and performance.
13. What is useEffect Hook?
Answer:
useEffect is a React Hook used to handle side effects in functional components. It is mainly used for API calls, timers, and data fetching. useEffect runs after component rendering.
14. What is CRUD Operation?
Answer:
CRUD stands for Create, Read, Update, and Delete. These are the basic operations performed on databases. CRUD operations are essential in most web applications.
15. What is Mongoose?
Answer:
Mongoose is an ODM library used with MongoDB and Node.js. It helps developers manage database operations using schemas and models. Mongoose also supports data validation.
16. What is Authentication?
Answer:
Authentication is the process of verifying a user's identity in an application. It protects applications from unauthorized access. Login systems commonly use authentication methods.
17. What is JWT?
Answer:
JWT stands for JSON Web Token and is used for secure authentication. It transfers user information safely between client and server. JWT is commonly used in MERN Stack applications.
18. What is Routing in React?
Answer:
Routing in React allows navigation between different pages without reloading the website. It is mainly handled using React Router. Routing improves user experience in single-page applications.
19. What is CORS?
Answer:
CORS stands for Cross-Origin Resource Sharing. It allows frontend and backend applications running on different domains or ports to communicate securely. CORS helps solve cross-origin request issues.
20. What is npm?
Answer:
npm stands for Node Package Manager. It is used to install and manage JavaScript packages and libraries. npm helps developers save time using ready-made tools and frameworks.