-
Django for Startup Founders: A Better Software Architecture for SAAS Startups & Consumer Apps -> An opinionated guideline to structuring Django applications for maximum efficiency.
-
Django Structure for Scale & Longevitiy -> Designing thin Model driven applications around selectors and services.
-
Fat Models are Considered Harmful -> A hackernews discussion on why Fat Models recommendation is one of the most destructive architecture patterns.
-
Spontaneous Transition from Monolithic to Microservice Oriented Architecture -> Microservices are cute when you get to build them from scratch. However, often it becomes a necessity to break down a gargantuan monolith into mutliple service-oriented entities to keep up with the business requirements. This article contains wisdoms on how Doordash attempted that back in Q4 2019.
-
Django Database Optimization Tips -> A few common DB optimizations with examples.
-
Mitigating (n+1) Query Issues with select_related() & prefetch_related() -> I find that the Django documentation does a better job at explaining the role of
select_related
andprefetch_related
methods for query optimizations than most other resources. Check out the section where the doc explains how to usePrefetch
object to further control the prefetch operation. It's crazy powerful. -
Django Select Related & Prefetch Related Examples -> Two YouTube videos that I found useful to understand select and prefetch related methods. However, first, you should definitely go through the documentation listed above. It's awesome.
-
PostgreSQL Indexing : How, Why, and When - Curtis Maloney -> Here, the speaker adds indexes on a simple PostgreSQL table incrementally and runs
Explain
on different queriers to showcase the performance improvements. -
Unlocking the full potential of PostgreSQL indexes in Django - Haki Benita -> While, the loop of adding the default B-Tree index to the target columns and running
Explain
on the query works well enough, the latest version of Django opens up the opportunities of leveraging more esoteric indexes offered by PostgreSQL. Apart from B-Tree Index, the presenter also explores Inclusive Index, Partial Index, Function Based Index, Hash Index, and Block Range Index aka BRIN. -
Re-Introducing Hash Indexes in PostgreSQL - Haki Benita -> Prior to PostgreSQL 10, Hash indexes were extremely limited compared to the default B-Tree indexes and offered too little to be considered as a viable alternative. However, a few things has changed since then and this post stacks Hash indexes against B-Tree.
-
Hunting Performance in Django Code - Sümer Cip -> This talk offers a great starting point for learning about performance profilers for your Python application. It primarily talks about the distinctions between different tracing and sampling profilers.
-
Customize the Django Admin With Python -> Quick customization of Django Admin using only Python.
-
How to Add a Text Filter to Django Admin -> Django's admin panel is a great way to quickly build admin specific CRUD pages. However, one caveat is that the built-in search doesn't scale very well. This post shows a way to extend the built-in filters to achieve auto-complete-like features in the pages containing object tables.
-
Django Transactions: Past, Present, and Future - Christophe Pettus -> An overiew of the evolution and quirks of Django transactions in PostgreSQL context.
- DRF Serializer Relations -> DRF serializer relations can be confusing at times. At my workplace, we were using
HyperlinkedModelSerializer
for everything and this would at times, lead to confusing errors. By default, whenModelSerializer
is used to serialize a model, DRF usesPrimaryKeyRelatedField
to resolve field relationships. However, it usesHyperlinkedRelatedField
to resolve relationships ifHyperlinkedModelSerializer
is used instead.
-
Django Template Delocalized -> A comprehensive POC of decoupling template rendition to a separate Django application.
-
Hook Slinger -> Webhook as a standalone service.
-
PyInstrument -> Call stack profiler for Python. Shows why your code is slow!
-
Architecture Patterns with Python - Harry Percival & Bob Gregory -> A deep dive into DDD and Event-driven architecture patterns in the Python ecosystem. The book also talks about strategies to exercise DDD and event-driven architecture practices within the realm of a highly opinionated environment like Django.
-
Django for Beginners - William Vincent -> An excellent guide to dipping your toes into the Django ecosystem.
-
Django for Professionals - William Vincent -> A comprehensive guide to productionizing your first Django application.
-
Django for APIs - William Vincent -> A practitioner's guide to building REST APIs with Django Rest Framework. This book assumes previous exposure to Django.
-
Learn PostgreSQL: Build and manage high-performance database solutions using PostgreSQL 12 and 13 - Luca Ferrari, Enrico Pirozzi -> A beginners guide to navigate the tantalizing realm of RDBMS with PostgreSQL.