DEV Community

Discussion on: The Easiest Possible Way to Throw a Webapp Online (Flask + Heroku + Postgres)

Collapse
 
jvarness profile image
Jake Varness

Out of genuine curiosity, in your opinion, what separates Python and Flask from Rails or Amber (a Crystal web framework)?

I feel like all would be extremely simple ways to deploy heroku apps, so as someone who doesn't write much Python I'm just wondering what your opinions are.

Collapse
 
paultopia profile image
Paul Gowder

Across languages, I would think that Flask would be most comparable to something on Node, like maybe Express.js---just a super-lightweight "here are some tools to define routes and responses, go to town" kind of a framework.

Collapse
 
jvarness profile image
Jake Varness • Edited

That's useful info. Good comparisons! Thanks for the input! I might need to try this out myself

Collapse
 
paultopia profile image
Paul Gowder

I know nothing about Crystal---but with respect to Rails and such, the comparison I usually hear is that Django is the Python web framework most comparable to Rails. If that's right, then the difference is really going to be about batteries-included (and the price of that being a high learning curve) vs minimalism and a learning curve of basically zero.

Fundamentally, if you know Python, you can get a useful Flask app up within 15 minutes of glancing at the documentation for the first time. It won't be able to do a lot, but it'll at least be able to take a request, handle the data sent to it, and return an appropriate response. And if you want to do something else, like say talk to a database, you don't need to learn a special Flask way of doing it (there's nothing like Django's built-in ORM), it's just the database tools you already know.

Most of the Flask add-on libraries out there seem like just thin wrappers over existing libraries. Like Flask-SQLAlchemy is basically just a couple convenience functions.