DEV Community

Discussion on: Re-Doing the Django Tutorial With FastAPI And React: Building the CRUD endpoints!

Collapse
 
jbrocher profile image
JB

Thanks for reading :D !

Yes I agree, we would be able to achieve exactly the same architecture with DRF, it's actually one the default stack of my team !

At, the end of the day, I think the answer to the question "is Django monolithic ? " is, as with every question in web development: "It depends". It's probably more of a question of "how monolithic is it, and does that suit my use case ? ". You can build a microservice architecture with Django, as you could render HTML and static pages with FastAPI (wouldn't advise it tho ;)).

However Django's ORM, templating engine, Authentication models an so on are designed to work together. Take validation for example, DRF has to move away from the Django's default of partially handling it on the model, and move everything into serializers. Same thing with Authentication. Plus DRF is not stock Django, which means if you're building an API, you have to install an additionnal dependency, on top of all the Django code you won't be using.

So you're right, saying that "Django is a monolithic framework" is a bit flawed ! But it's a shortcut I allowed myself to take for the sake of brivety, as concisness is not my strong suit to begin with (As you might have gathered from this comment haha.)

I'd say Django defintely is MORE monolothic than FastAPI tho !