Why we migrated from Flask to Dango
This article is not about the differences between Django and Flask. Each one has its own advantages and disadvantages. This is the story of our migration.
We built the PoC with Flask. We were happy. Flask is an easy framework to start with. You only have what you need in codes. No extra codes for unused parts. We coded the idea, it was working.
Then we planned to build our MVP with Flask. We hired developers. We got users. But we were not happy. Because our app started to get complex with each feature. We had more bugs and debugging a Flask app was not easy. We dealt with meaningless error messages. Each developer has their own way to code. And Flask doesn't force developers to follow a structure. Developers are free and freedom costs us bugs.
The Flask is minimal and open-ended. Django is very structured. If you have a developer team (in most cases, yes), you need coding standards. Django really helps you.
Django ORM and SQLAlchemy are quite different. SQLAlchemy is mysterious in some ways. When relations between tables get complex, you need to add custom things in SQLAlchemy. Welcome new bugs!
Flask has its own built-in web server which is only intended for development. I mean, really. It can't handle a bunch of active users.
It is inevitable to need a library that does something you need. You will find a Django library. I am not sure that you can find that library in Flask. Even if you find one in Flask, it is not maintained. And Flask libraries are built in their developer's method, you can't be sure if the best practices are applied.
We decided to migrate to Django. We couldn't use most parts of the existing codes. We spent one and a half months. But we are faster with Django. I think we earned what we spent.
If you are hesitant to migrate from Flask to Django, do it! You will not regret it. But don't expect a magic wand.
Did you find this article valuable?
Support emre mert by becoming a sponsor. Any amount is appreciated!