r/AskProgramming • u/linuxxlaptop • 4d ago
Other What language should I use for my app's backend?
Hi!
I'll try to keep this short:
I'm going to start building a social media-like app for my university and I'm wondering which language i should use for the backend.
The frontend will be typescript, react native + expo (unless I end up switching it for some reason).
For the backend I'm between python and typescript + nestjs.
If you want more context, I'm studying computer engineering, I'm halfway through my studies, and I've already build two other big apps, one for desktop and one web app, so the size of this app is not a problem don't worry.
The idea of this app is to have class notes, discussions, news, etc. all in one place, and also add some instagram-lime entertainment (allowing the users to upload pictures and stories). I know it will most likely not blow up or anything like that, again, don't worry, i just want something fun to build. Also if i see a oart of the idea isn't good I'll just scrape it.
The main reason as to why I'm building this is because I want to learn new things during summer and try coding more by myself than with AI. I want to practice things i saw in class but we haven't really implemented. I also want this to add to my resume and i think having a full stack app will do the job.
Now, my options for the backend are python because it's the one i know the most and i want to learn even more, and typescript because chatgpt (yes, i know. Sorry) told me it's a good option for the frontend and if i use it for the backend ill be able to share types and a few other things. One con is that I don't know typescript but ill learn it anyway for the frontend.
I'll use typescript for the frontend because i want the app to be available on android ios and web and ts works for all three.
I think I'm not missing anything of my mind-dump here.
Then, should i use python, ts, or another option?
Thanks
12
u/PrizeSyntax 4d ago
Write everything in assembly
3
u/enozero 4d ago
If your goal is to learn new things, then if you already know Python, then you're not learning much except a some libraries. Programming a backend in Javascript/Typescript vs a frontend is vastly different.
I'm not going to tell you which one you should use. You have to put on your big person britches and make these decisions in your life.
3
u/ZubriQ 4d ago
Language that market pays most (maybe). So its usually C#, go, python, Java.
2
u/Coolfoolsalot 4d ago
Look up jobs in the place(s) you want to work. Look at what language they use for their backend. Use one of those
2
u/UhLittleLessDum 4d ago
If you want to land a job, learn to work with Java. If you want to be modern, do it in Rust.
2
u/MattDTO 4d ago
Java is way more industry standard for backend on serious projects. But you can build a backend in basically any language
1
u/mattynmax 4d ago
You have a plan for how you’re going to store all your user info?
1
u/Delta-9- 4d ago
Gonna agree with others that if your goal is to learn more, TS for the back-end gives you a bigger opportunity. You'll definitely still learn things even if you go with Python, but not switching languages depending on which side you're working on at the moment will accelerate learning TS by keeping you focused on one language. Technically, TS runtimes are often faster than Python, too, so if you want higher performance for cheaper hardware, there's that to consider.
Here's a fun alternative: Rust for the front- and back-end. Frameworks like Yew borrow from React the idea of having an html-like DSL embedded into the host language and then compiling to HTML and JS. I can't really give "good" reasons to do that instead of TS, since the technical advantages of Rust probably won't matter unless your app actually blows up and needs to scale—but even then, TS isn't exactly challenged in that department as far as I know. Rust is just cool and worth learning, imo, so why not?
1
u/ResistPast3564 4d ago
1
u/Chocolate--Chip 4d ago
Java
1
u/AdhesivenessFew8441 3d ago
With React Native and Expo on the front, I would pick TypeScript on the backend too, with Node and something like NestJS, Fastify or plain Express. One language across the whole app means you can share types between client and server, and people on your team can jump between both sides. Honestly, the language matters less than three decisions: a solid relational database (Postgres), a real auth solution so you do not roll your own password handling, and a place to store images and media outside the database (S3 or similar). For a social app you will soon want push notifications and maybe a realtime feed or chat, so check that whatever you choose has good libraries for those. If you want to move fast, Supabase or Firebase give you auth, database, storage and realtime out of the box, and you can add your own API later for the parts that need custom logic. I have shipped apps with Laravel and with Firebase and both work; the best choice is the one your team can still maintain after the first semester.
1
u/the_duke_man 3d ago edited 3d ago
I tell new devs that language is just syntax and can be Googled. Design the software, business logic, data storage, figure out what needs to be done and choose the language that supports those things best.
1
u/Away_Ranger_6458 3d ago
Since your frontend is already TypeScript with React Native and Expo, going with TypeScript + NestJS on the backend is a great call. You get to share DTOs/types between client and server, avoid context switching between languages, and NestJS gives you a clean modular structure (auth, posts, media uploads) out of the box. Python is great too, especially if you want to add ML features later, but for a solo social app, one language end-to-end will let you ship much faster.
1
u/sai_8303 1d ago
backend language choice matters less than ecosystem fit ,since libraries, hosting cast and hiring shape the project more than syntax differences between mainstream options.Bootdev could help build the programming base before that choices locks in though starter projects in two languages also work
0
u/VariousOil3936 4d ago
Use ts for the backend too. It’s the same language but a different runtime (browser vs node) and if you are doing more than something purely superficial you’ll learn things. Be sure to put them in a monorepo together (key advantage over keeping them both in ts) and you’ll learn more. Bonus, add infra as code to the monorepo too
-1
u/romanthedev 4d ago
Expo + Nestjs (it's great framework)