Clean Code Architecture in Django


https://blog.hackajob.co/the-importance-of-creating-clean-code-architecture/

 They represent the data flow in a system built using Clean Architecture. As an example, the ‘Entities’ only interact with the ‘Use Cases’ and not any other level, so let’s start with them:

As you can see, the ‘Entities’ interface is a pure Python-object representation of what the model below looks like. We recommend taking note of the ‘@abc.abstractproperty’ and ‘@abc.abstractmethod’ decorators in particular, as they are formal interfaces that we expect every ‘Employee’ object to have. Additionally, you should be able to see that the programme in this layer isn’t frame-work aware and can therefore be connected later to Flask with minimal changes to the overall codebase.


Did you find this article useful?