Anteru's blog
  • Consulting
  • Research
    • Assisted environment probe placement
    • Assisted texture assignment
    • Edge-Friend: Fast and Deterministic Catmull-Clark Subdivision Surfaces
    • Error Metrics for Smart Image Refinement
    • High-Quality Shadows for Streaming Terrain Rendering
    • Hybrid Sample-based Surface Rendering
    • Interactive rendering of Giga-Particle Fluid Simulations
    • Quantitative Analysis of Voxel Raytracing Acceleration Structures
    • Real-time Hybrid Hair Rendering
    • Real-Time Procedural Generation with GPU Work Graphs
    • Scalable rendering for very large meshes
    • Spatiotemporal Variance-Guided Filtering for Motion Blur
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
    • Towards Practical Meshlet Compression
  • About
  • Archive

Advent 2021: Flask

December 10, 2021
  • Programming
approximately 1 minutes to read

This blog is part of the 24 posts long series "Advent 2021":

  • Advent 2021: Intro (December 01, 2021)
  • Advent 2021: C++ (December 02, 2021)
  • Advent 2021: C# (December 03, 2021)
  • Advent 2021: Python (December 04, 2021)
  • Advent 2021: Go (December 05, 2021)
  • Advent 2021: TypeScript (December 06, 2021)
  • Advent 2021: CMake (December 07, 2021)
  • Advent 2021: Django (December 08, 2021)
  • Advent 2021: Angular (December 09, 2021)
  • Advent 2021: Flask (December 10, 2021)
  • Advent 2021: gRPC (December 11, 2021)
  • Advent 2021: GraphQL (December 12, 2021)
  • Advent 2021: XML & JSON (December 13, 2021)
  • Advent 2021: Matplotlib, Pandas & Numpy (December 14, 2021)
  • Advent 2021: Linux (December 15, 2021)
  • Advent 2021: Ansible (December 16, 2021)
  • Advent 2021: SQLite (December 17, 2021)
  • Advent 2021: Catch2 (December 18, 2021)
  • Advent 2021: Zstandard (December 19, 2021)
  • Advent 2021: ZFS (December 20, 2021)
  • Advent 2021: Thunderbird (December 21, 2021)
  • Advent 2021: Visual Studio Code (December 22, 2021)
  • Advent 2021: Blender (December 23, 2021)
  • Advent 2021: Open source (December 24, 2021)

Having talked about my favorite combination of web frameworks – Angular for the frontend and Django there’s still one more thing I want to cover on the web framework side: Flask. For “serious” web development, Django has been my default choice, but I did end up with several Flask applications. In some cases, I already had a database layer written in SQLAlchemy, so porting that to Django would have only taken time and using Flask meant I could use it with no changes.

Flask is a “micro” framework and excels in those “I really need to get something running right now” cases, more so if you’re working with others who may not be familiar with Django, as Flask literally allows you to get up to speed with a single file. It also comes with very extensive documentation that covers plenty of “real-world” problems that you might run into.

In my experience, Flask also excels at being highly modular yet never feeling like a set of disjoint pieces. I had one case where I started with Flask and had to grow the application relatively quickly by adding a proper ORM, integrate with a task queue, and replace the HTML templates with a REST interface that was driven from an Angular SPA. Even though that resulted in significant changes to the application, I never ran into issues with not being able to make a change because components would stop working or something. This ability to scale is welcome if you’re just starting out and you don’t know very well where you’re going. The REST API in particular was interesting – I had to change all page templates to produce JSON, and this was something that I did right within Flask. If you’re occasionally writing some web tool, and you want to get something up and running within an hour, do give Flask a try!

Previous post
Next post

Recent posts

  • Data formats: Why CSV and JSON aren't the best
    Posted on 2024-12-29
  • Replacing cron with systemd-timers
    Posted on 2024-04-21
  • Open Source Maintenance
    Posted on 2024-04-02
  • Angular, Caddy, Gunicorn and Django
    Posted on 2023-10-21
  • Effective meetings
    Posted on 2022-09-12
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

Anteru NIV_Anteru
Contents © 2005-2025
Anteru
Imprint/Impressum
Privacy policy/Datenschutz
Made with Liara
Last updated October 01, 2023