- Django Design Patterns and Best Practices
- Arun Ravindran
- 189字
- 2021-07-23 19:36:20
Best practices
In addition to design patterns, there might be a recommended approach to solving a problem. In Django, as with Python, there might be several ways to solve a problem but one idiomatic approach among those.
Python Zen and Django's design philosophy
Generally, the Python community uses the term 'Pythonic' to describe a piece of idiomatic code. It typically refers to the principles laid out in 'The Zen of Python'. Written like a poem, it is extremely useful to describe such a vague concept.
Furthermore, Django developers have crisply documented their design philosophies while designing the framework at https://docs.djangoproject.com/en/dev/misc/design-philosophies/.
While the document describes the thought process behind how Django was designed, it is also useful for developers using Django to build applications. Certain principles such as Don't Repeat Yourself (DRY), loose coupling, and tight cohesion can help you write more maintainable and idiomatic Django applications.
Django or Python best practices suggested by this book would be formatted in the following manner:
- SQL Server 從入門到項目實踐(超值版)
- JavaScript前端開發模塊化教程
- Python數據分析入門與實戰
- PHP 7底層設計與源碼實現
- 深入淺出Spring Boot 2.x
- Java性能權威指南(第2版)
- Python深度學習:基于TensorFlow
- 西門子S7-200 SMART PLC編程從入門到實踐
- Python圖形化編程(微課版)
- 小程序,巧應用:微信小程序開發實戰(第2版)
- Learning Node.js for .NET Developers
- Mastering Docker
- 一步一步跟我學Scratch3.0案例
- OpenCV Android Programming By Example
- 數據分析與挖掘算法:Python實戰