Hacker News new | ask | show | jobs
by stavros 819 days ago
What magic does Django have?
2 comments

By magic I mean the complexity brought on by the heavy use of metaclasses, patterns employed via convention rather than enforced by code (implying that you have to read enough of the code before you understand the patterns) and other similar leaky abstractions.

Don't get me wrong, I do think Django is one of those deep modules[1] where the interface makes it a pleasure to work with but the internals do need effort. Especially the ORM layer.

[1] https://duckduckgo.com/?q=deep+modules+John+Ousterhout&t=fpa...

Imo there's a fair bit of complexity in request dispatch with sync/async interop, wsgi/asgi, channels. I think you end up with something like 10+ frames going through all these pieces before you hit the middlware.