Skip to content

Expert · Choosing a stack and getting hired · topic 52 of 54 · 25 min

Backend languages and frameworks

Explanation

Every popular backend language can build the same API. Node.js, Python, Java, PHP and Go all receive a request, read it, and send JSON back. They differ in speed, style and where the jobs are. Pick one, learn it deeply, and the ideas carry over to the next one.

One small endpoint, six ways

An endpoint is one address your API answers, like GET /api/hello. A framework is ready-made code that does the common work for you (reading the URL, matching routes, sending JSON), so you only write your app's own logic. Below, the same endpoint is written six times. A request to /api/hello?name=Asha must return the JSON { "message": "Hello, Asha" }. If there is no name, we say "Hello, friend".

Think of it like this: Think of the same dal recipe cooked in six kitchens: one has a gas stove, one an induction plate, one a pressure cooker. The tools and steps look different, but the dal is the same: dal, water, salt, tadka. Backend languages are the kitchens. The recipe (route, read input, check it, answer in JSON) does not change.
javascript
const express = require('express');
const app = express();

app.get('/api/hello', (req, res) => {
  const name = req.query.name || 'friend';
  res.json({ message: 'Hello, ' + name });
});

app.listen(3000, () => console.log('Listening on port 3000'));
Node.js with Express. Runs on a server with Node.js (node server.js), on port 3000.
python
from fastapi import FastAPI

app = FastAPI()

@app.get("/api/hello")
def hello(name: str = "friend"):
    return {"message": f"Hello, {name}"}

# Start it with: uvicorn main:app --reload
Python with FastAPI. Runs on a server with Python and Uvicorn. FastAPI also writes API docs for you at /docs.
python
# views.py
from django.http import JsonResponse

def hello(request):
    name = request.GET.get("name", "friend")
    return JsonResponse({"message": f"Hello, {name}"})

# urls.py
from django.urls import path
from . import views

urlpatterns = [
    path("api/hello", views.hello),
]
Python with Django. Lives inside a Django project; runs with python manage.py runserver while developing and Gunicorn on a real server.
java
package com.example.demo;

import java.util.Map;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @GetMapping("/api/hello")
    public Map<String, String> hello(@RequestParam(defaultValue = "friend") String name) {
        return Map.of("message", "Hello, " + name);
    }
}
Java with Spring Boot. A controller class in a Spring Boot project; runs on the JVM (Java Virtual Machine), started with ./mvnw spring-boot:run.
php
<?php
// routes/api.php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::get('/hello', function (Request $request) {
    $name = $request->query('name', 'friend');
    return response()->json(['message' => 'Hello, ' . $name]);
});
PHP with Laravel. Routes in routes/api.php get the /api prefix automatically. Runs on a server with PHP (php artisan serve while developing).
go
package main

import (
    "encoding/json"
    "net/http"
)

func hello(w http.ResponseWriter, r *http.Request) {
    name := r.URL.Query().Get("name")
    if name == "" {
        name = "friend"
    }
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(map[string]string{"message": "Hello, " + name})
}

func main() {
    http.HandleFunc("GET /api/hello", hello)
    http.ListenAndServe(":8080", nil)
}
Go with only the standard library (net/http, Go 1.22 or newer). Compiles to one program file you run on a server; listens on port 8080.

Look closely and every version does the same four things: match the route GET /api/hello, read the name from the query string, fall back to "friend", and return JSON. Once you understand these steps in one language, the others are mostly new spelling.

Comparing the main choices

Language (frameworks)Typical usesLearning curveJobs in India (general picture)
JavaScript / TypeScript (Express, NestJS)APIs for web and mobile apps, real-time apps, startupsGentle if you already know JavaScript from the frontendMany openings, especially startups and product companies; often paired with React
Python (Django, FastAPI, Flask)Web apps, admin-heavy sites, APIs around data and AIGentle: short, readable codeSteady demand; growing with data and AI work
Java (Spring Boot)Banks, insurance, large enterprises, big IT services projectsSteeper: more concepts and setupA very large number of jobs, especially in IT services and banking
PHP (Laravel, WordPress)Business websites, online shops, content sites, agency workGentleMany small-company, agency and freelance jobs
Go (net/http, Gin)Cloud tools, high-traffic services, infrastructureModerate: small language, some new ideasFewer roles but growing, mostly in product companies
C# (ASP.NET Core)Enterprise apps in Microsoft-based companiesModerateSteady in enterprises and IT services

How to choose

  1. Read 30 to 50 fresher backend job posts for your city or for remote work, and count which languages appear most.
  2. Start from what you already know: JavaScript from frontend work points to Node.js; Python from college points to Django or FastAPI.
  3. Pick ONE language and one framework. Build two or three real projects with it: login, a database, tests, deployed online.
  4. Go deep on the shared ideas: HTTP, REST, SQL, authentication, caching, testing, deployment.
  5. Learn a second language later, when a job or a project asks for it. It will take weeks, not months.
Tip: Interviewers care more about how well you understand HTTP, databases and debugging than about which language you chose. A strong Node.js developer can learn Spring Boot on the job; a person who knows five languages a little cannot fix a slow query.
Careful: Avoid "tutorial hopping": starting Java this week, Go next week and Python after that. You end up with five hello-world projects and nothing to show. Depth in one stack beats a little of everything.

Watch the lesson

Backend languages and frameworks · 1/6

Many languages One job

There are many backend languages. The good news: they all solve the same problem in the same way.

Prefer a video by a teacher? Find free videos on “which backend language should i learn node python java go comparison” on YouTube ↗

In real life: Two friends, two stacks, the same job skills

Asha knew JavaScript from building college websites, so she learned Node.js with Express and built an attendance API for her college club. Ravi had used Python for data work, so he built the same kind of API in FastAPI. Both learned routing, SQL with PostgreSQL, password hashing, JWT login and deployment. Later Asha joined a bank's IT team that uses Spring Boot. She needed about a month to get comfortable with Java syntax and annotations, because the ideas (routes, status codes, transactions, tests) were the same ones she already knew.

Practice (0/2 done)

Task 1 · Code · Javascript

Write the hello endpoint as a pure function handle(request). request has method, path and query (an object). For GET /api/hello return { status: 200, body: { message: "Hello, <name>" } }. If query.name is missing or only spaces, use "friend" (trim the name). For path /api/hello with any other method return { status: 405, body: { error: "Method not allowed" } }. For any other path return { status: 404, body: { error: "Not found" } }.

Task 2 · Practice

Compare two backend stacks you are thinking about (for example Node.js + Express and Java + Spring Boot). Read at least 10 job posts for each in your city or for remote roles, then write a short comparison and your choice.

Quick quiz

Question 1

1.In the six hello examples, what stays the same?

Question 2

2.Which stack is most often asked for by banks and large IT services companies in India?

Question 3

3.What is a backend framework?

Question 4

4.You know JavaScript from frontend work and want a first backend job. What is a sensible plan?

Question 5

5.You move from Django to Spring Boot. What will you mostly need to learn fresh?

Read more (free)

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

← Previous: System design: planning a big backend