Class Test Prep · Detailed Reference

Full Stack Development — Complete Study Guide

Unit-1 (complete) + Unit-2 (complete): Responsive Design, Media Queries, HTML5, Bootstrap, Tailwind CSS, Vue.js Directives, and React JS. Every topic explained in depth with diagrams, followed by a full question bank with model answers and comparison-style questions at the end.

UNIT 1

Full Stack Development Basics

1. What is Full Stack Development?

Full stack development is the process of designing, creating, testing, and deploying a complete web application from start to finish. It involves working with multiple layers and technologies: front-end web development (what the user sees and interacts with), back-end web development (the logic running on the server), and database development (where data is stored and retrieved).

The term describes a software engineer or developer who is comfortable working with both the front end and back end of a website or application — someone who understands, end-to-end, how every part of the system works together, not just their own slice of it.

Components of Full Stack Development
Full Stack Development
Front End
HTML · CSS · JavaScript
Back End
Django · Java · Python · Node.js · PHP
Database
MySQL · MongoDB · Oracle
Main components: Front-end, Back-end, and Database
End-to-End Workflow (e.g. a retail website)
Website
(Front End / UI)
Back-end Server
(Business Logic)
Database
Third-Party Systems
User browses / adds to cart / changes profile → UI sends request → back end applies business logic → reads/writes DB or calls external services

A retail website is a good running example: users can browse or purchase items, add/delete items from a cart, or change their profile. Every one of these actions needs a front-end UI plus business logic written in the back end — this is exactly what a full-stack developer is trained to build, end-to-end.

Key points to remember

  • Full stack = front-end + back-end + database, glued together as one working system.
  • Full-stack developers must "deeply understand how the various parts of a website or application work together" — not just write isolated code.
  • They also need to collaborate effectively on a team, since web development is usually a collaborative process.

2. What is a Full-Stack Developer, and What Do They Do?

A full-stack developer has knowledge of an entire technology stack — the complete set of technologies needed to build an end-to-end application quickly and efficiently. For example, to build an app using the MEAN stack, they must know how to work with:

M — MongoDB
A NoSQL database.
E — Express.js
A web application framework for Node.js.
A — Angular
A front-end framework by Google.

N — Node.js: server-side JavaScript runtime

Responsibilities of a full-stack developer

  • Help choose the right technologies for both front-end and back-end development/testing.
  • Write clean code across the entire stack, following best practices of each tool used.
  • Stay up to date with the latest technologies to make the best technology-usage decisions.
  • Judge, in the early phases of a project, whether the chosen technologies are the right fit.

Languages full-stack developers use

They're free to use any set of compatible languages. JavaScript is especially popular because it's one of the few languages usable on both front end and back end.

LayerCommon Languages
Front endHTML, CSS, JavaScript
Back endPython, Java, R, Ruby, Node.js, PHP

It's also common to use complete technology stacks like MEAN, MERN, Ruby on Rails, LAMP for faster, more efficient development with an easier learning curve.


3. Front-end vs Back-end vs Full-stack Developers Comparison

Applications needing higher scalability and more complex workflows require broader skill sets and team collaboration — front end may be handled by a UI team, back end by another. Full-stack developers step in where an individual is required to handle both sides of a feature.

AspectFront-end DeveloperBack-end DeveloperFull-stack Developer
Primary focusUI of the app — visual effects, frames, navigation, formsBusiness logic, security, performance, scalability, request/response handlingBoth — codes end-to-end workflows
Main concernUser experience (UX)Core application workflows / server logicComplete system, front + back
Typical techHTML, CSS, JavaScriptJavaScript, Python, Java, .NETMEAN, MERN (JS-based full stacks)
Example taskBuild the "add to cart" button and cart page layoutWrite the logic that updates the cart in the databaseBuilds both the button and the logic behind it

4. Is a Software Engineer the Same as a Full-Stack Developer? Comparison

Software EngineerFull-Stack Developer
ScopeGeneral term — engineering discipline covering all kinds of softwareA specific part of software engineering, focused on web apps
Knowledge requiredMay specialize in one module/technologyNeeds front-end and back-end knowledge to build end-to-end web apps
Working styleOften an individual contributor on a specific module at a timeWorks across the complete technology stack (front end + back end)
One-liner for the exam: Software engineering is the umbrella term; full-stack development is a specialization within it that requires both front-end and back-end competency.

5. Advantages and Disadvantages of Full Stack Development

Advantages
  • Complete ownership and understanding of the project
  • Saves project time and cost; enhances productivity
  • Faster bug fixing (knowledge of the complete system)
  • Easy knowledge transfer to other team members
  • Better division of work among team members
  • Can build a professional website from scratch for an employer
  • Competent member of cross-functional Agile teams (both front + back end)
  • Can start own web design/development business
  • Can build and monetize own websites (AdSense, affiliate marketing, products)
Disadvantages
  • The chosen technology solution can be wrong for the project
  • Outcome is heavily dependent on developer skill
  • Creates key-person risk (over-reliance on one person)
  • Being a full-stack developer is increasingly complex as tech grows

6. 3-Tier Architecture ⭐

In a 3-tier application, code for each area of responsibility is cleanly split into three separate layers/tiers.

3-Tier Architecture
Web Browser
Presentation Logic
(HTML)
Business Logic
Data Access Logic
(DML)
Database
Presentation → Business → Data Access → Database (each layer talks only to its immediate neighbour)
Request / Response Cycle
User
REQUEST →← RESPONSE
Presentation
Layer
REQUEST →← RESPONSE
Business
Layer
REQUEST →← RESPONSE
Data Access
Layer
Database

Important note: the presentation layer has no direct communication with the data access layer — it can only talk to the business layer. Also, you should not assume the whole app is built from just one component per layer:

  • A separate component should exist in the Presentation layer for each user transaction.
  • A separate component should exist in the Business layer for each business entity (database table).
  • A separate component should exist in the Data Access layer for each supported DBMS.

Because of this structure, you can swap one layer's component without touching the others: change the UI to output HTML, PDF, or CSV; change the data access component to switch between MySQL, Oracle, or SQL Server; or update business rules — all independently. This also gives reusability: one Business-layer component can be shared by several Presentation-layer components.

The Rules of 3-Tier Architecture ⭐ (frequently asked)

  1. Code for each layer must be in separate files, maintainable separately (possibly by separate teams).
  2. Each layer may contain only the logic that belongs to it — business logic only in Business layer, presentation logic only in Presentation layer, data access logic only in Data Access layer.
  3. Presentation layer can only receive requests from / return responses to an outside agent (usually a person, sometimes another piece of software).
  4. Presentation layer can only send requests to / receive responses from the Business layer — it cannot directly access the database or Data Access layer.
  5. Business layer can only receive requests from / return responses to the Presentation layer.
  6. Business layer can only send requests to / receive responses from the Data Access layer — it cannot access the database directly.
  7. Data Access layer can only receive requests from / return responses to the Business layer — it cannot issue requests to anything except the DBMS it supports.
  8. Each layer must be totally unaware of the inner workings of the other layers (database-agnostic, presentation-agnostic).

Skills required per layer

LayerSkills Needed
Presentation layerHTML, CSS, possibly JavaScript, plus UI design
Business layerA programming language, so business rules can be processed by a computer
Data Access layerSQL — Data Definition Language (DDL) and Data Manipulation Language (DML), plus database design
Why layers matter: a single person can have all these skills, but such people are rare. In large organisations, splitting into layers lets each be developed/maintained by a different specialist team.

7. Popular Web Development Stacks

Different stacks exist to handle different tasks in web app development and operations.

1. LAMP Stack

Linux (OS) + Apache (Web Server) + MySQL (Database) + PHP (Language). One of the first open-source stacks; efficiently handles dynamic pages. Components are swappable (Windows→WAMP, macOS→MAMP; PHP can be swapped for Perl/Python). Used by: Wikipedia, Yahoo, Etsy, Shopify, WordPress, Magento.

2. MEAN Stack

MongoDB + Express.js + Angular + Node.js. An end-to-end JavaScript stack — a single language across the whole stack, enabling code reuse. All components are free/open-source, ideal for cloud hosting (flexible, scalable, extensible), and the database scales on demand. Used by: Google, Microsoft, IBM, Amazon, Uber, PayPal, LinkedIn.

3. MERN Stack

Same as MEAN but Angular → React. React is popular for building high-end, single-page apps with interactive UI, uses JSX and a Virtual DOM. React is a library, not a framework, so developers may need third-party services for extra functionality. Used by: Meta, Tesla, GoDaddy, Walmart, Shutterfly, Under Armour, Accenture, Philips, Airbnb, Netflix, Mozilla.

4. Ruby on Rails (RoR)

Server-side web framework written in Ruby, MIT-licensed. Follows the MVC (model-view-controller) pattern, offers seamless DB table creation, migrations, scaffolding of views for rapid development. Encourages JSON/XML for data transfer, HTML/CSS/JS for UI. Used by: SlideShare, Airbnb, CrunchBase, Bloomberg, Dribble, Shopify, GitHub.

5. .NET Stack

Open-source developer platform (tools, languages, libraries) for scalable, high-performing desktop/web/mobile apps that run natively across OSes (Linux, macOS, Windows, iOS, Android). Supported languages: C#, F#, Visual Basic. Known for ease of development, code reusability, strong built-in security.

6. Python-Django Stack

Django is a high-level Python web framework encouraging rapid development with a clean, pragmatic design. Often combined with Apache + MySQL for server-side dev. Supports low-code development and can handle rising traffic/API load.

7. Flutter Stack (mobile)

Open-source Google framework for building multi-platform apps from a single codebase, powered by the Dart language. Can pair with Firebase on the back end for scalability.

8. React Native Stack

JavaScript framework (based on React) for building native iOS and Android apps, written with a mix of JS and XML markup. Renders using real mobile UI components (so apps look truly native) and allows up to 100% code reuse across platforms.

9. Java Enterprise Edition (Java EE)

Enterprise platform with features like distributed computing and web services, run on application/microservers. De-facto standard for secure, robust, portable multi-platform apps/services — ideal for e-commerce, accounting, banking systems.

10. Serverless Stack

Lets developers focus purely on application code instead of infrastructure. Leverages Functions-as-a-Service (FaaS) like AWS Lambda, Google Cloud Functions, Azure Functions. Highly cost-effective (pay only for what you use) and auto-scales during traffic spikes.

StackCore ComponentsNotable Companies
LAMPLinux, Apache, MySQL, PHPWikipedia, WordPress, Shopify
MEANMongoDB, Express, Angular, NodeGoogle, IBM, PayPal, LinkedIn
MERNMongoDB, Express, React, NodeMeta, Netflix, Airbnb, Tesla
Ruby on RailsRuby (MVC)GitHub, Airbnb, Bloomberg
.NETC#/F#/VB, cross-platformEnterprise apps
DjangoPython + DjangoRapid dev, low-code
FlutterDart + FirebaseCross-platform mobile
React NativeJS + XMLNative mobile apps
Java EEEnterprise JavaBanking, e-commerce
ServerlessAWS Lambda / Azure / GCP FunctionsFaaS, pay-per-use

8. JSON and its Usage in Web Applications

JSON (JavaScript Object Notation) is an open standard, lightweight, text-based format designed explicitly for human-readable data interchange. It is language-independent — supported by almost every programming language, framework, and library.

  • Data is represented as key-value pairs.
  • Curly braces { } hold objects; a colon separates each key from its value; commas separate pairs.
  • Square brackets [ ] hold arrays; values are comma-separated.

Key facts

  • JSON stands for JavaScript Object Notation
  • Open standard data-interchange format
  • Lightweight and self-describing
  • Originated from JavaScript
  • Easy to read and write
  • Language independent
  • Supports data structures — arrays and objects

Features of JSON

Simplicity Openness Self-Describing Internationalization Extensibility Interoperability

Why use JSON? (JSON vs XML) Comparison

AspectJSONXML
VerbosityLess verbose, compact, readableMore verbose, tag-heavy
Parsing speedFaster — needs less data/memorySlower — DOM manipulation needs more memory for large files
ReadabilityEasily readable and straightforward; maps to domain objects easilyComparatively harder to map
Data structureMap data structure (key-value)Tree structure
Main useSerializing & transmitting data between server and web appDocument markup, config, legacy enterprise systems
How JSON is used (Weather App Example)
Browser
Request →← JSON Response
Web Server
Browser requests data → server responds with JSON → browser renders it as a human-readable page

JSON Data Types

TypeDescriptionExample
StringAlways in double quotes; letters, numbers, special chars"student", "1234"
NumberNumeric characters121, 899
Booleantrue or falsetrue
NullEmpty valuenull

JSON Object

{"name" : "Jack", "employeeid" : 001, "present" : false}

JSON Array of Objects

{"employees":[
 {"name":"Ram", "email":"ram@gmail.com", "age":23},
 {"name":"Shyam", "email":"shyam23@gmail.com", "age":28}
]}

JSON Multidimensional Array

[
 [ "a", "b", "c" ],
 [ "m", "n", "o" ],
 [ "x", "y", "z" ]
]

JSON Comments

JSON does not officially support comments (it is not part of the standard). A common workaround is adding an extra attribute, e.g. "comments": "He is a nice man", which is simply treated as a normal key by parsers.


9. REST APIs ⭐⭐

A. Understanding REpresentational State Transfer (REST)

REST is an architectural style providing standards between computer systems on the web, making it easier for systems to communicate. RESTful systems are stateless and separate the concerns of client and server.

REST API — High-level Flow
Database
Web Server
RESTful API
Your App / Website

B. Main Constraints of a RESTful API

  1. Separation of Client and Server — client and server implementations are independent; neither needs to know how the other works internally, as long as they agree on the message format. This improves flexibility across platforms, improves scalability (system's ability to handle growing users/transactions/data), and lets each side evolve independently. Different clients hitting the same REST endpoint get the same actions and responses.
  2. Statelessness — the server does not need to know the client's state, and vice versa. Every message can be understood on its own, without needing to see previous messages. Enforced through the use of resources (nouns of the web — objects/documents/things) rather than commands.
  3. Cacheability — server responses explicitly indicate whether they're cacheable, letting clients cache responses and reduce repeated requests, improving performance.
  4. Uniform Interface — broken into 4 sub-constraints:
    • Identification of Resources — resources identified by unique URIs.
    • Resource Manipulation through Representations — clients interact with representations (XML/JSON), not the resource itself.
    • Self-Descriptive Messages — each message includes all information needed to process it (e.g. media type).
    • HATEOAS (Hypermedia As The Engine Of Application State) — server provides hypermedia links guiding the client to related resources.

C. Communication Between Client and Server

Making Requests — a request generally consists of:

  1. An HTTP verb — defines the type of operation
  2. A header — passes info about the request (e.g. Accept field)
  3. A path to a resource
  4. An optional message body with data

HTTP Verbs

VerbPurposeSuccess Response
GETRetrieve a specific resource (by id) or collection200 (OK)
POSTCreate a new resource201 (CREATED)
PUTUpdate a specific resource (by id)200 (OK)
DELETERemove a specific resource by id204 (NO CONTENT)

Headers & Accept parameters (MIME types)

The client's request header includes an Accept field specifying content types it can receive, so the server doesn't send unusable data. MIME types = type/subtype.

TypeExample subtypes
texttext/html, text/css, text/plain
imageimage/png, image/jpeg, image/gif
audioaudio/wav, audio/mpeg
videovideo/mp4, video/ogg
applicationapplication/json, application/pdf, application/xml, application/octet-stream
GET /articles/23
Accept: text/html, application/xhtml

Paths

Requests must contain a path to the resource. Conventionally the first part of the path is the plural form of the resource, keeping nested paths simple, e.g.:

fashionboutique.com/customers/223/orders/12

— order 12 belonging to customer 223. A POST to /customers (collection) needs no id (server generates it); GET/DELETE on a single resource needs :id appended.

Sending Responses — Content Types

When the server sends data back, it must include a Content-Type header describing the payload — this should be one of the types the client listed in its Accept field.

GET /articles/23 HTTP/1.1
Accept: text/html, application/xhtml

--- server responds ---
HTTP/1.1 200 (OK)
Content-Type: text/html

Response / Status Codes ⭐

CodeMeaning
200 (OK)Standard response for a successful HTTP request
201 (CREATED)Standard response when an item was successfully created
204 (NO CONTENT)Successful request, nothing returned in the response body
400 (BAD REQUEST)Bad request syntax, excessive size, or other client error
403 (FORBIDDEN)Client does not have permission to access this resource
404 (NOT FOUND)Resource could not be found (deleted or doesn't exist)
500 (INTERNAL SERVER ERROR)Generic failure response with no more specific info available
Rule of thumb: if an operation fails, return the most specific status code possible for the problem encountered.
UNIT 2

Frontend Frameworks (up to Bootstrap)

1. Responsive Web Design

Responsive Web Design (RWD) makes web pages render correctly on various device screen sizes without cutting short or distorting content — it looks appropriate, suitable, and well-placed on desktop, tablet, and smartphone alike. It uses HTML and CSS to resize, hide, shrink, enlarge, or move content so it looks good on any screen.

A. Setting the Viewport

<meta name="viewport" content="width=device-width, initial-scale=1.0">
  • name="viewport" — this meta tag relates to viewport settings.
  • width=device-width — viewport width matches the device's screen width (responsive to device width).
  • initial-scale=1.0 — sets the initial zoom level (no zoom on load).

Without this tag, the browser renders the page at a "desktop" width and then shrinks it to fit — causing tiny, hard-to-read text. With it, the browser renders width == device width directly, avoiding the annoying zoom-in/zoom-out mobile users used to experience.

B. How to Make Images Responsive

MethodCSSBehaviour
1. width propertyimg{width:100%;}Image scales up AND down freely with the container — can become larger than its original size (can pixelate).
2. max-width property ⭐ (best/most used)img{max-width:100%; height:auto;}Image scales down if needed, but never scales up larger than its original size.
3. <picture> element<source srcset="..." media="(max-width:600px)">Swaps to a completely different image file based on browser width — different images for mobile vs desktop.
<picture>
  <source srcset="img_smallflower.jpg" media="(max-width: 600px)">
  <source srcset="img_flowers.jpg" media="(max-width: 1500px)">
  <source srcset="flowers.jpg">
  <img src="img_flowers.jpg" alt="Flowers" style="width:auto;">
</picture>

C. Responsive Text Size — the "vw" unit

vw = viewport-width. 1vw = 1% of the viewport's width. If the viewport is 100cm wide, 1vw = 1.0cm. Using vw makes font size scale directly with the browser window.

<h1 style="font-size:10vw;">Here size is 10vw.</h1>
<p style="font-size:6vw;">Here size is 6vw.</p>

2. Media Queries

Media queries are a CSS feature that let you apply styles conditionally based on the characteristics of the device/browsing environment — screen size, resolution, orientation, etc. — enabling truly responsive designs.

@media media_type and (media_feature) {
  /* CSS rules to apply when conditions are met */
}
  • @media — keyword starting a media query.
  • media_typescreen (computer screens), print (printed pages), speech (screen readers), etc.
  • media_featuremax-width, min-width, orientation, resolution, etc.
@media screen and (min-width: 600px) {
  body { background-color: #fff; }
  h1 { font-size: 2em; }
}
@media screen and (min-width: 1200px) {
  h1 { font-size: 2.5em; }
}

Breakpoints

A breakpoint is the specific value of a media feature (e.g. screen width) at which the styles inside that media query start applying. In the example above, min-width:600px and min-width:1200px are two breakpoints — the layout/style changes at those exact widths. Breakpoints are usually chosen around typical device categories: mobile, tablet, desktop — but the exact values depend on your project's design needs.


3. HTML5 Features

HTML5 significantly enhances web development with new semantic elements, improved multimedia/graphics support, real-time communication, and features like local storage and geolocation.

1. Audio & Video Tags

<video width="300" height="200" controls autoplay>
  <source src="./dog.mp4" type="video/mp4" />
</video>
<audio controls>
  <source src="dog.mp3" type="audio/mp3">
</audio>

width/height set dimensions; controls adds play/pause buttons; src provides the media URL; type specifies the media type.

2. Header

Contains introductory content — headings, logos/icons, search form, navigation, author info.

<header>
  <a href="...">Technology</a> | <a href="...">Data Science</a>
</header>

3. Footer

Defines the footer of a document/section — author, copyright, contact info, sitemap, back-to-top links. A document can have more than one footer element.

<footer>
  <p>Posted by: Deepali Sharma</p>
</footer>

4. Figure & Figcaption

Insert an image with a caption; <figcaption> describes the image.

<figure>
  <img src="red_tulips.jpg" alt="Red Tulips">
  <figcaption>Red Tulips in a Garden</figcaption>
</figure>

5. Canvas Tag

Lets you draw graphics/images on the fly using JavaScript — paths, boxes, circles, images, etc. Has two attributes: width and height.

<canvas id="Canvas1" width="400" height="100" style="border:2px solid;"></canvas>

6. Mark

Highlights a particular piece of text of special interest.

<p>Grow your skillset with <mark>Shiksha Online.</mark></p>

7. Progress Tag

Shows the progress of a task. Its value updates dynamically via JavaScript.

<progress value="55" max="100"></progress>

8. Geolocation API

A standard web API letting web apps request the user's location. Uses navigator.geolocation.getCurrentPosition(successCallback, errorCallback). Relies on a combination of GPS, Wi-Fi positioning, and cell-tower triangulation.

if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(showPosition, showError);
}
function showPosition(position) {
  var lat = position.coords.latitude;
  var lon = position.coords.longitude;
}

9. Local Storage

A simple key-value storage mechanism in the browser, accessed via JavaScript APIs. Useful for offline apps — reduces transactions with the backend server (faster app), but has limited storage space.

localStorage.setItem("userData", userInput);   // save
var storedData = localStorage.getItem("userData"); // retrieve

10. Drag and Drop API

Lets you grab a DOM element and drop it into a different location. To make an element draggable, set draggable="true".

<div id="dragElement" draggable="true" ondragstart="dragStart(event)">Drag me!</div>
<div id="dropZone" ondragover="allowDrop(event)" ondrop="drop(event)">Drop here!</div>

<script>
function dragStart(event){ event.dataTransfer.setData("text/plain", event.target.id); }
function allowDrop(event){ event.preventDefault(); }
function drop(event){
  event.preventDefault();
  var id = event.dataTransfer.getData("text/plain");
  document.getElementById("dropZone").appendChild(document.getElementById(id));
}
</script>
FunctionRole
dragStartFires on ondragstart; stores the dragged element's id via dataTransfer.setData
allowDropFires on ondragover; calls preventDefault() to permit dropping
dropFires on ondrop; retrieves the id via dataTransfer.getData, then appends the element to the drop zone

4. Bootstrap — Complete ⭐⭐⭐

What is Bootstrap?

Bootstrap is an open-source front-end framework developed by Twitter. It's a collection of HTML, CSS, and JavaScript tools/components that help developers build responsive and mobile-first web applications. It simplifies designing/styling pages via pre-built, customizable components and styles.

Key Features of Bootstrap

  1. Responsive Design — mobile-first approach; adapts from small phones to large desktops.
  2. Grid System — a responsive 12-column layout for flexible, dynamic designs.
  3. CSS Components — pre-styled navbars, buttons, forms, typography, and more.
  4. JavaScript Plugins — modals, carousels, tooltips, popovers, etc.
  5. Customization — highly customizable via source files; integrates with Sass/Less.
  6. Community & Documentation — large active community, comprehensive official docs, third-party themes.
  7. Cross-Browser Compatibility — consistent, reliable performance across browsers.

What's New in Bootstrap 5 ⭐ (very frequently asked)

#ChangeDetail
IMajor rewriteEntire framework rewritten — improved performance, modularity, code quality
IIBrand new look & feelModern, updated visual design, default styling, layout components
IIIBrand new logoRebranding effort reflecting the framework's evolution
IVNew typographyBetter readability and visual appeal across devices
VNo jQuery required anymoreNow uses plain/vanilla JavaScript — more lightweight, modern
VIDropped IE11 supportEnables modern web standards, better performance
VIINew theme colorsRefreshed color palette across components
VIIIEnhanced gridImproved flexibility & control over layout, new utility classes
IXOffcanvasHidden side menus/panels revealed on demand — better navigation UX
XOwn icon systemBuilt-in icons — no need for external icon libraries

Bootstrap 5 Installation — Two Methods Comparison

A. CDN Link (online)B. Compiled CSS file (offline)
HowAdd a <link> tag pointing to a Content Delivery Network URL in <head>Download the ZIP from getbootstrap.com, extract, host files locally, link with a relative path
Internet needed?Yes — required to load Bootstrap filesNo — works fully offline
Loading speedOften faster — served from a geographically closer serverDepends on local server, but no external network latency
Server burdenReduced — files served by CDN, not your serverReduced dependency on external servers/CDNs
Version controlAlways latest version automatically (unless pinned)Full control — you decide when to update
Security/PrivacyDepends on third-party CDN's reliabilityBetter — no external entity can tamper/intercept the file in transit
Outage riskVulnerable if the CDN goes downImmune to CDN outages
Best forQuick prototyping, production sites with reliable internetOffline apps, restricted/isolated dev environments, testing without internet
Trade-offManual effort to update versions; larger project file size
<!-- A. CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">

<!-- B. Offline (after downloading) -->
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap.css">

Bootstrap 5 Containers ⭐⭐ (core layout building block)

Containers align and contain your content within a device/viewport. They're the most fundamental layout element used with the grid system — mostly for enclosing content with padding, and centering fixed-width content horizontally.

.container → .row → .col Nesting
.container
.row
.col
.col
Container TypeClassBehaviour
Container.containerHas a maximum (fixed) width at each responsive breakpoint; centers content horizontally
Container-fluid.container-fluid100% width at all breakpoints — spans the full page width always
Responsive Container.container-{breakpoint}100% width until the specified breakpoint, then becomes fixed-width like a normal container

Breakpoint width table ⭐ (memorize)

ClassesExtra Small <576pxSmall(sm) ≥576pxMedium(md) ≥768pxLarge(lg) ≥992pxX-Large(xl) ≥1200pxXX-Large(xxl) ≥1400px
.container100%540px720px960px1140px1320px
.container-sm100%540px720px960px1140px1320px
.container-md100%100%720px960px1140px1320px
.container-lg100%100%100%960px1140px1320px
.container-xl100%100%100%100%1140px1320px
.container-xxl100%100%100%100%100%1320px
Pattern to remember: each column shows 100% until its own device size is reached, then it "locks in" to the same fixed width as .container for that breakpoint onward. .container-xxl stays fluid the longest.
<!-- container: fixed width, centered -->
<div class="container bg-info">...</div>

<!-- container-fluid: always full width -->
<div class="container-fluid bg-info">...</div>

<!-- responsive container: fluid until md breakpoint -->
<div class="container-md bg-danger">...</div>

5. Tailwind CSS

Tailwind CSS is a utility-first CSS framework that provides a set of pre-designed utility classes to build user interfaces. Unlike Bootstrap, Tailwind does not come with pre-built components (like ready navbars/buttons) — instead it offers many small, low-level utility classes that you compose yourself to create fully custom designs.

Key Features of Tailwind CSS

  1. Utility-First Approach — small, single-purpose classes for styling elements, giving more flexibility/customization.
  2. Responsive Design — built-in responsive utility classes for adapting to different screen sizes.
  3. Customization — highly configurable via a config file, or use sensible defaults.
  4. Flexibility — doesn't dictate a specific design/structure, so you can build unique layouts.
  5. Modular & Composable — utility classes combine to create complex styles, keeping stylesheets easy to manage.

Tailwind vs Bootstrap Comparison

AspectTailwind CSSBootstrap
ApproachUtility-first — compose your own design from small classesComponent-first — ready-made components (navbar, card, button)
Pre-built components?No — you build your own using utilitiesYes — pre-styled, ready to use
Design uniquenessEvery site can look completely differentSites can look similar unless heavily customized
Learning curveNeed to learn many utility class namesFaster to start — just apply component classes

Using Tailwind via CDN (Play CDN)

The Play CDN lets you try Tailwind directly in the browser without any build step — meant for development only, not recommended for production.

<head>
  <script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
  <div class="bg-blue-500 text-white p-4">
    <h1 class="text-2xl font-bold">Hello, Tailwind CSS!</h1>
    <p class="mt-2">Welcome to your webpage.</p>
  </div>
</body>

Reading Tailwind Utility Classes ⭐ (commonly tested)

ClassMeaning
bg-blue-500Background color = blue, intensity 500 (Tailwind's color-intensity scale)
text-whiteText color = white
p-4Padding on all sides, size 4 (moderate, based on Tailwind's spacing scale)
text-2xlFont size = extra-large (scale: sm, md, lg, xl, 2xl…)
mt-2Margin-top, size 2

Example — Hover Effects with Transitions

<div class="h-full border-2 border-gray-200 border-opacity-60 rounded-lg overflow-hidden">
  <div class="p-6 hover:bg-green-600 hover:text-white transition duration-300 ease-in">
    <h1 class="text-2xl font-semibold mb-3">Hover</h1>
  </div>
</div>
ClassMeaning
h-fullHeight = 100% of parent container
border-22px border thickness
border-gray-200 border-opacity-60Gray border color at 60% opacity
rounded-lgLarge rounded corners
overflow-hiddenClips any content that overflows the box
hover:bg-green-600Background turns green only while hovering (the hover: prefix scopes the style to the hover state)
hover:text-whiteText turns white on hover
transition duration-300 ease-inAnimates the hover change smoothly over 300ms, easing in

6. Vue.js — Directives and Binding

What is Vue.js?

Vue.js (pronounced "view") is an open-source, progressive JavaScript framework used to build interactive web UIs and Single Page Applications (SPAs). "Progressive" means it offers variable degrees of complexity and flexibility — you can adopt as much or as little of it as you need.

  • Vue.js lets you extend HTML with HTML attributes called directives.
  • Directives add functionality to HTML applications.
  • Vue provides both built-in directives and support for user-defined (custom) directives.

What is a Single Page Application (SPA)?

An SPA is a web application/website providing a very fluid, reactive, fast experience similar to a desktop app. It contains a menu, buttons, and blocks all on a single page — when a user clicks something, the page is dynamically rewritten rather than loading a brand-new page from the server, which is the reason behind its fast, reactive feel.

Pre-requisites for Vue.js

Node.js ≥ 15.0 Code editor (VS Code / Notepad++ / Atom) Browser (Chrome/Firefox) Volar extension (VS Code) Vue.js devtools

Creating a Vue App — Without a Build Tool (CDN)

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<div id="app">{{ message }}</div>

<script>
  const { createApp, ref } = Vue
  createApp({
    setup() {
      const message = ref('Hello vue!')
      return { message }
    }
  }).mount('#app')
</script>

This uses the Composition API (Vue 3): createApp creates the Vue instance; setup() runs before the component is created and is where reactive state is defined; ref('Hello vue!') creates a reactive variable; returning { message } exposes it to the template; {{ message }} is template interpolation that Vue replaces with the current value; .mount('#app') attaches the Vue instance to the DOM element with id app.

Custom Directives ⭐ (practical-heavy topic)

A custom directive is defined using Vue.directive('name', { ...hooks }), then used in HTML as v-name.

Hook Functions of a Directive

HookWhen it fires
bindCalled only once, when the directive is first bound to the element — used for one-time setup
insertedCalled when the bound element is inserted into the DOM — good place for DOM manipulation
updateCalled when the bound element's value/expression changes
componentUpdatedCalled after the containing component has been updated
unbindCalled only once, when the directive is unbound/removed from the element

Practical I — Custom Directive: Uppercase Text on Click

<!-- HTML -->
<div id="app">
  <p v-uppercase>Hello, this text will be uppercased when clicked!</p>
</div>

<!-- app.js -->
Vue.directive('uppercase', {
  bind(el) {
    el.style.cursor = 'pointer';
    el.addEventListener('click', () => {
      const text = el.innerText;
      el.innerText = text.toUpperCase();
    });
  }
});
new Vue({ el: '#app' });

bind(el) runs once when the directive attaches; it sets the cursor to a pointer (visual clickability cue) and attaches a click listener that reads el.innerText, converts it with toUpperCase(), and writes it back — so a click uppercases the paragraph's text.

Practical II — Dynamic List with a Custom Directive

<!-- HTML -->
<div id="app">
  <ul v-list="items"></ul>
</div>

<!-- app.js -->
Vue.directive('list', {
  bind(el, binding) {
    const ul = document.createElement('ul');
    binding.value.forEach(item => {
      const li = document.createElement('li');
      li.textContent = item;
      ul.appendChild(li);
    });
    el.appendChild(ul);
  }
});
new Vue({
  el: '#app',
  data: { items: ['Subject-1', 'Subject-2', 'Subject-3'] }
});

binding.value gives access to the data passed into the directive (here, the items array). The directive loops over each item, builds an <li> for it, and appends all of them into a new <ul>, which is then appended to the bound element.

Practical III — Custom Directive: Human-Readable Date Formatting

<p v-format-date="date"></p>

<script>
Vue.directive('format-date', {
  inserted: function(el, binding) {
    const date = binding.value;
    el.textContent = formatDate(date);
  }
});
new Vue({
  el: '#app',
  data: { date: '2022-03-05T12:00:00' }
});
function formatDate(dateString) {
  const options = { year: 'numeric', month: 'long', day: 'numeric' };
  return new Date(dateString).toLocaleDateString('en-US', options);
}
</script>
<!-- Output: March 5, 2022 -->

This uses the inserted hook (fires once the element is in the DOM) and JavaScript's toLocaleDateString() with formatting options to convert an ISO date string into a readable format like "March 5, 2022".


7. React JS

React Introduction

ReactJS is a declarative (you tell React what you want, and React builds the actual UI), efficient, and flexible JavaScript library for building reusable UI components. It's open-source, component-based, and responsible only for the view layer of an application. Developed and maintained by Facebook (Meta); used in WhatsApp & Instagram.

A React app is made of multiple components, each responsible for outputting a small, reusable piece of HTML. Components can be nested inside other components to build complex UIs from simple building blocks. React uses a Virtual DOM-based mechanism to fill data into the HTML DOM — it works fast because it only changes the individual DOM elements that actually changed, instead of reloading the complete DOM every time.

Real DOM vs Virtual DOM ⭐ (frequently asked comparison)

AspectReal DOMVirtual DOM
What it isThe actual structure of the webpage, rendered on the browserA virtual (in-memory) representation/"blueprint" of the Real DOM
UpdatesReact updates the complete document in the Real DOM; changes reflect directly on the whole webpageReact updates state changes in the Virtual DOM first, then syncs the difference with the Real DOM (this syncing process is called reconciliation)
PerformanceSlower for repeated updates — re-rendering the whole document each time is costly; all UI components re-render on every updateFaster — only the changed/affected nodes are updated in the Real DOM, not the entire page
AnalogyThe actual machineA blueprint of the machine — you can edit the blueprint, but it isn't the machine itself until synced
Why React is faster: not because processing itself is quicker, but because it separates and updates only the small, changed elements/interactions instead of wasting time re-rendering the entire page.

Why Use ReactJS?

Main objective: build fast, performant UIs using the Virtual DOM (a JavaScript object), which is faster than manipulating the regular DOM directly. React can be used on client and server side, and with other frameworks. Traditional frameworks recreate the entire DOM on every page load/modification, wasting memory and reducing performance — React solves this by using an in-memory Virtual DOM and only pushing the actual diffs to the browser's Real DOM.

Installing React (Create React App)

npx create-react-app my-app
cd my-app
npm start

If npx create-react-app fails, run in sequence: npm initnpm install create-react-appnpx create-react-app myapp.

React Elements

Elements are the smallest building blocks of a React app. An element is a plain object describing what should appear on the UI (in terms of DOM nodes). Creating a React element is cheap compared to creating a real DOM element. Elements can be created using JSX or plain React (without JSX).

import React from 'react';
import ReactDOM from 'react-dom';

const element = <h1 className='testClass'>Hello Devendra</h1>;
ReactDOM.render(element, document.getElementById('root'));

An element has a type (here, h1) and properties (here, className). The JSX code is compiled into plain JavaScript by Babel (a JavaScript compiler that transforms JSX into browser-executable JS).

React Function Components

Components are the building blocks of any React app — they let you split the UI into independent, reusable pieces. A component is a combination of: (1) template using HTML, (2) user interactivity using JS, (3) styling using CSS. Conceptually, a component is a JavaScript class or function that accepts inputs (called props) and returns a React element describing how a section of the UI should appear.

var Employee = (data) => {
  return (
    <div>
      <p>Name : {data.name}</p>
      <p>Salary : {data.salary}</p>
      <p>Dept Name : <b>{data.dept}</b></p>
    </div>
  );
}

const element = <Employee name="Sara" salary="12345" dept="CSE" head="Ahmedabad" />;
ReactDOM.render(element, document.getElementById('root'));

When React sees an element representing a user-defined component, it passes the JSX attributes to that component as a single object — this object is called "props".

React Class Components

To define a class component, create a class that extends React.Component. The output of any class component depends entirely on the return value of its render() method — this is the only required method in a class component. Attributes passed to the component are accessed via this.props.

class Employee extends React.Component {
  render() {
    return (
      <div>
        <h2>Employee Details...</h2>
        <p>ID : <b>{this.props.ID}</b></p>
        <p>Name : <b>{this.props.Name}</b></p>
        <p>Location : <b>{this.props.Location}</b></p>
        <p>Salary : <b>{this.props.Salary}</b></p>
      </div>
    );
  }
}

const element = <Employee ID="08" Name="Devendra" Location="IT-NU" Salary="12345"/>;
ReactDOM.render(element, document.getElementById("root"));

Function Components vs Class Components Comparison

AspectFunction ComponentClass Component
DefinitionA plain JavaScript function that accepts props and returns JSXA class that extends React.Component
Required methodNone — just return JSX directlyrender() is the only required method
Accessing propsDirectly via the function's parameter (e.g. data.name)Via this.props.name
Syntax weightSimpler, shorterMore boilerplate (class, constructor, render)

Fetching API Data Asynchronously (Hooks: useState, useEffect)

import React, { useState, useEffect } from 'react';

function App() {
  const [loading, setLoading] = useState(true);
  const [records, setRecords] = useState([]);

  useEffect(() => {
    setLoading(true);
    fetch('https://jsonplaceholder.typicode.com/photos')
      .then(response => response.json())
      .then(data => {
        setRecords(data);
        setLoading(false);
      })
      .catch(error => console.error(error));
  }, []);

  return (
    <div>
      {loading ? 'Loading...' : (
        <div className="grid">
          {records && records.map(item => (
            <div className="item" key={item.id}>
              <p>{item.title}</p>
            </div>
          ))}
        </div>
      )}
    </div>
  );
}
export default App;
PieceRole
useState(true)Creates a state variable loading (and setter setLoading) initialized to true
useState([])Creates a state variable records (and setter setRecords) initialized as an empty array
useEffect(() => {...}, [])Runs the fetch once when the component mounts (empty dependency array [])
fetch(...).then(response => response.json())Makes the HTTP GET request and parses the JSON response
setRecords(data); setLoading(false);Stores fetched data and marks loading as complete
Conditional renderingShows "Loading..." while loading is true; otherwise maps over records to render each item
Key hooks to remember: useState manages state in function components; useEffect handles side effects (like API calls) and runs based on its dependency array ([] = run once on mount).

Full Practical Example — Movie Ticket Booking (state + arrays + event handling) ⭐

This example is a good template for any "write a React component" question — it shows useState managing multiple pieces of state, rendering a list from an array with .map(), and handling clicks to update state.

import React, { useState } from 'react';

const MovieTicketBooking = () => {
  const [selectedMovie, setSelectedMovie] = useState(null);
  const [selectedSeats, setSelectedSeats] = useState([]);

  const movies = [
    { id: 1, title: 'Movie 1', availableSeats: 100 },
    { id: 2, title: 'Movie 2', availableSeats: 80 },
    { id: 3, title: 'Movie 3', availableSeats: 120 }
  ];

  const handleMovieSelect = (movie) => {
    setSelectedMovie(movie);
    setSelectedSeats([]);
  };

  const handleSeatSelect = (seat) => {
    setSelectedSeats([...selectedSeats, seat]);
  };

  return (
    <div>
      <h2>Movie Ticket Booking</h2>
      <h3>Select a movie:</h3>
      <ul>
        {movies.map(movie => (
          <li key={movie.id} onClick={() => handleMovieSelect(movie)}>
            {movie.title} ({movie.availableSeats} seats available)
          </li>
        ))}
      </ul>

      {selectedMovie && (
        <div>
          <h4>Selected Movie: {selectedMovie.title}</h4>
          <div>
            {Array.from({ length: selectedMovie.availableSeats }, (_, index) => (
              <button
                key={index}
                disabled={selectedSeats.includes(index)}
                onClick={() => handleSeatSelect(index)}
              >
                {index + 1}
              </button>
            ))}
          </div>
          <h4>Selected Seats:</h4>
          {selectedSeats.map(seat => (<span key={seat}>Seat {seat + 1}, </span>))}
          <button onClick={() => setSelectedSeats([])}>Reset</button>
        </div>
      )}
    </div>
  );
};
export default MovieTicketBooking;
PieceRole
selectedMovie / setSelectedMovieTracks which movie the user picked (state)
selectedSeats / setSelectedSeatsTracks the array of chosen seat indices (state)
movies.map(...)Renders a clickable list item per movie from a plain JS array — the standard React list-rendering pattern (needs a unique key)
handleMovieSelectEvent handler — updates state when a movie <li> is clicked, resetting any previous seat selection
Array.from({length:n}, ...)Generates n seat buttons dynamically based on availableSeats
Conditional rendering (selectedMovie && (...))Only shows the seat-selection UI after a movie has been picked
EXAM PREP

Complete Question Bank — All Questions with Answers

50-mark paper strategy: Most questions on this paper are worth 7–8 or 10 marks each, not small sub-parts — so every answer below is written to be expandable into a full long-form answer: state the definition, explain the mechanism/working in your own words, draw and label the diagram, list the sub-points/rules, and close with a one-line summary. For a 10-mark answer, aim to write roughly 250–350 words with at least one diagram or table and clear paragraph breaks per sub-topic — don't just recite the short version below verbatim, use it as your skeleton and add explanation in your own words around each point. The highest-yield full questions (very likely to appear as 10-markers) are: 3-tier architecture (diagram + all rules + skills table), REST paradigm (all 4 constraints + verbs + status codes), Bootstrap 5 (features + what's new + containers + installation methods), and Vue.js custom directives (all 3 practicals, full code). Diagram-based questions need the diagram drawn and labelled, not just described in words.
Q1.What is Full Stack Development? Examine the end-to-end workflow in full-stack development along with a suitable diagram.
Full stack development is the process of designing, creating, testing, and deploying a complete web application from start to finish, involving front-end, back-end, and database development together. In an end-to-end workflow (e.g. a retail website), the user interacts with the front-end UI (browsing, adding to cart), which sends requests to the back-end server handling business logic, which then reads/writes to the database or calls third-party systems as needed, and returns a response back up the chain to the UI. (See "End-to-End Workflow" diagram above.)
Q2.What is a full-stack developer, and what do they do? What languages do full-stack developers use?
A full-stack developer has knowledge of the entire technology stack needed to build an end-to-end application — comfortable with both front-end and back-end technologies. Their responsibilities include helping choose the right technologies, writing clean code across the stack, staying current with tools, and judging early whether a chosen tech fits the project. They use front-end languages (HTML, CSS, JavaScript) and back-end languages (Python, Java, R, Ruby, Node.js, PHP); JavaScript is especially popular since it works on both ends.
Q3.Differentiate Front-end developers, Back-end developers, and Full-stack developers.
Front-end developers handle the UI — visual effects, frames, navigation, forms — focusing on user experience with HTML/CSS/JS. Back-end developers deal with business logic, security, performance, scalability, and request/response handling, using languages like JS, Python, Java, .NET. Full-stack developers are responsible for coding end-to-end workflows using both front-end and back-end technologies (e.g. via MEAN/MERN stacks).
Q4.Is a software engineer the same as a full-stack developer?
No. Software engineering is a general term covering the whole discipline of building software, whereas full-stack development is a specific part of software engineering requiring knowledge of both front-end and back-end technologies to build end-to-end web applications. A software engineer is often an individual contributor working on a specific module/technology at a time, while a full-stack developer works across the complete stack.
Q5.List the advantages and disadvantages of full-stack development.
Advantages: complete project ownership; saves time and cost; faster bug fixing; easy knowledge transfer; better division of work; ability to build/freelance/monetize websites; strong fit for cross-functional Agile teams.
Disadvantages: chosen solution can be wrong for the project; outcome depends heavily on developer skill; creates key-person risk; increasing complexity of being a full-stack developer.
Q6.Explain 3-tier architecture with a suitable diagram. List the rules to be followed in 3-tier architecture applications. Likely 10-mark question

Definition: A 3-tier architecture is a way of structuring an application so that the code for each area of responsibility is cleanly split away from the others into three distinct layers: the Presentation layer, the Business layer, and the Data Access layer, which finally connects to the Database. (Draw the 3-Tier Architecture diagram and the Request/Response cycle diagram shown above — label all four boxes and the arrows between them.)

What each layer does: The Presentation layer holds the presentation logic (HTML/UI) and is the only layer that talks to the outside world (usually a person via a browser). The Business layer holds the business logic — the actual rules and workflows of the application. The Data Access layer holds the data access logic (DML — Data Manipulation Language) and is the only layer allowed to talk to the database. Crucially, the presentation layer has no direct communication with the data access layer — it can only reach it indirectly, through the business layer.

Why split into layers at all: this separation means you can replace the component in one layer without touching the others — e.g. swap the UI layer to output HTML, PDF, or CSV; swap the data access layer to move from MySQL to Oracle or SQL Server; or update business rules independently. It also allows reusability, since one Business-layer component can be shared across multiple Presentation-layer components (business logic defined once, used everywhere), and it lets different specialist teams build/maintain each layer independently.

Design note — don't assume one component per layer: real applications typically need a separate Presentation-layer component per user transaction, a separate Business-layer component per business entity/database table, and a separate Data-Access-layer component per supported DBMS.

Rules of 3-Tier Architecture:

  1. Code for each layer must live in separate files, maintainable independently — possibly by separate teams.
  2. Each layer may contain only the logic that belongs to it: business logic only in the Business layer, presentation logic only in the Presentation layer, data access logic only in the Data Access layer.
  3. The Presentation layer can only receive requests from, and return responses to, an outside agent (usually a person, sometimes another piece of software).
  4. The Presentation layer can only send requests to, and receive responses from, the Business layer — it has no direct access to either the database or the Data Access layer.
  5. The Business layer can only receive requests from, and return responses to, the Presentation layer.
  6. The Business layer can only send requests to, and receive responses from, the Data Access layer — it cannot access the database directly.
  7. The Data Access layer can only receive requests from, and return responses to, the Business layer — it cannot issue requests to anything except the DBMS it supports.
  8. Each layer must be totally unaware of the inner workings of the other layers — the Business layer must be database-agnostic (doesn't know/care how data access works) and presentation-agnostic (doesn't know/care whether the output becomes HTML, PDF, or CSV).

Skills needed per layer (good closing point for a 10-marker): Presentation → HTML, CSS, JavaScript, UI design. Business → a programming language capable of encoding business rules. Data Access → SQL skills (DDL + DML) plus database design. A single person can have all these skills, but such people are rare — which is exactly why large organisations split applications into these layers, letting each be built and maintained by a different specialist team.

Q7.Discuss the various stacks that exist to handle different tasks related to web application development and operations. Likely 10-mark question

Different combinations of technologies ("stacks") exist because different projects have different needs — some prioritize speed of development, some scalability, some mobile support, and some enterprise-grade security. Below are the major stacks, each with its core components, what makes it distinctive, and real companies using it:

  • LAMP — Linux (OS), Apache (Web Server), MySQL (Database), PHP (Language). One of the first open-source stacks; efficiently handles dynamic pages where content changes on every load. Components are swappable — Windows instead of Linux gives a WAMP stack, macOS gives MAMP, and PHP can be swapped for Perl or Python. Used by: Wikipedia, Yahoo, Etsy, Shopify, WordPress, Magento.
  • MEAN — MongoDB (NoSQL database), Express.js (Node.js web framework), Angular (Google's front-end framework), Node.js (server-side JS runtime). An end-to-end JavaScript stack, so a single language is used across the whole stack, enabling code reuse. All components are free/open-source and ideal for cloud hosting since they're flexible, scalable, and extensible; the database can scale on demand for traffic spikes. Used by: Google, Microsoft, IBM, Amazon, Uber, PayPal, LinkedIn.
  • MERN — same as MEAN but Angular is replaced with React. React is popular for building high-end, single-page apps with highly interactive UI, using JSX and a Virtual DOM for fast updates. Since React is a library rather than a full framework, developers often need third-party additions for functionality Angular includes natively. Used by: Meta (Facebook), Tesla, GoDaddy, Walmart, Shutterfly, Under Armour, Accenture, Philips, Airbnb, Netflix, Mozilla.
  • Ruby on Rails (RoR) — a server-side web framework written in Ruby, MIT-licensed, following the MVC (Model-View-Controller) pattern. Offers seamless database table creation, migrations, and scaffolding of views, enabling very rapid application development; encourages JSON/XML for data transfer and HTML/CSS/JS for the UI. Used by: SlideShare, Airbnb, CrunchBase, Bloomberg, Dribble, Shopify, GitHub.
  • .NET — an open-source developer platform (tools, languages C#/F#/Visual Basic, libraries) for building modern, scalable, high-performing desktop/web/mobile apps that run natively across operating systems (Linux, macOS, Windows, iOS, Android). Known for ease of development, code reusability, and strong built-in security.
  • Python-Django — Django is a high-level Python web framework encouraging rapid development with a clean, pragmatic design; often paired with Apache and MySQL for server-side work. Supports low-code development and can manage rising traffic/API request volumes.
  • Flutter — an open-source Google framework for building multi-platform mobile apps from a single codebase, powered by the Dart language, often paired with Firebase on the back end for scalable apps.
  • React Native — a JavaScript framework (based on React) for building native iOS and Android apps using a mix of JS and XML markup; renders using real mobile UI components (so apps look genuinely native) and allows up to 100% code reuse across platforms.
  • Java Enterprise Edition (Java EE) — provides enterprise features like distributed computing and web services, run on application/microservers; the de-facto standard for secure, robust, multi-platform apps — ideal for e-commerce, accounting, and banking information systems.
  • Serverless Stack — lets developers focus purely on application code rather than infrastructure, using Functions-as-a-Service (FaaS) like AWS Lambda, Google Cloud Functions, or Azure Functions. Highly cost-effective (you don't pay for unused server resources) and auto-scales during traffic spikes.

Closing point for full marks: note that all these stacks ultimately map back to the front-end/back-end/database split of full-stack development — they simply standardize which specific technology occupies each slot, trading off between rapid development, scalability, community support, and platform reach.

Q8.Explain REST (Representational State Transfer) and how REST architecture streamlines communication between web components. Likely 10-mark question

Definition: REST (REpresentational State Transfer) is an architectural style — not a protocol or a strict standard — that provides a set of conventions for communication between computer systems on the web, making it easier for systems built independently to talk to each other. Systems that follow these conventions are called RESTful. (Draw the "REST API — High-level Flow" diagram: Database ↔ Web Server ↔ RESTful API ↔ Client App.)

The four main constraints (this is the core of the answer):

  1. Separation of Client and Server — the client implementation and server implementation can be developed and changed completely independently, as long as both sides agree on the message format they exchange. This improves flexibility of the interface across platforms, improves scalability by simplifying server components, and lets each side evolve on its own timeline. Because of this, different clients hitting the same REST endpoint perform the same actions and get the same responses.
  2. Statelessness — the server does not need to remember anything about the client's previous requests, and vice versa; every request must contain all the information needed to understand and process it. This is enforced by interacting through resources (the "nouns" of the web — any object, document, or thing you need to store or send) rather than through stateful commands.
  3. Cacheability — server responses explicitly state whether they can be cached. This lets clients reuse cached responses instead of repeating identical requests, directly improving performance and reducing server load.
  4. Uniform Interface — the most important constraint, broken into four sub-rules:
    • Identification of Resources — every resource is identified by a unique URI.
    • Resource Manipulation through Representations — clients never touch the resource directly; they interact with a representation of it (typically JSON, sometimes XML).
    • Self-Descriptive Messages — every message carries all the information needed to process it, including how to interpret the data (e.g. its media type).
    • HATEOAS (Hypermedia As The Engine Of Application State) — server responses include hypermedia links guiding the client toward related resources/actions, so the client doesn't need out-of-band knowledge of the API's structure.

How communication actually happens (the "streamlining" part): Every request is built from four standard parts — an HTTP verb (what operation to perform), a header (e.g. the Accept field, listing acceptable MIME types like application/json), a path to the resource (conventionally the plural resource name, e.g. /customers/223/orders/12), and an optional message body. The four standard HTTP verbs map directly onto CRUD-style operations: GET retrieves a resource (success → 200 OK), POST creates one (success → 201 Created), PUT updates one (success → 200 OK), and DELETE removes one (success → 204 No Content). On the response side, the server always returns a Content-Type header (matching one of the types the client said it could Accept) plus a standard status code — 200/201/204 for success, 400/403/404 for client-side problems, 500 for an unspecified server failure.

Why this streamlines communication: because every RESTful system — regardless of what language or framework built it — agrees on the same verbs, the same status codes, the same idea of a stateless request/response cycle, and the same resource-based URI structure, any REST client can talk to any REST server without needing custom, one-off integration code. This uniformity is precisely what makes REST the standard choice for modern web APIs.

Q9.What is JSON? Why is it used in web applications?
JSON (JavaScript Object Notation) is a lightweight, text-based, open, language-independent data-interchange format using key-value pairs (objects in { }) and arrays ([ ]). It's used because it's less verbose than XML, parses faster, is easily readable and maps cleanly to domain objects in any language, and is commonly used to serialize and transmit data between a server and a web app (e.g. API responses).
Q10.What is responsive web design? How can you make your site responsive?
Responsive web design makes web pages render correctly across device screen sizes without distorting or cutting off content, using HTML/CSS to resize, hide, shrink, enlarge, or move content. You make a site responsive by: (1) setting the viewport meta tag <meta name="viewport" content="width=device-width, initial-scale=1.0">; (2) making images responsive via width:100% or (better) max-width:100%; height:auto;, or using the <picture> element for different images per screen width; (3) making text responsive using the vw unit; and (4) using media queries with breakpoints to apply different CSS rules at different screen widths.
Q11.How can you make text size responsive using the "vw" unit?
vw stands for viewport-width, where 1vw = 1% of the current viewport's width. Setting font-size:6vw; means the text size is always 6% of the browser window's width, so it automatically scales up or down as the window is resized — no media query needed for this specific effect.
Q12.How will an image scale down if necessary, but never scale up larger than its original size?
By using max-width:100%; height:auto; on the image (instead of plain width:100%). This is considered the best/most-used responsive-image method because it lets the image shrink to fit smaller containers, but caps its size at the image's true original resolution, preventing pixelation from over-enlarging.
Q13.What are media queries? How do you add a breakpoint?
Media queries are a CSS feature that apply styles conditionally based on device/browser characteristics (screen size, resolution, orientation), using the syntax @media media_type and (media_feature) { CSS rules }. A breakpoint is the specific media-feature value (e.g. a screen width like min-width:600px) at which those styles activate — you add one simply by writing a new @media block targeting that width and placing the desired CSS rules inside it. Breakpoints are usually chosen to match typical device categories (mobile/tablet/desktop) but are ultimately set based on your own design's needs.
Q14.List and explain any five HTML5 features.
(1) Audio & Video tags — embed media natively with <video>/<audio> and a controls attribute. (2) Canvas — draw graphics dynamically via JavaScript using width/height attributes. (3) Geolocation API — request the user's location via navigator.geolocation.getCurrentPosition(). (4) Local Storage — key-value storage in the browser via localStorage.setItem()/getItem(), useful for offline apps though storage is limited. (5) Drag and Drop API — make elements draggable (draggable="true") and define drop zones using ondragstart, ondragover, and ondrop event handlers.
Q15.What is Bootstrap? Explain its key features in detail. Likely 7-8 mark question

Definition: Bootstrap is an open-source front-end framework developed by Twitter. It is a collection of pre-written HTML, CSS, and JavaScript tools and components that help developers build responsive and mobile-first web applications quickly. Rather than writing every UI element and its styling from scratch, Bootstrap gives you a library of pre-built, pre-styled components that you can drop into a page and customize.

Key features, explained:

  1. Responsive Design — Bootstrap is built with a mobile-first approach: base styles target small screens first, then progressively enhance for larger ones, ensuring sites adapt well from small phones all the way up to large desktop monitors.
  2. Grid System — a responsive layout system based on 12 columns. By combining .container, .row, and .col classes, developers can create flexible, dynamic multi-column layouts that automatically reflow at different screen widths.
  3. CSS Components — a large set of pre-styled, ready-to-use components: navigation bars, buttons, forms, typography, cards, alerts, and more, so common UI patterns don't need to be designed from zero.
  4. JavaScript Plugins — built-in interactive behaviour such as modals, carousels (image sliders), tooltips, and popovers, without writing custom JS for these common interactions.
  5. Customization — while Bootstrap ships with sensible defaults, it is highly customizable: developers can edit the source Sass/Less files to change colors, spacing, and component styles to match a project's own branding.
  6. Community & Documentation — a large, active developer community means abundant tutorials, third-party themes, and extensions are freely available, and the official documentation is comprehensive and beginner-friendly.
  7. Cross-Browser Compatibility — Bootstrap is engineered to behave consistently across different web browsers, removing the burden of manually patching browser-specific quirks.

Closing point: together, these features let a full-stack developer prototype and ship a professional, responsive UI far faster than hand-rolling CSS for every screen size and component — which is exactly why Bootstrap remains one of the most widely adopted front-end frameworks in industry.

Q16.What is new in Bootstrap 5? Likely 7-8 mark question
Bootstrap 5 introduced: a major framework rewrite, a fresh look/feel and new logo, updated typography, removal of the jQuery dependency (now uses vanilla JS), dropped support for Internet Explorer 11, new theme colors, an enhanced/more flexible grid system, the new Offcanvas feature for hidden side panels, and its own built-in icon system (no external icon library needed). Explain each point briefly in your own words for full marks — e.g. dropping jQuery makes Bootstrap lighter and more aligned with modern JS practices; dropping IE11 support lets the framework use modern web standards for better performance; Offcanvas improves navigation UX by revealing hidden side menus on demand.
Q17.Explain the two ways to install/use Bootstrap 5, with their advantages. Likely 7-8 mark question
CDN link — add a <link> tag pointing to a CDN URL in the <head>; advantages are faster loading (geographically distributed servers), reduced burden on your own server, and automatically using the latest version — but it requires an internet connection. Compiled CSS (offline) — download the Bootstrap ZIP, extract, and host the CSS/JS files locally; advantages are offline availability, reduced dependency on external servers, improved performance (no network request needed), full customization/version control, better security/privacy, and immunity to CDN outages — though it requires manually updating versions and increases project size.
Q18.Explain Bootstrap 5 Containers — the three types, with the breakpoint table. Likely 7-8 mark question
Containers are the fundamental Bootstrap layout building block used with the grid system, enclosing content with padding and centering it horizontally. (1) .container — has a maximum (fixed) width at each responsive breakpoint. (2) .container-fluid — 100% width at all breakpoints (full page width always). (3) Responsive container (.container-{breakpoint}) — 100% width until the specified breakpoint is reached, then becomes fixed-width like a normal container from that point onward. For full marks, reproduce the breakpoint width table (Extra Small/Small/Medium/Large/X-Large/XX-Large columns showing 100%, 540px, 720px, 960px, 1140px, 1320px) and note the pattern: each responsive class stays fluid until its own named breakpoint, then locks to the same fixed width as .container from there on — .container-xxl stays fluid longest. (See breakpoint width table above.)
Q19.What is Vue.js? What is a Single Page Application (SPA)?
Vue.js is an open-source, progressive JavaScript framework used to build interactive web UIs and single-page applications, letting you extend HTML with custom attributes called directives. A Single Page Application (SPA) is a web app/site that gives a fluid, reactive, fast, desktop-like experience — it dynamically rewrites the current page in response to user actions (clicks, menu selections) instead of loading brand-new pages from the server each time, which is why it feels fast.
Q20.Briefly discuss the various hook functions used to define the behavior of a Vue custom directive.
bind — called only once, when the directive is first bound to the element; used for one-time setup. inserted — called when the bound element is inserted into the DOM; good for DOM manipulation. update — called when the bound element's value/expression changes. componentUpdated — called after the containing component has updated. unbind — called only once, when the directive is unbound from the element.
Q21.Write HTML and JavaScript code to create a custom directive that transforms text to uppercase when clicked.
Register the directive with Vue.directive('uppercase', { bind(el){ el.style.cursor='pointer'; el.addEventListener('click', () => { el.innerText = el.innerText.toUpperCase(); }); } }), then apply it in HTML as <p v-uppercase>...</p>. The bind hook runs once, sets a pointer cursor as a visual cue, and attaches a click listener that reads and rewrites the element's text in uppercase. (Full code under Unit-2 → Vue.js → Practical I above.)
Q22.Write HTML and JavaScript code to create a dynamic list using a Vue.js custom directive.
Define Vue.directive('list', { bind(el, binding){ ... binding.value.forEach(item => { create <li> and append }); el.appendChild(ul); } }) and use it as <ul v-list="items"></ul>, where items is an array in the Vue instance's data. binding.value gives the directive access to that array so it can build and insert list items dynamically. (Full code under Unit-2 → Vue.js → Practical II above.)
Q23.Write HTML and JavaScript code for a directive that formats and displays dates in a human-readable format.
Register Vue.directive('format-date', { inserted(el, binding){ el.textContent = formatDate(binding.value); } }), apply it as <p v-format-date="date"></p>, and implement formatDate() using new Date(dateString).toLocaleDateString('en-US', {year:'numeric', month:'long', day:'numeric'}) to convert an ISO date string (e.g. 2022-03-05T12:00:00) into a readable form (e.g. "March 5, 2022"). (Full code under Unit-2 → Vue.js → Practical III above.)
Q24.What is Tailwind CSS? List its key features.
Tailwind CSS is a utility-first CSS framework providing a set of pre-designed utility classes to build UIs, without shipping pre-built components — you compose your own designs from small classes. Key features: utility-first approach, built-in responsive design utilities, high customization via config, design flexibility (no imposed structure), and modular/composable classes.
Q25.Explain the Tailwind classes bg-blue-500, text-white, p-4, text-2xl, and mt-2.
bg-blue-500 sets background color to blue at intensity 500; text-white sets text color to white; p-4 adds padding of size 4 on all sides; text-2xl sets an extra-large font size; mt-2 adds margin-top of size 2. Each follows Tailwind's naming convention: property abbreviation + value/scale-step.
Q26.What is ReactJS? Why is it used?
ReactJS is a declarative, efficient, flexible JavaScript library (not a framework) for building reusable UI components, responsible only for the view layer of an application, developed by Facebook. It's used because it improves UI speed via a Virtual DOM — a JavaScript object representation of the UI that's faster to update than manipulating the real browser DOM directly, since only the changed elements are updated instead of reloading the entire page.
Q27.Differentiate Real DOM and Virtual DOM.
Real DOM is the actual webpage structure rendered by the browser — any change re-renders the complete document, which is slower. Virtual DOM is an in-memory, virtual representation of the Real DOM; React updates state changes here first, then syncs only the differences to the Real DOM (a process called reconciliation), making updates much faster since unaffected parts of the page are left untouched.
Q28.What are React elements? How are they created and rendered?
Elements are the smallest building blocks of a React app — plain objects describing what should appear in the UI (in terms of DOM nodes). They're cheap to create compared to real DOM elements, and can be created using JSX (e.g. const element = <h1>Hello</h1>;) or without JSX. They're rendered into the page using ReactDOM.render(element, document.getElementById('root')), where root is a container div in the HTML file. JSX is compiled to plain JavaScript by Babel.
Q29.What are components in React? Differentiate Function Components and Class Components.
Components are the building blocks of a React app, letting you split the UI into independent, reusable pieces — conceptually a JS function or class accepting inputs (props) and returning a React element. A Function Component is a plain function that returns JSX directly and reads props from its parameter. A Class Component extends React.Component and must implement a render() method (the only required method), accessing props via this.props. Function components are simpler and involve less boilerplate.
Q30.How do you fetch API data asynchronously in React using hooks?
Use the useState hook to create state variables (e.g. loading, records) and the useEffect hook to perform the fetch as a side effect. Inside useEffect, call fetch(url).then(res => res.json()).then(data => { setRecords(data); setLoading(false); }), with an empty dependency array [] so it runs only once when the component mounts. The JSX conditionally renders a loading message while loading is true, and maps over records once data arrives.
Q31.Expand MEAN, MERN, and LAMP and name one company that uses each.
MEAN = MongoDB, Express.js, Angular, Node.js (e.g. Google, PayPal). MERN = MongoDB, Express.js, React, Node.js (e.g. Netflix, Airbnb). LAMP = Linux, Apache, MySQL, PHP (e.g. Wikipedia, WordPress).
Q32.Does JSON support comments? If not, how can you add one anyway?
No — comments are not part of the official JSON standard. A common workaround is to add an extra key purely for documentation, e.g. "comments": "He is a nice man", which any parser will just treat as a normal string value rather than a real comment.
Q33.What is the Play CDN in Tailwind CSS, and when should it NOT be used?
The Play CDN (<script src="https://cdn.tailwindcss.com"></script>) lets you try Tailwind directly in the browser with zero build step — great for quick demos/learning. It should not be used in production, since it compiles styles on the fly in the browser and isn't optimized (no purging of unused CSS, larger payload, slower).
Q34.Write a short React function component that accepts props and renders them (practical/coding question).
function Employee(data) {
  return (
    <div>
      <p>Name: {data.name}</p>
      <p>Salary: {data.salary}</p>
    </div>
  );
}
const element = <Employee name="Sara" salary="12345" />;
ReactDOM.render(element, document.getElementById('root'));
The function receives the JSX attributes bundled as a single props object (here called data), and returns JSX referencing data.name/data.salary — React then renders that returned JSX wherever the component is used.
Q35.Write the JSON representation of an employee list with name, email, and age fields (practical/coding question).
{"employees":[
  {"name":"Ram", "email":"ram@gmail.com", "age":23},
  {"name":"Shyam", "email":"shyam23@gmail.com", "age":28},
  {"name":"John", "email":"john@gmail.com", "age":33}
]}
employees is a key whose value is an array ([ ]) of objects ({ }); each object holds key-value pairs of type String (name, email) and Number (age).
EXAM PREP

Comparison-Style Questions

C1.Compare Front-end, Back-end, and Full-stack Developers.
See the comparison table under Unit-1, Section 3 above. In short: Front-end = UI/UX with HTML/CSS/JS; Back-end = logic/security/scalability with server languages; Full-stack = both, end-to-end, typically via a unified stack like MEAN/MERN.
C2.Compare Software Engineer vs Full-Stack Developer.
Software Engineer = broad discipline, may specialize in one module. Full-Stack Developer = a specialization within software engineering requiring combined front-end + back-end competency across the whole stack.
C3.Compare LAMP, MEAN, and MERN stacks.
LAMP = Linux+Apache+MySQL+PHP (classic, multi-language). MEAN = MongoDB+Express+Angular+Node (pure JavaScript, uses Angular for front end). MERN = MongoDB+Express+React+Node (pure JavaScript, uses React — a library, not framework — for front end, needing third-party additions for extra features that Angular includes natively).
C4.Compare JSON and XML.
JSON is less verbose, parses faster, more human-readable, and uses a map (key-value) structure. XML is more verbose, slower to parse (needs more memory for DOM manipulation), and uses a tree structure. JSON is now the dominant choice for modern web/API data interchange; XML remains common in legacy enterprise and document-markup contexts.
C5.Compare the HTTP verbs GET, POST, PUT, DELETE.
GET retrieves a resource/collection (success → 200). POST creates a new resource (success → 201). PUT updates an existing resource by id (success → 200). DELETE removes a resource by id (success → 204, no content returned).
C6.Compare the Presentation, Business, and Data Access layers in 3-tier architecture.
Presentation layer talks to the outside user/agent and the Business layer only, using HTML/CSS/JS/UI-design skills. Business layer talks only to the Presentation and Data Access layers, using a programming language to process business rules. Data Access layer talks only to the Business layer and the specific DBMS it supports, using SQL (DDL/DML) and DB design skills. None of the layers is aware of the others' internal workings.
C7.Compare .container, .container-fluid, and .container-{breakpoint} in Bootstrap 5.
.container = fixed max-width at every breakpoint (never full width). .container-fluid = always 100% width, at every breakpoint (never fixed). .container-{breakpoint} (responsive container) = 100% width up to the named breakpoint, then locks to a fixed width from that breakpoint onward — a hybrid of the two.
C8.Compare using a CDN link vs a locally hosted (offline) compiled CSS file for Bootstrap.
CDN: needs internet, but is typically faster (geo-distributed), always up to date, reduces load on your own server. Offline/local: works without internet, gives full version control and better security/privacy, immune to CDN outages, but requires manual updates and increases your project's file size. Use CDN for quick production sites with reliable connectivity; use offline hosting for restricted/offline environments or when you need strict version control.
C9.Compare the width:100% method vs the max-width:100% method for responsive images.
width:100% makes the image always fill its container — scaling both up and down, which can enlarge a small image beyond its native resolution (pixelation). max-width:100%; height:auto; lets the image shrink to fit a smaller container, but caps growth at the image's original size — considered the safer, best-practice method.
C10.Compare Bootstrap 4/earlier vs Bootstrap 5.
Bootstrap 5 removed the jQuery dependency (Bootstrap 4 required it), dropped IE11 support, added the Offcanvas component, added a built-in icon system, refreshed theme colors and typography, and enhanced the grid system's flexibility — overall a leaner, more modern, dependency-free framework.
C11.Compare Bootstrap and Tailwind CSS.
Bootstrap is component-first — it ships ready-made, pre-styled components (navbars, cards, buttons) you can drop in directly. Tailwind is utility-first — it gives you many small single-purpose classes (spacing, color, layout) that you compose yourself, with no pre-built components. Bootstrap is faster to start with; Tailwind gives more design freedom and helps avoid every site "looking like Bootstrap."
C12.Compare Real DOM and Virtual DOM.
Real DOM is the actual, browser-rendered structure of the page — updates re-render the whole document and are comparatively slow. Virtual DOM is an in-memory, lightweight copy of the Real DOM; React applies changes here first, computes the minimal set of real changes needed, and only updates those specific nodes in the Real DOM (reconciliation) — making Virtual DOM-based updates significantly faster for frequently changing UIs.
C13.Compare React Function Components and Class Components.
Function components are plain JS functions returning JSX, reading props directly from a parameter, with no required lifecycle method — modern React favors these along with Hooks (useState, useEffect). Class components extend React.Component, must implement render(), and access props via this.props — more verbose, and were the only way to manage state/lifecycle before Hooks existed.
C14.Compare Vue.js directive hooks: bind vs inserted vs update.
bind fires once, immediately when the directive attaches to the element — used for one-time setup (e.g. attaching event listeners). inserted fires once the element is actually placed into the live DOM — needed when a DOM-dependent operation (like measuring size or setting focus) must happen after insertion. update fires every time the bound value/expression changes, letting the directive react to new data — unlike bind/inserted, which fire only once.
FINAL

Last-Minute Recall Checklist

Before you close this page, make sure you can do all of the following from memory:
  • Draw the 3-tier architecture diagram and state all its rules without looking
  • Name REST's 4 main constraints + all 4 HTTP verbs with their success status codes
  • Explain JSON's structure and why it's preferred over XML
  • List all 10 HTML5 features with one example each
  • Explain viewport meta tag, both image-responsiveness methods, and the vw unit
  • Recite what's new in Bootstrap 5 (especially: no jQuery, Offcanvas, own icons)
  • Draw the difference between .container / .container-fluid / .container-{breakpoint}, and recall the breakpoint width table
  • Explain CDN vs offline Bootstrap installation, with 2 pros of each
  • Explain Tailwind's utility-first approach and decode a few utility class names on sight (e.g. hover:bg-green-600)
  • Explain Vue.js directives, SPAs, and all 5 custom-directive hook functions (bind/inserted/update/componentUpdated/unbind)
  • Write the uppercase-on-click custom directive from memory
  • Explain Real DOM vs Virtual DOM and why React is fast
  • Differentiate React function components vs class components, and recall useState/useEffect for async data fetching