Earlier quoted context omitted.
I’ve also switched away from Django (to Litestar), but the ORM is the mean thing I keep missing from Django. SQLAlchemy feels really clunky by comparison
I think the ORM is fine. There's always some friction coming from mapping rows to classes and objects, but you can always drop down a layer and just pull raw tuples. What I'm not a fan of, is the query DSL. Normally, the developer works to figure out how to express their problem with SQL; then the DB engine works to figure out how to map that SQL to the data it has on disk. Now Django adds another layer, which is com…
Happy 20th Birthday, Django
181–190 of 191 posts
Re: Happy 20th Birthday, Django
#182Earlier quoted context omitted.
Not really, it was a strong inter-connection between the two at the beginning, going both ways, but I'd say that Django's design philosophy was its own thing. Granted, as time goes on things have started to become fuzzier and fuzzier in my head, and not only when it comes to programming languages/web frameworks and the like. Source: me, I was programming in Zope 20 years ago (mostly hated it, although there were lots…
Zope, shudder. It had some amazing ideas and I built a reasonably large app on it, but I’d rather swallow my own tongue than work inside an application server again. Django and its contemporaries, like TurboGears and Pylons, were a breath of fresh air.
Re: Happy 20th Birthday, Django
#183Earlier quoted context omitted.
Zope, shudder. It had some amazing ideas and I built a reasonably large app on it, but I’d rather swallow my own tongue than work inside an application server again. Django and its contemporaries, like TurboGears and Pylons, were a breath of fresh air.
I liked Turbogears, but their approach of using "best in breed" libraries kinda burnt them as what that meant kept changing and leaving them behind.
Re: Happy 20th Birthday, Django
#184Earlier quoted context omitted.
Django has supported database routing for ages. I've abused it for setups like yours (at least as I vaguely understand from the post details) to avoid using a datalake
It was added over a year after we needed it (back in 2008/2009). I'm pretty sure our use case was taken as an input into the design of Django's database routing. We were certainly loud enough about it.
Re: Happy 20th Birthday, Django
#185Alas, that tends to be the majority of my experience with Django. Using it for one-off personal projects and quietly wishing for the current new shiny JavaScript thing to go away. It still feels like home, but most of my time is somewhere else.
Re: Happy 20th Birthday, Django
#186In a very real sense, I have Django to thank for my entire career. As an undergraduate, my first academic job in a research lab had me building websites to promote the research in a lab. Django was brand new, and I was uninterested in petty concerns like stability and security, so I did everything in Django. Years later (2009), I got to do interesting work in a cutting edge machine learning lab due to the expertise I…
That early Python community was really nice. There were a lot of helpful strangers on the internet. Same with Ruby.
Re: Happy 20th Birthday, Django
#187Earlier quoted context omitted.
What is missing? The ORM works with asyncio, you can have async views, you can have long running connection-oriented async stuff for websockets etc (via django channels). Maybe there is something important that I'm missing but that seems more complete than most async-only frameworks.
There are numerous things still missing in terms of async support. Most notably for me is DB transaction support which leads to most non-safe endpoints running on the shared sync_to_async thread and me having to separate my code into one async function calling another sync function wrapped in sync_to_async. In fact if you look at the source there is a lot of async methods in the framework itself which just straight u…
TBH personally I have yet to work on any professional async Python project (Django based or not) which did not have event loop pauses due to accidental blocking IO or CPU exhaustion.
I take your point fully though that a lot of Django's "async" methods are really using a thread pool. (True for much closed source async code as well!)
Re: Happy 20th Birthday, Django
#188Earlier quoted context omitted.
Laravel keeps copying Django (I mean it in a good way)
Laravel’s ORM was originally inspired by my now-long-dead PHP projects Idiorm and Paris: https://laravelpodcast.com/episodes/c7807d42/transcript (Search for “Paris” to find the relevant section) https://github.com/j4mie/idiorm https://github.com/j4mie/paris Idiorm was started in early 2010 while I was still writing PHP professionally. I’d heard about Django from a talk @simonw gave at the FlashBrighton meet-up group…
Re: Happy 20th Birthday, Django
#189Earlier quoted context omitted.
Laravel borrowed much from Rails, Django and others. But unlike them actually moved forward.
> But unlike them actually moved forward. Right. I love Python and Django but the "batteries included" claim seems like an anachronism. Job queues, WebSockets/SSE, setter/modern form rendering, API framework, components, comprehensive CLI, frontend support etc are what the competition have better integrates and/or first party.
Re: Happy 20th Birthday, Django
#190Out of curiosity, for people who have do projects in both Django and Ruby on Rails, which one would you prefer and why? I learned Python more than 10 years ago, but later chose Rails to be my first web framework to learn, as I also wanted to learn more about Ruby, hence the question.
As someone who has used quite a few MVC frameworks professionally, in my opinion, Ruby on Rails continues to be the gold standard in many ways. Django feels more like a toy framework which, if I may say so, appeals mostly to developers who picked up Python as undergrads and then were not impelled in their particular careers to master other languages.