4 ms·
"Flask is like Legos in that you choose the pieces to build onto its minimalist stack." Very well said. "best for new-comers to web dev to use a full stack th
by codegeek 13y ago
"Flask is like Legos in that you choose the pieces to build onto its minimalist stack."
Very well said.
"best for new-comers to web dev to use a full stack that makes decisions for you"
I do not agree. When I started learning web dev. using python, I started with Django. As I moved along trying to hack a simple side project using django, I realized that I was just not understanding the "why" of many things. For example, I tried to create a simple user registration and needed my own fields on the user object. Playing around with User and User_Profile on django, I gave up after a few hours. When I came across Flask, I actually found it easier to do some of my own stuff to understand the whys and then i could always choose a vetted extension/plugin. For example, I wrote my own login system in flask and then switched to Flask-Login later. Btw, this is not about django vs flask but just giving a perspective as a newbie learner.
To newbies, my personal opinion is to understand the "whys" a lot more than just the "what". I actually think that flask is a better way to start learning because it will force you to think about the basics like sessions, user management etc. The more you learn why something works the way it works, the better you will become at it.
- rpicard 13y agoThis is just about the same experience that I had. If I'm recommending a framework to a new developer (as I recently did) I go with Flask all the way. You can start off with a simple one file app that serves your index, then when you realize, "Man, this file is getting unruly," you can switch to using modules. Then you think, "Man, I want my admin panel code to be separate from my user dashboard code," and you learn about Blueprints. The same goes for all of the plugins. You only have to add (and therefore learn about) the "legos" -- to use taude's metaphor -- that you need to build your spaceship.
- bsg75 13y agoIs this an advantage of Flask having modules over the single file Bottle framework, when apps evolve new features or use cases?
- rpicard 13y agoIs Bottle limited to a single file? I have never really played with it. If so, I'd definitely say that it's an advantage for Flask.
- bsg75 13y agoI believe it is: "Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library."
- rpicard 13y agoOh, so the framework is a single file. Your app can be multiple files though, right?
- taude 13y agoI think this is an advantage of Flask, as it can be semi-sanely used for bigger applications....though it's easy to start small.