My memory of the old days was that pretty much any programmer could go write server-side code in any scripting language to generate pages and tables and things and build UIs pretty much instantly. HTML was a language that was obvious and easy to generate with for-loops and such, and Javascript was something you could add for fancy things. Templates came along and made things even easier, and the biggest pain point was the back-button.
Fast forward to 2021, and I am in need of a simple editor for a GRPC API and I am finding myself flummoxed and unsure where to start on how to even make a UI for it! Everything seems to one server that serves Javascript single-page app that uses graphql to interrogate some middleware that in turn calls whatever backends are needed etc.
Where went the quick and dirty results of server-side generation of HTML tables and such?
It feels like modern web-dev is more cogs and more massaging and a much steeper learning curve and everything.
How can old-timers quickly and easily get a modern-feeling but simple-to-make UI?
-Django server framework to handle templates, auth, routing, DB etc
- HTML templates and CSS (inline for one-offs, and CSS files for multi-use and defaults)
- Targeted JS without dependencies for UI manipulation and fetching data from the server as required.
I think you'll find the improvements in modern JS and CSS very nice. Flex, Grid, JS DOM apis etc. Ignore the bloated frontend frameworks etc.
I say "if this is a personal project" because in the case of a professional engagement there are possibly other considerations.
[1] http://bottlepy.org/docs/dev/tutorial.html#tutorial-template...
Stack that solved my problem:
- Python Flask, with the bundled Jinja templating,
- Spectre CSS.
This setup could produce some seriously large, functional and attractive tables. PHP is also an option, with Twig templating (which is a Jinja copycat).
Still here in the 20 years old technology you know, only changed in some paradigm, words, tools, but the core is always the same hyper text metaphor.
> How can old-timers quickly and easily get a modern-feeling but simple-to-make UI?
There are a lot of frameworks available todays, but if you have been ibernated for 20 years, I bet you'll like to try do it by yourself.
PHP has been around for quite the long time and is a quick and easy way to do it if you are familiar (or even if you aren't usually). Sure people shit on PHP all the time, but it can be a quick way to do it. Node also has template systems for server side. .NET & Python too.
Python: Django/Flask/Jinja Templates
Ruby: Rails ?
NodeJS: Express ?
Basically a popular framework for a popular language. Almost all are server side by default.
https://plotly.com/dash/
Rails and PHP are a nightmare and legacy. Don't even bother
Next.js is pretty good
I am curious of two things:
1. How come Django is not legacy but Rails is?
2. How come Rails in itself it legacy for SSR?
I am curious and I think it worth explaining as it might be that people read the comments here and do not understand what criteria did you considered when deciding which is which.
Rails is not sanely organized, very complicated, and ruby is just a crazy language
I've worked with both profesionally, and my also purely subjective opinion is that while Ruby is better than Python, Rails is thousands of miles ahead of Django.
On the Ruby side, the standard library is a lot more consistent, the language itself is more powerful, the tooling is better (bundler + gems + rake vs pip..oh, wait its poetry.. or was it pipenv), puma is objetively better than uWSGI (no releases in years) and gunicorn (can't serve static files! wtf!).
Rails provides an opinionated and clear way to do frontend too (better templates, stimulus, hotwire, etc) and a way to do websockets, an official one. Translations in rails are a lot better too, based on keys instead of on 80's gettext funkyness. Routing is a lot easier too, just map urls to controllers... in django do you do function views? or class based views? now that's a mess. The "asyncification" going on in django is CRAZY, the complexity they're adding is React level insane.
Also, ruby didn't break the ecosystem and f*d half the community like python did from 2->3 (that's when I gave up on it) and nor is doing it with all the async madness in python splitting again the ecosystem on things that support it vs things that don't.
The only thing I miss from django is the migrations system, which I think are better than in rails, and maybe django-rest-framework.
So, there you go... your subjective opinion vs mine, everyone has one.
It was never so. This attitude in fact is the cause of many bugs and security vulnerabilities, most popularly XSS. There's a reason infrastructure was built around these technologies, one of which is that they are not really safe.