Re:Django 5.0 Is Released
by robertlagrant on Tuesday December 05, 2023 @08:10AM
(#38530253)
> because it seemed like there was a smooth upgrade path, but there isn't really
You can put a React component into a non-React web page and give it data to render from however you like. Isn't that the intended path?
Re:Django 5.0 Is Released
by globular-toast on Tuesday December 05, 2023 @08:32AM
(#38530460)
Yes, and that is indeed what we did. But what happens is you end up with a backend awkwardly fragmented into restframework viewsets and normal Django views. Often you end up having to maintain both. And then your frontend is in two distinct "worlds" which are developed in completely different ways. Unless you finally get to having an SPA and only JSON on the server side you'll feel forever in limbo. HTMX just makes so much more sense for an existing Django project unless you can afford to stop development and go all in on React, and even then only if it's really necessary to have an SPA.
Re:Django 5.0 Is Released
by robertlagrant on Tuesday December 05, 2023 @08:34AM
(#38530482)
Yeah - agree that the Django path to add REST endpoints alongside HTML ones is not the best. I like Flask for this reason: it walks the line between HTML rendering and JSON responses really well, IMO.
Re:Django 5.0 Is Released
by scrollaway on Wednesday December 06, 2023 @08:29AM
(#38543581)
React isn’t all or nothing… you can upgrade bit by bit, extremely incrementally. But if you’re mix and matching frameworks and paradigms together then yes expect to not get the full value.
It’s like judging Django when only using it for its utils package and saying it’s “all or nothing”. Django isn’t really all or nothing either but you won’t get its full value if you just use it to supplement Wordpress for a single endpoint or something.
As for people who know their shit, how do you think said people learnt their shit? Everyone can do what they already know. The interesting stuff is on the frontier of your knowledge. You learn by pushing that boundary and, when you fail, thinking about why it failed.