Web Computing Viva Questions
Web Computing Viva Questions
in
Web Computing Viva Question
Answers
tly
ub
Created By Doubtly.in
https://www.doubtly.in/blog/web-computing-viva-questions-and-answers-semester-5-mumbai-universi
do
ty/
https://www.doubtly.in/tag/web+computing
w.
https://www.doubtly.in/tag/viva+questions
https://www.doubtly.in/blog/category/viva-questions/
w
w
Module 1: Web Programming Fundamentals
1. What is the role of a web browser in web programming?
A web browser is a software application that retrieves and displays web content. It interprets HTML,
CSS, and JavaScript to render web pages.
HTTP (Hypertext Transfer Protocol) is not secure, while HTTPS (Hypertext Transfer Protocol Secure)
is secure. HTTPS encrypts data for secure communication.
.in
3. What is DNS, and how does it work in the context of web programming?
DNS (Domain Name System) is a system that translates domain names (e.g., www.example.com)
into IP addresses. It's essential for locating web servers on the internet.
tly
4. What is TLS, and why is it important in web programming?
TLS (Transport Layer Security) is a protocol that ensures secure communication over the internet. It
encrypts data to protect it from unauthorized access.
ub
5. Explain the concepts of XML and JSON in web programming.
XML (eXtensible Markup Language) and JSON (JavaScript Object Notation) are data interchange
formats used in web development to structure and exchange data.
do
6. What does DOM stand for, and how is it used in web programming?
DOM (Document Object Model) is a programming interface for web documents. It represents the
structure of a web page, allowing scripts to interact with the page's content.
w.
7. What is the difference between URL and URI in the context of web programming?
A URL (Uniform Resource Locator) is a specific type of URI (Uniform Resource Identifier) that
identifies the location of a resource on the web. URI is a more general term.
w
9. How does HTTP work, and what is its role in web programming?
HTTP is a protocol used for transferring data between a web server and a client (e.g., a web
browser). It defines the structure of requests and responses for web communication.
11. How does a web browser interpret and render HTML and CSS in web programming?
A web browser parses HTML to create a Document Object Model (DOM) and applies CSS styles to
render a web page. The DOM structure is used to display content visually.
12. Why is URI encoding important in web programming, and how is it achieved?
URI encoding is crucial for handling special characters and spaces in URIs. It's achieved by
converting characters to their respective percent-encoded representations, making URIs safe for
.in
transmission.
tly
RESTful APIs adhere to principles such as statelessness, resource-based URLs, and the use of
standard HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources.
15. How does the DNS system help users access websites in web programming?
do
The DNS system translates human-readable domain names into IP addresses, enabling users to
locate and access websites on the internet through user-friendly URLs.
Module 2: JavaScript
w.
JavaScript language constructs are the basic building blocks of the language and include variables,
w
data types, operators, and control structures (e.g., conditionals and loops).
JavaScript has built-in objects, browser objects, and DOM objects. Built-in objects are part of the
core language, while browser and DOM objects allow interaction with the web page and the
Document Object Model.
Event handling in JavaScript allows you to respond to user actions on a web page, such as clicks
and keyboard input. You can use event listeners to execute functions in response to events.
5. What are ES5 and ES6 in JavaScript, and how do they differ?
ES5 and ES6 are different versions of the ECMAScript standard for JavaScript. ES6 introduced new
features like arrow functions, classes, and let/const for variable declaration, making the language
more powerful and readable.
Variables in JavaScript are used to store and manage data. They can hold different types of data,
.in
and their scope can be global or local, depending on how they are declared.
tly
Conditions (if statements, switch) are used to make decisions in JavaScript, while loops (for, while)
allow you to execute code repeatedly based on a condition.
8. What are arrow functions, and how do they differ from regular functions in JavaScript?
ub
Arrow functions are a concise way to write functions in JavaScript. They have a shorter syntax and a
different behavior with respect to the "this" keyword compared to regular functions.
You can manipulate CSS styles in JavaScript by accessing the "style" property of HTML elements
and modifying their CSS properties. This allows dynamic styling of web elements.
DOM manipulation involves changing the content or structure of a web page using JavaScript. It
allows you to add, modify, or remove elements from the Document Object Model (DOM).
JavaScript introduced class syntax to create objects and support inheritance. Classes provide a
blueprint for object creation, and inheritance allows objects to inherit properties and methods from
w
other objects.
Iterators and generators are features that make it easier to work with collections of data in
JavaScript. Iterators allow you to loop through data, while generators provide a way to create
iterators with less boilerplate code.
JavaScript can make network requests to servers using methods like Fetch, which enables
client-server communication. This is crucial for retrieving data from a server or sending data to it.
.in
You can install React using npm or yarn and set up a project using create-react-app. This generates
a project with the necessary files and dependencies.
tly
Common libraries in React development include React Router for routing, Axios for HTTP requests,
and Redux for state management.
ub
3. Describe the typical folder and file structure in a React project.
A standard React project structure includes folders for components, styles, assets, and pages. It also
has configuration files like package.json and webpack.config.js.
do
A React component is a reusable, self-contained piece of UI. Components can be composed to build
complex UIs, making development more modular and maintainable.
w.
The component lifecycle in React consists of three phases: Mounting, Updating, and Unmounting.
These phases provide hooks for performing actions at different points in a component's existence.
w
6. What are state and props in React, and how do they differ?
w
State is used for managing internal component data, while props are used to pass data from a parent
component to a child component. Props are read-only, while state is mutable.
React Router is a library that enables navigation and routing in SPAs. It allows you to define routes,
linking URLs to specific components, and rendering them dynamically without full page reloads.
In React, you can create forms by handling form events and managing form data. Controlled
components are React components that have their value controlled by React, while uncontrolled
components rely on the DOM to manage values.
You can handle events in React by attaching event handlers to elements and specifying functions to
be executed when the events occur. Common events include onClick, onChange, and onSubmit.
11. What are some common techniques for implementing animations in React applications?
.in
Animations in React can be achieved using CSS transitions, libraries like React Spring or React
Transition Group, and by directly manipulating the DOM elements using JavaScript animations.
tly
12. What are some best practices for React development?
Best practices in React development include component reusability, following a consistent folder
structure, using functional components when possible, and managing state and side effects carefully
to maintain a clean codebase.
ub
Module 4: Node.js
1. How do you set up the Node.js environment on your machine?
do
You can set up Node.js by downloading the installer from the official website and following the
installation instructions for your operating system.
The first step in creating a Node.js application is to initialize a project using npm or yarn by running
"npm init" or "yarn init" in your project directory.
w
The event loop in Node.js is responsible for managing asynchronous operations. It continually
checks the message queue for pending events and executes their associated callbacks when
resources are available.
6. What is the REPL (Read-Eval-Print Loop) in Node.js, and how is it used?
The REPL is an interactive command-line tool that allows you to execute JavaScript code, line by
line. It's helpful for testing and experimenting with code in a live environment.
The Event Emitter module in Node.js provides an implementation of the observer pattern. It allows
objects to subscribe to and emit events, enabling communication and event-driven programming.
The networking module in Node.js allows you to create network servers and clients. You can build
.in
applications that communicate over protocols like HTTP, TCP, and UDP using this module.
Buffers in Node.js are used to handle binary data. They represent fixed-size chunks of memory and
tly
are commonly used for I/O operations, such as reading and writing binary data from streams or files.
10. How do streams work in Node.js, and what are their advantages?
Streams in Node.js are used for reading from or writing to I/O devices, such as files or network
ub
connections, in a memory-efficient and non-blocking manner. They help handle large data efficiently.
11. Describe the File System module in Node.js and its use cases.
The File System module in Node.js allows you to work with the file system on your server or local
do
machine. It provides methods for file and directory operations, making it suitable for reading, writing,
and manipulating files.
12. How does the Web module in Node.js enable web server development?
w.
The Web module in Node.js is used for creating web servers. It provides features to handle HTTP
requests and responses, making it suitable for building web applications and RESTful APIs.
w
Module 5: Express
w
Express is a web application framework for Node.js. It simplifies the process of building web
applications and APIs by providing a set of tools and features.
Express uses middleware functions to handle requests and responses in the request-response cycle.
Middleware functions are executed sequentially, allowing for various operations like routing,
authentication, and data processing.
3. What is an Express router, and how does it help organize routes in an application?
An Express router is a mini-application within an Express application. It helps organize and define
routes and their corresponding handlers, making it easier to manage complex route structures.
Express is commonly used to build RESTful APIs by defining routes that correspond to resources. It
simplifies the creation of endpoints for various HTTP methods like GET, POST, PUT, and DELETE.
5. How can generators be used in Express applications, and what are their benefits?
Generators can be used in Express applications to handle asynchronous code more cleanly. They
help in avoiding callback hell and improving code readability. Generator-based control flow libraries
like co can be used with Express to achieve this.
.in
6. What is the significance of authentication in web applications, and how can Express
facilitate authentication?
tly
Authentication is the process of verifying the identity of users. Express can facilitate authentication by
using middleware like Passport.js, which provides various authentication strategies for applications.
7. How does Express handle user sessions, and why are sessions important in web
applications?
ub
Express can handle user sessions by using session middleware, like express-session. Sessions are
crucial for maintaining user state and storing data between HTTP requests in stateless applications.
8. What are some common methods of integrating Express with a front-end library or
do
Express can be integrated with React by serving React apps and assets using Express, setting up
routes for API calls, and using libraries like axios for making HTTP requests between the front end
and the Express back end.
w.
URL routing in Express refers to the process of mapping specific URLs (routes) to corresponding
w
server-side actions. It allows the application to handle different HTTP requests differently based on
the URL.
w
10. How can Express handle request and response objects in route handlers?
Express route handlers receive request and response objects as arguments. These objects contain
information about the incoming request and allow you to send responses back to the client, making it
easy to handle HTTP requests.
11. What is the role of the Express application generator in project setup?
The Express application generator is a tool that helps set up the initial structure of an Express
application. It creates a project directory with the necessary files and directories to start building an
Express app.
12. How can you use route parameters in Express to create dynamic routes?
Route parameters in Express are placeholders in route patterns that match sections of the URL.
They allow you to create dynamic routes by extracting values from the URL, which can be used in
route handlers.
Refs in React provide a way to access and interact with a DOM element directly. In functional
components, you can use the `useRef` hook to create and work with refs.
.in
2. How does the `useEffect` hook work in React?
The `useEffect` hook is used for side effects in functional components. It allows you to perform tasks
like data fetching, DOM manipulation, and subscriptions in a functional component, and it runs after
tly
rendering.
4. What is the Flow architecture in React, and how does it differ from other state management
do
solutions?
Flow architecture is an approach to state management in React that encourages unidirectional data
flow. It's similar to Flux and Redux but offers a simpler and more predictable way of managing
application state.
w.
The Model-ViewController framework is a design pattern that separates an application into three
w
interconnected components: Model (data and business logic), View (user interface), and Controller
(intermediary for user input). React can be used to implement this pattern.
w
6. What is the Flux architecture, and how does it address the challenges of state management
in React?
Flux is an architectural pattern for managing data flow in React applications. It introduces
unidirectional data flow, which helps avoid complexities associated with two-way binding and ensures
predictable updates of the user interface.
7. What is Webpack, and how does it play a role in bundling a React application?
Webpack is a popular JavaScript module bundler. It's used to bundle various assets, including
JavaScript, CSS, and images, into a single bundle or multiple bundles, making them suitable for
deployment in a web application.
8. How can you use the `useRef` hook in React to work with DOM elements?
You can use the `useRef` hook to create a ref, attach it to a DOM element using the `ref` attribute,
and then access and manipulate the DOM element directly from your functional component.
9. Explain the concept of side effects in React and when to use the `useEffect` hook.
Side effects in React are operations that occur after the initial render, such as data fetching, DOM
manipulation, and subscriptions. The `useEffect` hook is used to manage these side effects in
.in
functional components.
10. What are the key advantages of using React hooks over class components?
tly
React hooks provide cleaner and more concise code, improved reusability, better separation of
concerns, and a simpler way to manage state and side effects compared to class components.
11. How does Flow architecture maintain a unidirectional data flow in React applications?
ub
Flow architecture maintains a unidirectional data flow by ensuring that changes in the Model trigger
updates to the View, and user interactions are dispatched as actions to update the Model. This
one-way flow simplifies data management and reduces bugs.
12. How does React play a role in implementing the Model-ViewController (MVC) framework?
do
React can be used to create the View component in the MVC framework, where it represents the
user interface and renders data. React components can also be used to control user interactions and
communicate with the Model component.
w.
w
w