Day 1 of Spring Boot + React Mastery: Web, APIs & JavaScript Basics Simplified

Table of contents
- π How the Web Works
- π§βπ» What is Client-Server?
- π What is an API?
- π₯ HTTP Methods (Types of API Requests)
- π‘ What is a REST API?
- π HTTP vs HTTPS
- π’ HTTP Status Codes
- π URI, URL, URN β Whatβs the Difference?
- π¨βπ» Setting up React + JavaScript
- π οΈ Engines that Run JS
- βοΈ JavaScript in Action
- π§° Tools for Frontend Dev
- π» First JS Program
- π Structure of a JavaScript File
- π External vs Inline JS
- π JS Comments
- β Summary

Author: Ravindranath Porandla
Welcome to Day 1 of my Spring Boot + React Full-Stack Journey π
In todayβs blog, Iβll provide beginner-friendly explanations of the core web concepts every full-stack developer should know. Whether youβre building REST APIs with Spring Boot or using them in React, this foundation is essential.
π How the Web Works
The web operates on a request-response model, where a client (usually a browser) makes requests to a server, which processes and returns a response.
π Simple Example:
Ordering food online:
You place an order β client sends a request
Restaurant confirms & delivers β server sends a response
π‘ Tip:
Always think of the internet like a conversation β the browser speaks first, the server responds.
π§βπ» What is Client-Server?
Client-server architecture separates concerns between front-end (client) and back-end (server). Clients initiate communication and servers provide requested services or data.
π Example:
A student (client) asks a teacher (server) for notes. The teacher gives the right material.
π‘ Tip:
Client = Asks, Server = Answers. They work together.
π What is an API?
An API (Application Programming Interface) is a set of rules that allow different software systems to communicate and exchange data.
π Example:
Think of an API as a waiter:
You tell the waiter (API) your order
The waiter talks to the kitchen (server)
Your food (response) is served
π‘ Tip:
APIs are the middlemen that connect frontend and backend.
π₯ HTTP Methods (Types of API Requests)
Method | Action | π Example |
GET | Read | View order status on app |
POST | Create | Place a new pizza order |
PUT | Update | Change your address |
DELETE | Remove | Cancel a placed order |
π‘ Tip:
Just remember: CRUD = Create, Read, Update, Delete β POST, GET, PUT, DELETE
π‘ What is a REST API?
REST (Representational State Transfer) is an architectural style that uses standard HTTP methods to access and manipulate resources. It is stateless and scalable.
π Example:
GET /books β list all books
GET /books/1 β book with ID 1
POST /books β create a new book
π‘ Tip:
REST is like organized shelves in a library β you ask for a book using its location.
π HTTP vs HTTPS
Protocol | Security Status | π Example |
HTTP | Not Secure | Like shouting a password in public |
HTTPS | Secure (Encrypted) | Like whispering in private |
π‘ Tip:
Always use HTTPS for login, payments, or personal data. It's your online seatbelt.
π’ HTTP Status Codes
Category | Code Range | Meaning | π Example |
1XX | 100β199 | Informational | "Processing your request" |
2XX | 200β299 | Success | "Here's your data!" |
3XX | 300β399 | Redirection | "Page moved" |
4XX | 400β499 | Client Error | "Page not found (404)" |
5XX | 500-599 | Server Error | "Server crashed (500)" |
π‘ Tip:
If you get 404 β You made a mistake. If itβs 500 β Server made the mistake.
π URI, URL, URN β Whatβs the Difference?
π Definitions:
URI: A string that identifies a resource
URL: A URI with access method and location (http://)
URN: A URI with a resource name (not its location)
Term | Description | π Example |
URI | Generic resource ID | /api/users/101 |
URL | Location to access URI | https://app.com/api/users/101 |
URN | Resource name only | urn:isbn:978-3-16-148410-0 |
π Analogy:
URI: A contact in your phone
URL: Their full address
URN: Their Aadhaar or PAN number
π‘ Tip:
All URLs and URNs are URIs. An URI can be URN or it can be URL, but not both.
π¨βπ» Setting up React + JavaScript
π What is JavaScript?
JavaScript is a programming language that runs in browsers and makes websites interactive.
π Example:
- When you click "Add to Cart" and it instantly updates β that's JavaScript
π‘ Tip:
HTML builds the structure, CSS styles it, and JavaScript brings it to life.
π οΈ Engines that Run JS
Engine | Used In |
V8 | Chrome, Node.js |
SpiderMonkey | Firefox |
βοΈ JavaScript in Action
Try this in browser console:
console.log("Hello World");
alert("Welcome!");
clear();
π§° Tools for Frontend Dev
π Why VS Code?
Lightweight, open-source, and highly customizable
Preferred by most frontend developers
β Why not IntelliJ / PyCharm (Community)?
Limited frontend features
Slower setup for React/JavaScript
π» First JS Program
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First JS</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
<script>
console.log("Hello World from JS");
</script>
</html>
π Structure of a JavaScript File
π Explanation:
JavaScript files contain statements, not HTML tags
JS is written inside
<script>
tagsScripts can be placed in
<head>
or after <body>
.
π Difference:
If placed in
<head>
, the script runs before the DOM(Document Object Model, as of now think this a HTML) is loaded, which can cause errors if it tries to access elements that arenβt loaded yetIf placed after
<body>
, it ensures the HTML is fully loaded before JS runs
β Best Practice:
Always place your script just before the closing </html>
tag or use defer
in <script>
tag in <head>
<script src="index.js" defer></script>
π‘ Tip:
Let HTML load first β then run JavaScript
π External vs Inline JS
π Explanation:
Inline JS is written directly in HTML
External JS is in a
.js
file and linked via<script src="">
π‘ Tip:
Keep logic in external files to separate concerns and keep code clean.
π JS Comments
// Single-line comment
/* Multi-line comment */
/**
* Doc-style comment
* Use jsdoc.app for documentation
* Refer web to learn more about Doc-style comments
*/
β Summary
Today we covered:
How the web works
Client-server architecture
APIs and REST principles
HTTP methods and status codes
Differences between URI, URL, and URN
JavaScript setup and first steps with React
Stay tuned for Day 2 as we dive deeper into real coding with Spring Boot and build our first RESTful endpoint!
π§ Follow more at: Ravindranath Porandla Blog
β Ravindranath Porandla π§βπ»
Subscribe to my newsletter
Read articles from Ravindranath Porandla directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
