|
|
|
|
|
by bliti
3743 days ago
|
|
Over the years I've used Flask for smaller projects with very specific requirements and simple web GUI requirements. Its my de-facto tool to prototype and/or deploy JSON APIs. It works perfectly for that because it does not impose anything on me. For more complex projects, or projects that use a web GUI (even if they are rendered with client side frameworks) Django proves to be more effective. It has a standard toolset that takes care of a lot of the edgecases one would face. For example, Flask lacks a default CSRF implementation whereas Django makes explicit use of one. Logging is also very simple with Django, something that gives some people grief. In Flask you have to setup logging from the bottom up. Both are quite different but good for what they were meant for. In fact, I tend to look for the Django or Flask of other languages to try and see how a specific type of application with look in that language. Not long ago someone posted a project that mimics flask in Rust. It was a very nice codebase and it made Rust very approachable because I could map what I know about Flask over to Rust and make a connection between language constructs and patterns. |
|