Live data from Hacker News

Comparing Python frameworks: A simple webapp in Flask, web.py, bottle, juno ...

agiliq.com

31–33 of 33 posts

Re: Comparing Python frameworks: A simple webapp in Flask, web.py, bottle, juno ...

#31

web2py deserves a place on the list. I've found it to be more productive than django.

that project's choice of name, web2py, drives me apeshit. i much preferred it when it was called gluon.

web2py both (a) sounds way way too much like web.py, which predated it, and (b) it sounds like it's a successor to it -- which it is not, and (c) sounds like it's a conversion tool of some kind (following the whole "foo2bar" pattern in program naming).

Whereas 'gluon': some small thing which binds the universe together. And it has personality!

Re: Comparing Python frameworks: A simple webapp in Flask, web.py, bottle, juno ...

#32
post #4

FWIW, I've been using Flask. It seems to be the one having the most traction and support these days. But I think frameworks are not that important. I use Flask mostly for its HTTP request handling functionality. But everything else is my own (e.g., the overall setup, configuration etc). I think what's most important is understanding that loosely coupled components are the way to go. Know how your scripting language l…

I personally see django vs flask (or other microframework) as this:

- Use a framework that has adequate components that are well integrated and quick to get off the ground, but where you might hit snags with the bundled components later and have to monkey patch them to continue working within the framework.

- Use a micro-framework where you can choose to glue in excellent components (SQLAlchemy, for one) at the cost of the time spent writing glue code.

I personally really like django. Even though it is considered monolithic, I agree with a lot of design decisions and a lot of the components are "just the right amount" extensible. Most of the third party apps that I use work well.

That being said, I'm using flask now and enjoying it :) I hit a snag pretty early with django's ORM [1] and couldn't figure out a way around it other than raw SQL. SQLAlchemy's flexibility won out in the end. I chose flask over other micro-frameworks because of its documentation, extensions, design decisions, mailing list seemed active etc.

Now that I have switched from django, I'm really enjoying the flexibility of picking up 3rd party modules (or flask extensions) and using them instead of having the decisions made for me. It is very marginally more work than django.

[1] Query multiple tables (books, cds {subchildren of products}) for products that were updated in the last month.

Using an abstract base table (products), django's ORM required multiple trips to the DB. Using a concrete base table meant that getting any single product would require a join. SQLAlchemy handles this scenario with unions.

Re: Comparing Python frameworks: A simple webapp in Flask, web.py, bottle, juno ...

#33

web2py deserves a place on the list. I've found it to be more productive than django.

that project's choice of name, web2py, drives me apeshit. i much preferred it when it was called gluon. web2py both (a) sounds way way too much like web.py, which predated it, and (b) it sounds like it's a successor to it -- which it is not, and (c) sounds like it's a conversion tool of some kind (following the whole "foo2bar" pattern in program naming). Whereas 'gluon': some small thing which binds the universe toge…

Yeah, I also prefer gluon. It had to be changed due to a copyright issue from what I gather. That said, I could give a hoot what a framework is named if I get work done quickly with it :)
Post reply on HN