Blog: James Bennett

Understanding async Python for the web

Aug. 16, 2022 » James Bennett » [Archived Version]

Recently Django 4.1 was released, and the thing most people seem interested in is the expanded async support. Meanwhile, for the last couple years the Python web ecosystem as a whole has been seeing new frameworks pop up which are fully async, or support going fully async, from the start. But this raises a lot of questions, like: just what is “async” Python? Why do people care about it so much? And is it really … Read full entry

Read More

Understanding async Python for the web

Aug. 16, 2022 » James Bennett » [Archived Version]

Recently Django 4.1 was released, and the thing most people seem interested in is the expanded async support. Meanwhile, for the last couple years the Python web ecosystem as a whole has been seeing new frameworks pop up which are fully async, or support going fully async, from the start. But this raises a lot of questions, like: just what is “async” Python? Why do people care about it so much? And is it really … Read full entry

Read More

More on service layers in Django

March 23, 2020 » James Bennett » [Archived Version]

Well, that provoked some discussion. While there were plenty of people who agreed with the general idea of that post, there were also quite a few objections. And most of those seem to fall into two main categories: people who want some type of additional layer (and may or may not call it a “service”) as a way of managing cross-cutting complexity, and people who want it as an isolating abstraction for testing. There’s also a third … Read full entry

Read More

More on service layers in Django

March 23, 2020 » James Bennett » [Archived Version]

Well, that provoked some discussion. While there were plenty of people who agreed with the general idea of that post, there were also quite a few objections. And most of those seem to fall into two main categories: people who want some type of additional layer (and may or may not call it a “service”) as a way of managing cross-cutting complexity, and people who want it as an isolating abstraction for testing. There’s also a third … Read full entry

Read More

Against service layers in Django

March 16, 2020 » James Bennett » [Archived Version]

This post now has a followup. Recently I’ve seen posts and questions pop up in a few places about a sort of “enterprise” Django style guide that’s been getting attention. There are a number of things I disagree with in that guide, but the big one, and the one people have mostly been asking about, is the recommendation to add a “service layer” to Django applications. The short version of my opinion on this … Read full entry

Read More

Against service layers in Django

March 16, 2020 » James Bennett » [Archived Version]

This post now has a followup. Recently I’ve seen posts and questions pop up in a few places about a sort of “enterprise” Django style guide that’s been getting attention. There are a number of things I disagree with in that guide, but the big one, and the one people have mostly been asking about, is the recommendation to add a “service layer” to Django applications. The short version of my opinion on this … Read full entry

Read More

How I'm testing in 2020

Feb. 3, 2020 » James Bennett » [Archived Version]

Once upon a time I wrote a bit about testing, specifically how I was organizing and testing my open-source Django apps. It’s been a while since that post, though, and the calendar has even flipped over to a new penultimate digit in the year number, so it’s worth revisiting to go over what’s changed in how I do things and what’s stayed the same. And since I do maintain a couple things that aren’t … Read full entry

Read More

How I'm testing in 2020

Feb. 3, 2020 » James Bennett » [Archived Version]

Once upon a time I wrote a bit about testing, specifically how I was organizing and testing my open-source Django apps. It’s been a while since that post, though, and the calendar has even flipped over to a new penultimate digit in the year number, so it’s worth revisiting to go over what’s changed in how I do things and what’s stayed the same. And since I do maintain a couple things that aren’t … Read full entry

Read More

Contributing to classiness (in Django)

March 4, 2019 » James Bennett » [Archived Version]

A couple weeks ago I ran a poll on Twitter asking people whether they’d ever used, or considered using, the contribute_to_class() method to write something that attaches to or hooks into a Django ORM model class, and if so what their thoughts were. There was also a “don’t know what that is” option, which won by a large margin, and I promised I’d provide an explanation. Unfortunately, that was around the time I suffered a kitchen … Read full entry

Read More

Contributing to classiness (in Django)

March 4, 2019 » James Bennett » [Archived Version]

A couple weeks ago I ran a poll on Twitter asking people whether they’d ever used, or considered using, the contribute_to_class() method to write something that attaches to or hooks into a Django ORM model class, and if so what their thoughts were. There was also a “don’t know what that is” option, which won by a large margin, and I promised I’d provide an explanation. Unfortunately, that was around the time I suffered a kitchen … Read full entry

Read More