Structuring large/complex Django projects, and using a services layer in Django projects

Definitely interested in this thread.

Thanks so much for sharing amazing resources, just started to go through them with a hope of building an opinion about how to proceed with large/mature Django code bases.

If interested in Domain Driven Design

  • My org has recently started implementing Django code in DDD (Domain Driven Design) format and as Backend Developer I have started picking some knowledge around it in recent times (past couple of months) given the drive to move to DDD at work.
  • However the general sense I have so far built looking at the ongoing implementations (at my workplace) is that it has largely convoluted the code base and debugging has become way too painful since there are layers and layers of code before we finally reach the actual function that is operating as the brains behind what someone was trying to debug/fix.
  • But I kinda believe that this is due to my lack of familiarity with DDD as a design let alone being familiar with its code structure and this belief keeps pushing me to try and learn better ways to implement DDD.

Not so fun part of this initial learning/familiarizing curve:

  • I am currently in the middle of refactoring (think redesigning) some part of our platform and as a team, we are approaching building in DDD format.
  • As a result, I am currently scratching my head around understanding terms like aggregate, aggregate roots, entities, value objects, etc. and more importantly, how to convert this understanding into working code.
  • This is with a hope that I can clearly define these things in my LLD (Low Level Design) document and get to writing code to start implementing them.
1 Like