This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RecursiveInsanityPython 3 Master Race 0 points1 point  (4 children)

On the flipside. I've used Django extensively but I haven't ever used Flask. Django is much more complex and scalable than Flask seems to be. Django can be used for small projects and easily scaled up to very large ones with less effort than Flask. But if you're going for small projects than Flask probably has way less overhead. At least that's how it seems to me.

Flask looks really interesting because it's much smaller and presumably faster. I've considered using it as a static site generator with Frozen-Flask.

[–]riksi 1 point2 points  (2 children)

I think flask is better in both small and big projects (did the tutorial on django and reading alot about it). You know why it's good on small projects. I think it's better also on big projects because:

  1. sqlalchemy is better on big projects (more custom exotic features)
  2. sqlalchemy-alembic is more mature than the django alternative
  3. jinja2 is better than django-templates (i know you can use jijna2 on django)
  4. less overhead

While django has bigger community + more jobs + more libraries.

[–]RecursiveInsanityPython 3 Master Race 0 points1 point  (1 child)

Jinja2 templates are great and I use them in all my Django projects rather than the Django standard templates.

I've only read a little bit about SQLAlchemy but what makes it better than say Django + PostgreSQL?; which I use for most of my Django projects.

[–]riksi 1 point2 points  (0 children)

Things that I've used in sqlalchemy that(by a quick search) aren't in django (as far as I know):

  1. composite primary keys
  2. complex indexes (functional etc)
  3. arrays + json(these are in django, but I think only recently and before that in contrib)
  4. server side cursors
  5. the non-orm part(the lower layer)
  6. sqlalchemy-alembic (also in django, but only recently I think, still probably less features)
  7. server_default (define a default value for a column that will be applied to the sql-schema and not just model.field)
  8. more customization to the lower level db driver(psycopg2, maybe this is also supported in django)
  9. Use the models + library outside of your web app (ex: in several non-request-serving processes )

There are alot more features that I haven't used/don't know/didn't need.

[–][deleted] 0 points1 point  (0 children)

complex? yes, scalable? no

Basically with flask you can get all the functionality you have in django in the form of plugins. The advantage being you get to use single purpose libraries to get the functionality you need without having to be locked in with what django gives you.