19 Comments
Dec 11, 2023Liked by Bite Code!

Why haven't you written this 12 months ago? I started a project which in the beginning was a simple one (and of course I went with Flask - bang bang one file, a few routes and I got my website up and running) and now after 12 months of Flask development, I ended up with a huge pile of mess. I did use factory setup and blueprint and all that organizational recommendations but I still ended up with a Behemoth of an app that powers everything. So yes, I think you are right, if I would have to start this over again I would have gone with Django. Thank you for the article tho :) - this confirms what Iw as thinking in the beginning :).

Expand full comment

Beginners should not use Django or Flask at all. They should use Anvil instead. Fun from the beginning. Learning curve in days, not weeks! Check it out. In the free version you can accomplish a lot.

Expand full comment

As an intermediate developer writing his first web app, I spent a fair amount of time trying to decide between Flask and Django. In the end, as a beginner, Django's batteries included approach won the day. Sure, set up is more involved and a certain amount of under-the-hood knowledge is necessary to really make Django sing, but the built-in security features made it more than worth it for me. I had to learn Django, not Django and multiple 3rd party libraries.

Expand full comment
Nov 16, 2023·edited Nov 16, 2023

Not tried

Py4Web?

Py4Web.com

Expand full comment
Nov 15, 2023Liked by Bite Code!

Yeah. One other thing - Django's documentation is just outstanding.

Expand full comment

Yeah, for a proper webapp, Django is great. Flask ha all these blueprints and other methods, but I could never understand them (and it was easier to just read Django docs). People say Flask extensions are easy to use, but I disagree-- the very 1st step, choosing which ext to use is itself a pain

I will disagree with you on one point-- you are talking about webapps. Maybe its the backgound Im in (Test Automation, mainly in hardware firms)-- but there have been many times we wanted a simple web frontend for internal data,, and Flask is perfect for that. just 1-2 pages that displaysome metrics. These are internal apps so we never cared about usernames or databases-- at most a simple hardcoded password.

FastApi, in case anyone mentions it, is built on the hype and farts of unicorns

Expand full comment

This is great advice if you're getting into web development and plan to expose a website to a public/semi-public audience.

I feel the value proposition may tilt in the other direction towards Flask/FastAPI (especially the latter), if you're attempting to write code to expose an API (eg for a microservice) but don't plan to include a website. Thoughts?

Expand full comment
Nov 15, 2023Liked by Bite Code!

Couldn't agree more. When I first started working, I didn't understand why other coworkers were using a framework as versatile as Django in their projects, I chose to use flask and like you said gained extra scars. Over the years of working, I've also seen a lot of people use flask to build projects that are difficult to maintain (most notably ORM, which simply doesn't have a robust ORM extension in flask)

Expand full comment
Nov 14, 2023Liked by Bite Code!

Agree 99%! Django is great framework to start building things. It is daunting at first, but if you starting with tutorials and docs you will have no trouble.

I would add one more thing for beginners that is very useful to do - dig into Django internal code! Use IDE tools to go deep into functions. Read the code. Read the functions docs and looker for other usage of same functions across the internals. It will be super learning experience about how to write great code, how Django works. This knowledge will carry on to future projects and will make you awesome dev!

Expand full comment
Nov 14, 2023Liked by Bite Code!

I agree it's the place to start. I started with Django back in 2006 when it was version 0.9-something, occasionally experimented with the other frameworks. For the last couple of years, the toy projects I spin up for myself and friends these days are simpler and I do those with Flask, Peewee, SQLite, and APSW.

Expand full comment

This is correct. Micro-frameworks are the way to go once you know what you are doing. Like *really* know what you are doing. You will be building a "mini-Django" for each project with Flask (or Quart).

It's repetitive, it's time-consuming, but it will give you a lot of control, and it will matter a great deal once the project grows to a size where a framework like Django stops working for you and actually starts being in the way.

Expand full comment