Once you dive into Python it’s hard to get away. The language is lightweight, easy to use, and exceptionally powerful.
The most popular Python framework in my mind is Django .
It’s completely free, open source, and generally straightforward to pick up if you already have some basics. And once you get past the basics you’ll find yourself looking for more functionality.
Things brings us to Lightweight Django , an O’Reilly book first published in 2014 for teaching more advanced Django concepts. I went through most of the exercises and found the book interesting to say the least.
I should say right off the bat that Lightweight Django is mostly targeted towards intermediate Python/Django developers. Unfortunately it’s hard to know where to draw the line.
You should already have a working knowledge of MVC and Python. This likely means you’ve built a few apps or have worked through tutorials enough to understand the fundamentals of this framework.
It’s a detailed subject and it’s almost impossible to find a “basic” guide to Django, much like it’s not easy to find a “basic” guide to Laravel without PHP & OOP knowledge.
But if you’re willing to jump head-first into Django and if you’re willing to hit roadblocks then you will learn from Lightweight Django. It’s going to be hard work. You’ll likely end up frustrated in some parts and want to quit.
But if you do some research online to fill in the blanks you’ll have no trouble working through the book in a couple weeks(or months, depending on experience).
Here’s a list of all the chapters:
- The World’s Smallest Django Project
- Stateless Web Application
- Building a Static Site Generator
- Building a REST API
- Client-Side Django with Backbone.js
- Single-Page Web Application
- Real-Time Django
- Communication Between Django and Tornado
Each chapter digs into a unique skillset while building on top of foundational Django knowledge.
I personally found this book to have a good mix of content, some more interesting than others. I never want to bother with Backbone and I don’t find the Tornado service all that appealing.
However I loved the static site generator tutorial and the HTML5 real-time dev topics with WebSockets . This does work through Tornado so it’s an implied skillset that you’ll have to eventually learn or want to learn.
This book isn’t great for Django developers who want to focus on the core of the framework. It reads more like a cookbook of snippets, or perhaps a logical examination of best practices for Django applications across various topics.
But overall the content is directly applicable and it will make sense to Python/Django enthusiasts who already know the basics and want to advance to the next level.
Pros & Cons
I’d like to praise this book in its accurate approach to the Tornado web server and other technologies that branch out from Django. In the preface of the book it mentions that all this code is meant for intermediate Django developers.
This to me means that you already have a few Django projects under your belt. You should have already built up a working knowledge of Django and be looking for the next steps.
I think the content in this book will get you there. But it primarily lack two things:
- Practical replication
- Simple explanations
The topics are detailed enough and the code snippets are high quality enough to copy and paste as needed. But the content is not easy to understand without a background in Django development.
Even worse is that I was left wondering how to actually apply these things to real development projects on my own.
In chapter 5 the content switched over to Backbone which as a frontend library is fairly archaic. There are still plenty of Backbone learning resources and it is still supported. But very few people are starting from scratch learning Backbone.js when options like Angular and React are much more popular.
This left me wondering why I was even bothering to learn Backbone in the midst of a Django book.
On the plus side I think the code snippets could be valuable to an intermediate(or advanced) Django developer. There’s nothing inherently wrong with the code or the application examples.
But I think as a book targeted at intermediate developers it still leaves a lot to be desired. Partially in content, but mostly in execution and especially in the murky directions of how to execute these techniques in the real world.
I picked up this book thinking it was a beginner’s book. It’s definitely not, and this should be noted before purchasing.
The book’s contents are complex and they do seem to increase in complexity quite a bit as you move through each chapter. I’m still on the fence about the actual content & if I’d recommend this to intermediate developers. It’s certainly not bad, although I would’ve liked to see much more detailed explanations with practical guidelines for real project work.
Lightweight Django does a good job of presenting it’s goal: teaching you to create lightweight Django apps with free resources.
It does cover the REST API and many other Django topics in great detail. The biggest issue I faced was a lack of clarity and direction. This could be that I was looking for a beginner’s book and got blindsided. So in all fairness I may have been rubbed the wrong way, and if you’re an intermediate-to-advanced Python developer you might consider grabbing a copy.
But I have to give this 3/5 stars just because it’s not the absolute best book you can get. In fact it may actually put you off from learning Django further because of the learning curve & the inclusion of Backbone. There are other books you can try instead.
For absolute beginners I’d recommend Learning Website Development with Django as an alternative. It’s a few years older but it covers the fundamental topics with a clearer voice and a more straightforward trajectory.
If you need a more recent intermediate-level book check out Two Scoops of Django .
I don’t want to imply that Lightweight Django isn’t worth the money. It certainly is a book with great information if you’re interested in 3rd party resources for speedier Django development. I just felt it was a bit too scatterbrained and focused on too many subjects without covering them all in greater detail.
Review Rating: 3/5