Sounds like an awesome idea.
> That's what lead to things like server side HTML form definition and form handling code.
You make these sound like bad things.
> those types of things conflict and overlap with things like React
So why presume the thing to abandon isn't React for many use cases?
> The backend is turning more into a data/API/GraphQL service than "get html" service that was popular when these frameworks emerged.
Which is fine if you're building a complex web app but stop encouraging people to build content sites this way. It's a terrible idea and they usually have deep UX flaws due to incomplete attempts to rebuild functionality that you get for free if you stop reinventing the wheel.
50% of the sites I visit seem to break some subtle aspect of bookmarking, navigation, caching, reloading or something else that they have no business messing with.
I have a strong suspicion this conflation comes from reasoning kind of like this:
(1) My web site would benefit from some kind of API. (2) Hey, if it has an API, wouldn't it be simpler if it just had an API, and all interaction was through clients? (3) So, [insert JavaScript framework] to the rescue! It'll be just like the original web site, but better!
Except that it isn't automatically "better" for either performance or usability. Content-focused sites tend to perform very well using the server-side model.
I have a very varied workload which includes both complex web applications and content driven sites (very basic, accomplishable-by-WordPress marketing sites). I had a client move their very basic portfolio + blog site to a new developer who rewrote it from scratch. The new site has a loading / splash page before the real site displays. It's entirely JS driven and ticks all the boxes for bad implementation (badly implemented fake links, no use of the history API, bad accessibility.etc).
I don't see how this is not a step backwards. Nothing was gained here except for some resume-driven development. Frankly, it strikes me as something that inexperienced developers do because they aren't aware of a world outside of React (or at the very least consider it to be obsolete).
>...constructing elaborate html pages on the server side and pushing it out and letting some basic extra js stuff augment it.
I will take server side rendered webpage up against a fancy js spewed template any day of the week. In every metric possible the server side render wins.
Load speed, SEO, accessibility, file size, time to paint, time to render, time to interactivity. Not a single point goes towards the js rendered web page, period.
In fact, it has almost every conceivable downside, including the obvious, it requires javascript.
I develop webapps for a living, and I hate using them for browsing content, they suck for that. Vue.js/React/Angular for web apps all the way, for web pages/content, server side hands React its behind.
With django channels, you can also very easily break away from wsgi and have real time services, web sockets, all talking with your Django code.
There is no "focus on older web paradigms". Django may have been slower to get things that other shiny JS frameworks already have, but this is only because Django had already successfully been used in projects of different sizes and it could not succumb to CADT.
I had to look up CADT.
Got this via Google:
CADT stands for Cascade of Attention-Deficit Teenagers
Which usually is faster and easier to use.
> A modern fancy web application using React in 2018
Takes ages to load and melts your CPU.
You still have some of the same performance issues as with any ORM - but it makes setting up a Django based RESTful API fairly trivial.
Some things I like about DRF:
- viewsets which allow RESTful read + CRUD ops on an existing django model.
- easy to set up different serializers for a model view: flat, nested with child relations etc.
- auto generated API docs in the browsable format of your choosing.
That's what lead to things like server side HTML form definition and form handling code.
After the emergence of things like React, Angular, etc those "html templating" facilities get in the way because that stuff is baked into the react app and is focused on the client side, it may get server side rendered with nodejs. A modern fancy web application using React in 2018 doesn't need something like Django forms or Flask-WTF and those types of things conflict and overlap with things like React.
The backend is turning more into a data/API/GraphQL service than "get html" service that was popular when these frameworks emerged.