DEV Community

Cover image for Day 21 of #100DaysOfCode — Introduction to Backend Development
M Saad Ahmad
M Saad Ahmad

Posted on

Day 21 of #100DaysOfCode — Introduction to Backend Development

For the first 20 days of my #100DaysOfCode journey, my focus was completely on the frontend, mainly working with React. I covered a lot of essential concepts:

  • State management for organizing components and rendering logic
  • API fetching using fetch, axios, and later TanStack Query (useQuery) for data extraction
  • Form handling using FormData, especially for file uploads
  • And many foundational patterns for building modern UI workflows

After strengthening the frontend side, it was finally time to transition into backend thinking — understanding what happens after the frontend sends a request, how data is processed, and how servers handle logic behind the scenes.


🖥️ What Exactly Is a Backend?

The backend is the part of an application that runs on a server. It contains all the logic that the user doesn't see.

A simple analogy:

  • Frontend: What you interact with — the app UI
  • Backend: The engine that handles logic, data, authentication, and all hidden operations

Think of a restaurant:

  • You = the customer (frontend)
  • The kitchen = backend
  • The waiter = API

You never see how the food is cooked — you simply get the final result.


🔗 What Is an API?

An API (Application Programming Interface) is a messenger between two systems.
It lets your application talk to another server or service.

Using the restaurant analogy again:

  • You tell the waiter what you want.
  • The waiter communicates with the kitchen.
  • The kitchen sends the response back through the waiter.

That waiter = the API.


🌐 What Is a REST API?

A REST API is a popular style of building APIs using HTTP.
Most modern web and mobile apps use REST because it is simple, predictable, and works great with JSON.

REST APIs rely on:

  • URLs called endpoints
  • HTTP methods (GET, POST, PUT, etc.)
  • Standard response formats like JSON

📍 What Is an Endpoint?

An endpoint is a specific URL where a request is sent to perform an action.
Different URLs represent different tasks.

Examples:

GET  https://api.example.com/users       → Get all users  
GET  https://api.example.com/users/42    → Get user with ID 42
Enter fullscreen mode Exit fullscreen mode

Each endpoint acts like a unique "door" to a particular resource.


🛠️ HTTP Methods (The Actions You Perform)

These methods tell the server what you want to do.

Method Purpose Example Use Case
GET Read/fetch data Get a list of products
POST Create new data Register a new user
PUT Replace existing data Replace entire user profile
PATCH Modify part of data Update only the email
DELETE Remove data Delete a post

📡 HTTP Status Codes

Servers respond with status codes to tell you what happened.

Code Meaning
200 ✅ Success
201 👍 Resource created successfully
400 ❌ Bad request (invalid input)
401 ⛔ Unauthorized (no or invalid token)
403 🛑 Forbidden (you don't have permission)
404 🤷‍♂️ Resource not found
500 💀 Server error (something broke on their end)

🧱 What Is JSON and Why Does the Backend Use It?

JSON (JavaScript Object Notation) is the most common format for exchanging data between frontend and backend.

It is simple, human-readable, and works naturally with JavaScript.

Example JSON:

{
  "id": 1,
  "name": "Sara",
  "age": 25,
  "isAdmin": false,
  "hobbies": ["reading", "coding"],
  "address": {
    "city": "Los Angeles",
    "country": "USA"
  }
}
Enter fullscreen mode Exit fullscreen mode

This structure is exactly how data moves between your React frontend and your backend.


🎯 Final Thoughts

Day 21 was all about shifting from UI thinking to server thinking.
Understanding backend fundamentals like APIs, REST, endpoints, and status codes is crucial before diving into Node.js, Express, databases, and server architecture.

This backend foundation is necessary to grasp before moving forward in backend development.

Happy coding!

Top comments (0)