4 ms·
Glad to see Flask surpass Django, it's always been my favorite web framework regardless of language and forces users to learn their style of software architectu
by Beefin 6y ago
Glad to see Flask surpass Django, it's always been my favorite web framework regardless of language and forces users to learn their style of software architecture. I personally prefer MVC: https://github.com/esteininger/flask-mvc-boilerplate https://github.com/esteininger/flask-mvc-boilerplate
- ergo14 6y agoSure, just be sure to avoid threadlocals and pass them around explicitly!
- Beefin 6y agothreadlocals = app.context ? Agreed, but that's the beauty of Flask you can just pass around the request context.
- ergo14 6y agoflash, g, redirect, render_template, request, session etc. Ideally request would be passed to view callables and would not be global. That is completely incompatible change so we will never see that I guess :(
- vorticalbox 6y agoI have always enjoyed sanic for my python apis https://sanic.readthedocs.io/en/latest/ https://sanic.readthedocs.io/en/latest/
- nojito 6y agoAll large flask implementations eventually turn into a crappy version of Django.
- stonecharioteer 6y agoI prefer Flask and I agree. However there is a big difference. If you learn how to turn flask into that crappy version of Django, you will thank yourself because you know what choices the Django Devs took. You will know what each section of a Django project is, and why it is that way, or how you can make it follow something nonstandard. I have interviewed plenty of flask and Django Devs, and usually, the Django Devs reply to some of my questions is usually "that's how Django does it" That is a poor, poor answer.
- stonecharioteer 6y agoOh god. I would not recommend that git repo to anyone. It is doing a lot wrong. Look at exploreflask.com for a great example on how to structure production grade flask applications. Read the flask docs, the later sections deal with the create_app factory function and how to use it. It is really good in that sense.
- BerislavLopac 6y agoI was happy to see that Tornado is quite stable in the third place; it's probably the best Python framework currently in existence. Personally I have been moving to Starlette, but it's still far from Tornado's stability.