DEV Community

Discussion on: Django vs Express/Node which one would you choose and why ?

Collapse
 
soumyaranjannaik profile image
Soumya Ranjan Naik

Could you list down the pros and cons if possible so I can have some help in making a choice ?

Collapse
 
itscodingthing profile image
Bhanu Pratap Singh • Edited

I can point out some of things that I have encounter when I did some small projects with Django and Express/node in my college semesters. I would say that the comparison is more like Angular and React the famous frontend libraries (if you are not familiar then it's ok) both are great and both work very well but core difference is the how much control you want over your project.

Django has everything baked in already so you don't have to do much anything as your project grows or as other people said that it is opinionated means if you want to do some certain thing then you have to follow the guidelines or docs. Django has it's own way of doing things like it has it's own routing system, template engine, database integration and if you want to do some other thing you have to hack around or do some research on that to integrate to your build system.

Express for node is like Flask for python it gives you bare minimum things to start and then as your projects grows you have to add things on your own which means it gives you complete control over your project and leave you with your imagination.

As I said already it depends on the project for example if you want a website with lots page and a backend system or anything like that then Django can be very handy because then you don't have waste your time and just dive right into your work but if want something like a small API which give some kind of data rather a page or something then you can use express but if you want to do some API and stuff than you can also use FLASK as well because both the tools do the exact same work so I think it is safe to change the lib rather than change the platform to do same thing. You can do the same thing with Django as well but Django is super bulky and so much boilerplate and other things to just start the project it's like for a small nail you need Thor's hammer (sorry bad joke😂) but I think it clears my point.

Thread Thread
 
soumyaranjannaik profile image
Soumya Ranjan Naik

Thanks for the clarification 😊. It is super helpful.