Miguel Grinberg writes Python and Flask tutorials, plus posts on web performance, async Python, and generative AI coding tools.
Commenters recommend the Flask Mega-Tutorial as a hands-on way to build a real app, and some say they used it years ago.
In my opinion Java is great if you want to write big enterprise-y applications but if you just want to get something done or just learn some concepts I would suggest Python. You can do all the same things you can do with Java as a beginner and it will mostly stay out of your way. Python also doesn't require a build system like Java does. You can just write some Python in a plain old text editor and run it without too much trouble. Java on the other hand will require a build system and a full IDE.
IMO with all the other languages available Java just doesn't really offer anything special enough to warrant it's dealing with it's awkward type system and verbosity. Unless you want to do something with Java specifically like Android dev it just doesn't offer anything worth the pain. If want higher performance and the type safety that Python doesn't have I prefer Go. It's syntax is very similar to Python and it has some interesting concepts.
Whatever you choose don't choose based off hype/promises of jobs. Most companies will hire engineers who have never used the language(s) in their stack as long you can demonstrate knowledge of core programming concepts. Python's `list`, Java's `ArrayList` and Go's `slice` might have some slight differences in implementations and different warts and what have you but deep down they are arrays. If you are familiar with the data structures and algorithms core to programming you can learn to use any language to solve problems.
At the end of the…
Great topic. We sound a lot alike. I work in a different sector, but I'm also now squarely in management and have been for a while, and my previous expertise was data engineering and infrastructure. Started with zero front end ability, and also not much Python either since I'm in the size of company and industry that still accomplishes most data work in SAS, and what it can't, Informatica and DataStage. Here's where I'm at, and so as to not bury the lede, I'm not making money yet but I found satisfaction in just spending some time each week on my projects -
1. If you know python, you can probably make a pretty natural jump to Flask. I didn't know Python, but I could program in a handful of other languages, so I figured I'd pick it up as a useful tool anyway. You may like this tutorial:
https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
I'd say I really started learning when I got to the stage on authentication. The reason is that this tutorial implements OpenID, which isn't very common anymore, so I went off and implemented OAuth instead - heavily googling and scavenging, but ultimately having to piece together something that worked myself. I learned a lot that afternoon.
You could do this with any framework and there are tons of them. I chose Python and Flask over a Javascript-based framework because learning Python in parallel would be useful to me in data engineering, even though I don't write code for a living anymore.
2. As…
You work in Python & you want simple web interfaces?
Flask. Check out the docs, it's about as simple and pythonic as it's possible for "respond to this URL by executing that python function" to be.
http://flask.pocoo.org
Talking to relational databases is mostly handled through Flask-SQLAlchemy, which isn't much more complicated to get started with, but SQLAlchemy is very open-ceiling in terms of power and utility.
http://flask-sqlalchemy.pocoo.org/2.0/
Miguel Grinberg's tutorial is solid for a broader view of common app features, and will likely cover more than you'll need any time soon.
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
If you want to integrate JavaScript stuff, whether full apps or jQuery or D3.js or what have you, worry about that later - it might not be necessary, but it's fairly easy to bolt on if needed.
---------
JavaScript & CSS assets:
I use Gulp, which is a JavaScript build tool, to build my JavaScript & CSS assets. This isn't something you can pip and done, but it's probably worth the effort if you get to the point of having extensive JavaScript & CSS files. If that sounds like a hassle, use Flask-Assets.
Why? The JavaScript tools for dealing with JavaScript are much less of a hassle, and for whatever reason they also tend to have less fussy CSS asset builders. But this is mostly a "set up the script once & forget about it outside of letting it run" problem, so it's not really a hassle to use in place of…
1. This can be learned in one month.
2. Follow official docker docs, deploy tutorial containers.
- learn both docker, swarm and compose
- learn about networking, volumes and secrets (focus here, this is the most important part)
- take notes and don't spend more than a week on this
3. Then deploy some open source services based on docker, find them on github (i.e. azuracast). Spend whole week deploying docker stacks, find as complex as possible if you find it easy.
4. Now repeat the process for k8s.
- setup local stack (pick k3s or kind, don't overthink it)
- read about basic k8s concepts on the website (this should map to what you know from docker)
- deploy few basic containers (pods)
- then find k8s stacks on github to deploy
- take notes, week max
5. In the final week try to convert one of you docker stacks to k8s to learn the differences and to write your own charts. Dont rely on tools like kompose - do it by hand.
- here try to learn to write own charts
- if you have time left learn one of the cloud offerings (ie GKE)
Suggestion: If you know python try to deploy this for starters https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xix-deployment-on-docker-containers
I will take a well curated package that handles all the problems for me rather than bolting together pieces just so I can feel more ownership of a project.
- Admin panel? Django has me
- Web forms? Django has me
- Testing? Django, again has an out of the box solution
- Latest in security practices[0]? Again, covered for free
Flask, boy oh boy. I want an ORM? Guess I have to search around, Flask-SQLAlchemy has a lot of hits, I guess? Emails? Well, the Flask Mega-Tutorial uses Flask-Mail[1], guess I will use that. Oh look, it has not been updated since 2014[2]. Hope there is not a security flaw in there[3].
Django follows best practices, and has a huge community ensuring that there is adequate coverage and features required for modern development.
[0]: https://docs.djangoproject.com/en/4.2/releases/4.2/ note on the BREACH attack
[1]: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-x-email-support
[2]: https://github.com/mattupstate/flask-mail
[3]: https://github.com/mattupstate/flask-mail/issues/189
Maybe reverse-SEO would be good: list higher those sites with less SEO-complicance lol
I have an analogy:
I'm new to programming and have been trying to build a web app using python. I went through a lot of websites and youtube videos, and the most fancy-looking ones where more often than not incomplete or bad. When there was a video and the "youtuber" would hit me asking for subscription or like all the time, or fancy 3d animations etc, I would know quality of content itself probably wouldn't be very good. Not to my surprise, the best tutorial I have found features a guy with his webcam only, with nothing fancy at all - you might call it a sloppy "production", if you want, but it's far better than anything else I've seen! - and it was never a top ranked search for my queries oon google.
For anyone wondering, I'm talking about grinberg's mega-tutorial on flask (https://blog.miguelgrinberg.com).