Learning Django: Tired of YouTube Tutorials and Not Ready for Documentation? Give These Books a Try

date
Jun 9, 2023
slug
learning-django-books
author
status
Public
tags
Books
Tech
Web
summary
type
Post
thumbnail
django.png
updatedAt
Jun 10, 2023 03:51 PM
Django, a battery-included Python web framework, is one of the most popular choices for backend and full-stack web development. I learned Django by watching YouTube tutorials and building projects with the help of Stack Overflow. What should I do next?
 

 
Picking up a new programming language or a framework is not too hard, but mastering it is not easy. When I need to learn a new tool, the first thing I do is to search for something like “{{ tool-name }}” or “{{ tool-name }} tutorial” on YouTube, then move on to “advanced {{ tool-name }}” or “{{ tool-name }} project”.
YouTube videos help me learn quickly, but they are not that great to help people become advanced at programming languages or frameworks.
I have heard a lot of people saying that you need to learn how to read the documentation, but frankly, most documentations are not so easy to read. Furthermore, while reading documentation is great for debugging or when you want to solve some specific things, for me, it is not an efficient way to pick up a tool (except those that are well written like FastAPI).
That problem came to me when I learned Django. After picking up the basics, I didn’t know what the best practices are and how to enhance my Django skills and knowledge. These three books help me solve that problem.
 

Django for Professionals (William S. Vincent)

There is a huge gap between building a “toy app” and a scalable website. William Vincent wrote Django for Professionals to bridge that gap, and the book is a step-by-step guide on how to build a “production-ready” bookstore application.
Django for Professionals is well written with source code available on GitHub, which makes it very easy to follow. The book does not touch on too much advanced Django stuff, but what makes it worth reading is that it shows us the best practices for the whole development cycle.
It’s very common for Django developers to use default SQLite for development and only change to a more robust database at the deployment stage. William Vincent teaches us how to set up PostgreSQL and Docker properly at the beginning. And as stated by the author, “when it comes time to build your own Django projects, chances are you will be repeating many of the same steps from Chapters 3-9.”
However, the biggest downside of this book is that while it explains the “what” and the “how” very well, it lacks elaboration on the “why”. It introduces you to the packages and teaches you how to do things, but does not explain why you should do it. It will be a lot better if William Vincent lists out some of the alternatives and justifies his choices.

Two Scoops of Django 3.x (Daniel & Audrey Greenfeld)

Unlike the previous book, Two Scoops of Django 3.x is not a tutorial on how to build a specific application but a collection of tips, tricks, patterns, techniques, and best practices when using Django.
Written by Daniel Greenfeld, who has been working with Django for more than a decade, and his wife Audrey Greenfeld, the author of the widely-adapted Cookiecutter project, Two Scoops of Django has earned its reputation as one of the most influential books about this web framework.
Two Scoops of Django covers all major areas of the framework, from environmental setup, project layout, and working with databases, to third-party integration or security best practices. It is a book that you can pick up anytime to find an answer to a problem you encounter when working with Django.
Although the latest edition specifically focusing on Django 3.x is still a work in progress at the time of my knowledge cutoff, readers can still benefit from the previous editions of the book. The concepts and principles shared throughout the previous editions remain largely relevant, providing developers with a solid foundation and a wealth of knowledge to apply to their Django projects.

High Performance Django (Peter Baumgartner & Yann Malet)

As mentioned by the author, it’s not uncommon to hear people say “Django doesn’t scale”. Although Django provides developers with robust and powerful tools, optimizing Django apps can be a complex and challenging task. High Performance Django is a comprehensive guide that delves into best practices to optimize Django applications.
The book begins by laying a solid foundation of understanding web performance principles and the underlying technologies that power Django applications. From there, the authors dive deep into various aspects of Django performance optimization, including database optimization, caching strategies, efficient template rendering, asynchronous processing, and scalability techniques.
The book also provides concrete examples, case studies, and performance benchmarking techniques to illustrate the concept discussed. Furthermore, some of the concepts are not Django-specific and can be applied to web applications written in any other frameworks or languages. The best thing is that this book is available online at lincolnloop.com/high-performance-django/.
 

Closing thoughts

While modern web frameworks like FastAPI with its ease of use, speed, and robustness are gaining more attention, Django will still remain an enduring powerhouse in the world of backend development. Chosen by some of the most popular websites like Instagram, Pinterest, and Spotify, Django’s comprehensive set of batteries-included features continues to attract developers, and its vibrant community ensures ongoing support and innovation.
Whether you're a beginner seeking to learn Django or an experienced developer looking to optimize your Django applications, I hope you can find something helpful in the three aforementioned books.