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.
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.
If anything, I would consider someone making that statement miss informed
That's not the best of reasons; just because Django is not used by Google doesn't mean it isn't the perfect tool for you.
Others: DigitalOcean, Pinterest (used Django at first, may have moved to Flask by now, not sure), Mozilla, Disqus, Robinhood, The Washington Post.
Update: Just saw that HN user txcwpalpha said the same about Disqus in sibling comment.
* Ease of upgrading between versions. This is especially critical and important if you have long lived projects.
* Excellent documentation
* Healthy community, contributors and project is run really smoothly by the team
* Project is a foundation vs single point of failure ,aka main dev loses interest, comparative to other frameworks
This is such a big deal and I can't work out how the JavaScript community has been operating under its 'break everything in a week' model for so long with such high traction.
Django has a sane, predictable release schedule. Django has LTS releases with years of support. I work in an agency environment where applications can sit running for years without being touched, and when new work needs to be done - I can't have my entire dependency tree falling from under my feet (or arguably worse, abandoned) because people have decided that backwards compatibility doesn't mean anything.
It's so so hard to not be cynical about this. The entire development world feels like it's more-so every day geared toward time-rich development teams pumping out software in a startup environment frothing over the next big thing. I have to account for every hour of my time, switching between / training other developers on new-hotness JavaScript frameworks is unjustifiable.
A few weeks later they told this story of using MongoDB and how they had layered some rules on top to ensure data consistency...
However for my personal site I used Django to give it a shot. Once I wrapped my head around a couple of different paradigms it was quite nice to work with, though I probably haven't laid it out as well as I would a real product or tool. It was very easy to get a pretty basic blog set up.
My only gripe might be on the blog end— it was kind of a pain to find a halfway-current compatible text editor for that purpose. But that isn't the end of the world for my own site. And of course, that's not an issue with Django itself.
I've gone with CKEditor (https://github.com/django-ckeditor/django-ckeditor) for all my new stuff, for what it's worth.
I might yet switch it out for a plain text editor and just draft all my HTML by hand like scardine has done.
But I don't exactly write a lot these days, so maybe it doesn't matter too much!
Django is fantastic. I've worked with it for a number of years now and it can really help in the early stages of prototyping.
Things I especially like about Django:
* The built in admin letting you edit and view objects easily.
* Being able to use it without using the views. Add django rest framework and you can model your domain with good REST practices.
* Migrations and works well with postgres.
* That the team has thought a lot about web security and how to implement it. Things like XSS, CSRF, CORS, session timeouts, authentication are all there in Django. Other frameworks I need to pull in a library for each and pray that they work well together. I found this especially with Flask and large projects it gets ridiculous how much I have to write from scratch.
Things that would make me not choose Django:
* If you have a graph style problem and need a graph database like neo4j. (Even then I'd probably want some part relational)
* If you accept lock in to someone else's platform like firebase and don't want to run your own servers.
* raw speed is an issue and you are okay with development taking much longer. In that case you're looking at some of the golang frameworks and possibly node/express.