4 ms·
Ever tried using SQLAlchemy with Flask? It's exactly the same situation: either you luck out, and someone already wrote all the conveniences and utilities and
by ubernostrum 9y ago
Ever tried using SQLAlchemy with Flask?
It's exactly the same situation: either you luck out, and someone already wrote all the conveniences and utilities and integrations with components for you exactly the way you want them with exactly the set of other components you wanted, or you do it yourself.
Also, you could make a similar argument about swapping major components into, say, Pyramid. Most of the alternatives people promote to Django are not really some paradise of trivially-swapped-but-tightly-integrated components. They just do exactly what Django does, with a different set of "use these or lose the integration" components chosen up-front for you.
- hakanderyal 9y agoI've used SqlAlchemy with Flask. You only need a few lines of code to integrate them. But yes, with Flask (or similar frameworks/libraries), you need to do the integrations yourself with the components you want to use. Advantage of Flask in this regard is, you don't need to fight with Flask to make it happen. That's why I'm saying it's better suited for complex apps that you want to build with your own abstractions. The real problem is the cargo cult thinking when it comes to frameworks, instead of doing a cost/benefit analysis and thinking about trade-offs. Following statements like "Django for complex apps, Flask for 100 lines of apps" without researching the reasons behind probably will result in more problems in the future.
- ubernostrum 9y agoYou only need a few lines of code to integrate them. Really? So you got all the things you get in Django -- ORM, forms with validation, etc. etc. -- from "a few lines of code"? Somehow I think that's not true.