I'm not sure relying on three frameworks (Django, Hotwire, Turbo) and two languages (Python, Javascript) is a more "modest" solution.
Python is my primary language, but there is a real benefit to "modern" web. More and more of my apps are 100% HTML/Javascript, static (deployed to Netlify) and rely on Hasura for the data layer).
If I really do need a backend, I create a small Python webapp just for that).
I have a complete opposite opinion of what simple means.
Flask + HTML + jQuery = Classic simplicity
Flask + HTML + Alpine/Stimulus/Vue = Modern simplicity. No need to install node at all on the backend is absolutely liberating. Managing JS dependencies is a complete shitshow, an absolute horror, it has scarred me so much, I hate it with every ounce of passion I have. I don't want it on my backend at all. So, I am liberated by the fact that I can serve highlight.js or whatever JS lib just as a static file and use Jinja/Django templates with Flask/Django, sprinkle some plain JS logic if I can. If I need something more, I will use Alpine.js or in the case of the author, Stimulus.js.
With node, comes npm. Yarn. Gulp. Webpack. Rollup. All this nonsense which is so incredible fragile, it will change next week. It gives me a tremendous amount of anxiety just thinking about it.
Flask is simple. Deployment of python apps is not. You need to configure and run a WSGI server in front of it. Then, package it into a container, push it to a registry, find a host, etc ..
My suggestion wasn't to run Node in the backend, it was no backend. Serve it as a static site. That generally works in 90% of the cases for me. I use Hasura as my API layer which is deployed alongside Postgres.
Does Hotwire/Turbo/Stimulus still require running a server? I really like my setup of Svelte front-end, serverless functions on Zeit that do all the data handling, and Airtable "back-end" for collecting form data.
Svelte compiles everything so it's lightning fast and I don't have to pay for servers. I'm not sure how Hotwire is more "modest" than that if it requires a server running at all times...
9 comments
[ 0.22 ms ] story [ 70.4 ms ] threadPython is my primary language, but there is a real benefit to "modern" web. More and more of my apps are 100% HTML/Javascript, static (deployed to Netlify) and rely on Hasura for the data layer).
If I really do need a backend, I create a small Python webapp just for that).
Flask + HTML + jQuery = Classic simplicity
Flask + HTML + Alpine/Stimulus/Vue = Modern simplicity. No need to install node at all on the backend is absolutely liberating. Managing JS dependencies is a complete shitshow, an absolute horror, it has scarred me so much, I hate it with every ounce of passion I have. I don't want it on my backend at all. So, I am liberated by the fact that I can serve highlight.js or whatever JS lib just as a static file and use Jinja/Django templates with Flask/Django, sprinkle some plain JS logic if I can. If I need something more, I will use Alpine.js or in the case of the author, Stimulus.js.
With node, comes npm. Yarn. Gulp. Webpack. Rollup. All this nonsense which is so incredible fragile, it will change next week. It gives me a tremendous amount of anxiety just thinking about it.
This is simple to me.
My suggestion wasn't to run Node in the backend, it was no backend. Serve it as a static site. That generally works in 90% of the cases for me. I use Hasura as my API layer which is deployed alongside Postgres.
Svelte compiles everything so it's lightning fast and I don't have to pay for servers. I'm not sure how Hotwire is more "modest" than that if it requires a server running at all times...