- Django Design Patterns and Best Practices
- Arun Ravindran
- 247字
- 2021-06-25 21:32:02
Designing the application
When you have a fairly good idea of what you need to build, you can start thinking about the implementation in Django. Once again, it is tempting to start coding away. However, when you spend a few minutes thinking about the design, you can find plenty of different ways to solve a design problem.
You can also start designing tests first, as advocated in the Test-driven Development (TDD) methodology. We will see more of the TDD approach in Chapter 11: Testing and Debugging.
Whichever approach you take, it is best to stop and think:
- What are the different ways in which I can implement this?
- What are the trade-offs?
- Which factors are more important in our context?
- Finally, which approach is the best?
The best designs are often elegant and harmonious as a whole. This is usually where design patterns can help you. Well-designed code is not only easier to read, but also faster to extend and enhance.
Experienced Django developers look at the overall project in different ways. Sticking to the DRY principle (or sometimes because they get lazy), they think, have I seen this functionality before? For instance, can this social login feature be implemented using a third-party package such as django-all-auth?
If they have to write the app themselves, they start thinking of various design patterns in the hope of an elegant design. However, they first need to break down a project at the top-level into apps.
- JBoss Weld CDI for Java Platform
- Learn ECMAScript(Second Edition)
- Elastic Stack應用寶典
- Unity 5.x By Example
- Mastering Drupal 8 Views
- iOS開發實戰:從入門到上架App Store(第2版) (移動開發叢書)
- C++反匯編與逆向分析技術揭秘(第2版)
- Spring Boot實戰
- SQL Server 2016 從入門到實戰(視頻教學版)
- Python網絡爬蟲技術與應用
- Django 5企業級Web應用開發實戰(視頻教學版)
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- C語言從入門到精通(微視頻精編版)
- Visual C++網絡編程教程(Visual Studio 2010平臺)
- 匯編語言程序設計教程