4 ms·
> ...Flask is pretty good. By it's nature, it's not a framework for new web developers... Curious (and no experience web dev-ing here), why not? Flask and Bott
by bsg75 13y ago
> ...Flask is pretty good. By it's nature, it's not a framework for new web developers...
Curious (and no experience web dev-ing here), why not? Flask and Bottle seem "minimalist", which in my thought process means less stuff to worry about to start simple apps in.
This logic could of course be upside down - less framework = more code to write?
- tjr 13y agoI wondered the same thing. I've not used Flask, but perusing the documentation, it looks pretty similar to CherryPy, which is the only web framework I've ever used (and thus, my first). Django looked too confusing! :-)
- MostAwesomeDude 13y agoNeither. Flask presumes that you know Python and that you understand how requests and responses work. This isn't impossible for a beginner, but it's certainly not likely. Flask's main API is heavily based on decorators, and those are a perennial problem for new programmers.
- taude 13y agoWould new programmers have trouble using decorators? With writing them, yes. But I think the idea of "tagging" your function is pretty approachable for even a new-programmer type.
- rpicard 13y agoAs a newcomer I don't think I ever had much trouble with decorators. It took me a little time to understand exactly what was going on, but not too long. Even writing them seemed fairly straight-forward.
- taude 13y agoIt will vary what your definition of simple app is. Simple as in "doesn't do much", or simple as in "minimalistic for a real world use case", in which case session management, login, security, authentication/authorization, template rendering, data access, etc. are all going to be required. I say "mimimalistic for real world use" because I have yet to create an application that didn't include all these things (at a minimum). Of which, you need to be aware of, so you can choose the appropriate library for your application. Flask is like Legos in that you choose the pieces to build onto its minimalist stack. You can use if for lightweight prototyping or full-blown web apps. Since all these things "are a worry", it's probably best for new-comers to web dev to use a full stack that makes decisions for you, that has cohesive documentation across components, and a large contingent of users.
- 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?
- 13y ago