π»Lead Software Engineer at an Eco-Responsible Company β»οΈ |
π Tech Blogger & π οΈ App Builder |
π Always Thriving to Share more Knowledge
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 !
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 !