Some more things about Django I've been enjoying
Summary
Julia Evans shares her ongoing experience learning Django for backend web development, adopting a 'build websites like it's 2010' approach with server-rendered HTML instead of her usual frontend-heavy stack. She highlights Django features she's come to appreciate—composable QuerySets, template filters, and automatic database migrations—that make iterative development feel tractable. She rejects class-based view inheritance in favor of function-based views, finding the explicit approach much clearer. A performance investigation reveals her site was severely hampered not by slow queries but by accidentally disabling Django's cached template loader, which boosted throughput from ~2-3 to ~12 requests per second. She concludes that Django's framework abstractions are powerful but easy to misconfigure, and that Go-style performance intuitions don't transfer cleanly.
Key Insight
Framework conveniences like Django's QuerySets, template filters, and auto-migrations make backend development genuinely more accessible, but the same framework abstraction that helps also hides dangerous misconfiguration—and performance intuitions from other stacks don't transfer cleanly.
Spicy Quotes (click to share)
- 5
Writing a backend-focused site that uses as little JS as possible feels the same to me in a way as writing a single-page JS website that does as little on the backend as possible, even though they might seem like opposites.
- 2
In both cases I'm just trying to keep as much of the logic as possible in one place.
- 4
In the past I thought 'I know SQL, who needs a query builder?', but this kind of structure does make it really nice to read.
- 6
I've never had a good experience using inheritance in Python and I don't think I'll try to use it again.
- 3
I'm not very invested in whether it's 'right', but it's validating to know that other people feel similarly to me about inheritance.
- 5
I think one thing I'm learning about Django is that because it's a Framework (tm), it's easy to accidentally misconfigure it.
- 6
I've always heard the advice 'if you have a performance problem, check your database queries! Maybe add an index!'. But I've been running into a variety of performance issues that are not because of slow queries.
Tone
curious and reflective
