4 ms·
I'll sound like a broken record, but I'm convinced Flask is the perfect transition. It's built for smaller web apps, and rapid prototyping. The system of mapp
by jmduke 14y ago
I'll sound like a broken record, but I'm convinced Flask is the perfect transition.
It's built for smaller web apps, and rapid prototyping. The system of mapping endpoints to functions is incredibly intuitive -- if you've used Python before, learning Flask is incredibly easy.
- RegEx 14y agoI love Flask: You just do things the way you want, written in Python. You're free to make your own (potentially stupid :P) decisions.
- leeoniya 14y agoi'm on PHP now as well. I would probably choose Bottle simply because it runs on Python 3 while Flask does not. I would go with Flask otherwise.
- eric_bullington 14y agoBottle is very cool, but Flask has far more plug-ins ("extensions") than Bottle does. Flask has nearly all the features that Django does, only they are in the form of dozens of separate extensions. In my opinion, this is a good thing. It's easier to understand the framework when you start with the basics and learn more as you add on extensions. I believe that Flask will move to Python 3 eventually, but at the moment I agree with the decision of Flask's creator (Armin Ronacher) to stick with Python 2.7. In the end, Python 2.7 is probably better for someone new to the language. There's more documentation, and it's still the default Python on most systems(although a few are starting to pre-bundle Python 3).
- AnIrishDuck 14y agoI just did a comparison of bottle and flask for my job. My recommendation: go with flask. Flask has a bigger community, more built-in functionality, some really cool tools (the debugging functionality is far better than bottle), and is essentially the same as bottle in all other respects that matter. As far as python 3 support is concerned: this is a minor annoyance, but it will probably be rectified by the time python 3 is relevant in production environments.
- wvenable 14y agoThe problem is, not all PHP apps are small rapid prototypes. If I'm going to migrate away from PHP, might as well go all in. Does that mean something like Django?
- jmduke 14y agoMost people recommend Django over Flask for larger projects. Personally, I've used Flask in bigger applications as well, and its a trade off -- Django saves you time with its app system, bundled ORM and MVC architecture, and the omnipotent admin interface, so you spend very little time reinventing the wheel. On the other hand, my raw speed of development is better with Flask (and I prefer Flask's debugging tools as well). That being said, for a 'big' project I'd recommend Django over Flask, if for no other reason than googleability -- if you run into a particular error or question, Django's community (due to size) is probably going to be more helpful than Flask's.
- j_baker 14y agoFlask is not built for smaller web apps. The idea of Flask is to build a good foundation for all applications. Everything else is up to you or extensions. http://flask.pocoo.org/docs/design/#what-flask-is-what-flask-is-not http://flask.pocoo.org/docs/design/#what-flask-is-what-flask... There's even an entire section in the docs about scaling your application up: http://flask.pocoo.org/docs/becomingbig/#becomingbig http://flask.pocoo.org/docs/becomingbig/#becomingbig
- jmduke 14y agoYou're completely right -- I phrased that badly. What I meant was that it lends itself well to small apps because the lack of code/architectural overhead, as opposed to Django, where coding small apps often feels like only furnishing one room in a five-bedroom house.
- j_baker 14y agoI would actually argue the exact opposite. Django is good for getting small, simple apps up and running quickly. It all gets overly complex very quickly when you need anything more than that. For a big app, it's better to start with something small that can grow to meet your needs rather than starting with something big that you'll have to fight to do what you need to do.
- jmduke 14y agoInteresting! I've never thought about it that way -- whenever I work with Django on a smaller scale I feel like I spend more time tweaking the framework itself rather than the actual app.
- deleted 14y ago[deleted]
- antihero 14y agoYep, I mean, I think Django is generally a better solution for the average website, as there are many site-related problems that the Django team have had many years to solve, as opposed to you re-solving them with Flask in a few months, however, then you have to learn Python and you have to learn Django. With Flask, you just have to learn Python, as Flask is so mindfuckingly simple.