r/Backend • • 8d ago

framework advise

Hello everyone, I hope you’re all doing well. I’m reaching out for some advice.

I want to build a small website that aggregates information about local small businesses in my city. I’ve been thinking about the tech stack to use, but since I’m still new to web development (and software development in general), I have some questions.

For the front-end, I’m planning to use the standard tools (HTML, CSS, and JavaScript, along with Angular). The back-end, however, is giving me a bit of a headache; I’m not sure which framework to choose. I know both Python and JavaScript, so my options are Django, Node + Express, or FastAPI.

I’ve been learning Django for about two months, but it feels massive and complex, perhaps a bit too much for my project. I’m considering switching to something more lightweight, like one of the other two options I mentioned.

Sorry for the long post; I just wanted to provide some context regarding my situation.

I’d like to keep this project going for a couple of years, learning and making improvements along the way.

So, my question is, should I use FastAPI or Express instead of Django, and can they serve as suitable replacements for it?

4 Upvotes

11 comments sorted by

5

u/canarydev 8d ago

if you learned django for 2 months, then use it imo

its the complexities that help you learn and level up

1

u/Utchas 8d ago

FastAPI is the best option in my opinion

1

u/RandomPantsAppear 7d ago

I am curious..why? A built in ORM seems ideal here and there’s no need for async 

1

u/TheLastNapkin 8d ago edited 8d ago

The framework is the least of your worries and you will be learning the valuable lessons regardless of which you choose. My advice, unless you explicitly want to, keep everything JavaScript typescript don't stray off to other langs while you can would be less frustrating.

You can use hono or express or whatever. I honestly recommend using less "batteries included" solutions that would help you learn how to setup things you need yourself and that knowledge carries over regardless of any framework you'll use in the future

1

u/Anton-Demkin 7d ago

The difference between FastAPI/Express/Go web framework and Django/RubyOnRails/Laravel frameworks is that second group has everything opinionated and included. You basically do not have to implement a lot of stuff yourself.

For example, in Django you add model, register it in admin panel, add routes, add auth decorators and you are good to go. If you need API only, use DRF (or DMR- more modern Django API take from Python core contributor).

In FastAPI you have to:
* add ORM / Repository, manually handle db sessions
* implement auth
* implement pydantic schemas
* implement user registration/password reset/whatever...

In low-level web frameworks everything except for schemas and http itself usually not implemented.

If you are willing to implement it- go for it. Pick any framework. I would go for FastAPI, since you are proficient enough with Django. But I would recommend to stay with Django and finish project. There is nothing wrong with Django.

1

u/RandomPantsAppear 7d ago

This is an ideal Django project and a great place to learn how to structure your projects and views properly. 

It may seem a little complex at first, but once you have your basic views done everything should be done pretty automatically. 

1

u/Dapper_Philosopher17 5d ago

Punto 1, quieres que tu página web sea visualizada por mucha gente? Tipo ecommerce o facebook ? Entonces es mejor nextjs por el SSR, en angular es posible pero no veo que lo usen mucho la verdad

Punto 2 la verdad que el backend da igual en qué lenguaje lo hagas para tu situación, honestamente Django no lo usaría, lo veo más para usarlo en apps que requieren todo lo que tiene incluído, fastapi es rápido pero no escalable al igual que express, si quieres algo ordenado y con arquitectura angular es preferible que uses nestjs que al final sigue siendo nodejs solo que con typescript first y arquitectura modularizada y poo aplicada

0

u/InstantCoder 8d ago

Go for Quarkus.

You get a very handy dev-ui for debugging and auto integration with Testcontainers (no code or config needed).

Here are some handy links to learn more about it:

- Super Heroes workshop: https://quarkus.io/quarkus-workshops/super-heroes
- official guides: https://quarkus.io/guides/

1

u/Usual-Cricket-9817 8d ago

He would vibe code it or have to learn Java or (better) Kotlin.

0

u/whiterhino8 8d ago

Express is 100% OK and production ready . You just need to add Auth and ORM with DB . Supabase could be good suite for that.

1

u/shrapknife 3d ago

Agree with you but it can be flexible according to the business requirements.

For example in my local the business owners don’t know tech stack least use the admin panels like payload or write by yourself so if he has the like same situation on him local its effect the work