Disadvantages of Flask

Flask is a micro-framework written in python. Flask is based on the Werkzeug WSGI toolkit and Jinja2 template engine. It is called a micro framework because it does not require tools or libraries. Flask supports various extensions that can add additional functionalities. Few applications that use flask are

  1. Pinterest
  2. LinkedIn
  3. Community web page of the flask

Disadvantages of flask

  1. Not suitable for big applications.
  2. Community.
  3. Full-Stack experience.
  4. No admin site.
  5. No login or authentication.
  6. ORM.
  7. Migrations can be difficult.

These disadvantages are based on comparing flask with Django. Django is heavy-weight, whereas, with Flask, you have to build everything on your own.

Not suitable for big applications

Each project can be a single application, however, multiple models and views can be added to the single application. Whereas Django allows users to divide a single project into multiple small applications which makes them easy to develop and maintain.

Community

Django has been around since 2005; Flask kept its foot in 2010 — about 5 years later. At the time of editing this article, Django has 244615 questions on StackOverflow whereas the flask has 40800 questions.

Full-stack experience

No admin site

The admin site enables us to create/view/edit and delete records from the database. We can also customize this admin site to add filters, search fields, and sorting to the database records.

Django admin site

This is how the Django admin site looks like. My database has a table called a book. I can view/edit/delete/add records to my table right from here. The admin site is one of the things I most like about Django. This prevents us to access our records and perform operations on them without having to write lines and lines of queries.

No login or authentication

Django has inbuilt functionality for login mechanisms. We can use the default User table from Django to create users, set passwords, and much more.

ORM

By default Django supports ORM. Let us say I have a table called student. If I want to get all the records from the student table, I can simply do something like this in Django.

student.objects.all()

This will give me all the records from the student table. This is equivalent to the following query in SQL.

SELECT * FROM student;

Since this is a simple query it will not make a big change. But you get the idea right? Complex queries can be easily written using ORM. Of course, flask lacks this feature too.

ORM in Django

Migrations can be difficult

In conclusion, Flask is not actually that bad. All the features of Django can be obtained here with some additional work. The only disadvantage is that there is no direct way to access some of the best features of Django.

Conclusion