r/Python • • Apr 26 '18

Flask 1.0 released

https://www.palletsprojects.com/blog/flask-1-0-released/
856 Upvotes

58 comments sorted by

View all comments

3

u/samsquamchh Apr 27 '18

Might not be the best place to ask, but I have a question regarding Flask and how up to speed it is these days. I was never particularly into web development, until I wanted to try a more easily accessible GUI for some small apps I was working on. I loved Flask from the start, but as I got myself more up to speed in the web dev world, I discovered that the "old way" of doing it is being more and more left behind by the world of single page apps and js frameworks built for that design approach.

As a result I got into vue.js and combined it with Flask, but I hit a bit of a wall there as from what I have learned so far, I can and should really use Flask just to serve json from the backend. Does that not cut off a lot of the convenient functionality and libraries of Flask that I got mildly used to before I decided to leap into the world of SPAs. Stuff like flask logins, wtforms and whatnot integrating well with jinja templates and making life easy for a python guy.

So the question is, is it actually possible to keep using the best of both worlds or is it true that Flask is not a good choice for modern web apps, at least not if you want to go the path of using some of the more modern js front end frameworks? If I'm completely wrong about this, could someone point out some resources or anything that would give me a better idea on how to integrate those two beyond the point of using flask just to serve some json from an api endpoint?

1

u/PaluMacil Apr 28 '18

I have never used Jinja templates with Flask. All my work has been either APIs consumed by other applications, Angular, or Knockout apps. Wtforms looks great, but it's just a different approach. If you've used both, you probably know the pros and cons of both approaches.

Even though it might seem like most people use some sort of SPA, that doesn't account for the huge numbers of legacy apps, Wordpress devs, and even some people are still making new Razor MVC apps in C#.

I don't think Flask is "mostly" a non-SPA app tool. Most languages people use for SPA apps are languages that also have well respected tempalting libraries as well.

2

u/samsquamchh Apr 28 '18

Hm. I quite liked the idea of continuing using Flask and python while also learning some more modern approaches with vue within the same project. I thought most of the appeal of Flask consisted of being able to essentially write your webapp in almost entirely python and being able to seamlessly use all of its capabilities and libraries for handling typical tasks like database management, user auths etc.

I was essentially hoping I can keep riding on my python skills and not have to get too serious with js, but guess I was wrong.