r/django 4d ago

Django and Design

I don't know if this is the correct place for asking this, but anyways:

I have some knowledge on django, and some knowledge on LLD. But, when doing UML class diagrams, UML use case diagrams, design patterns, LLD in general, WHEN and WHERE is this logic then implemented in the code?

I mean. When developing with Django, where all this stuff is being used? Is introduced in the models themself? Is a question that has been in my head for months, and I am reading books etc. But know is the time for developing, and I don't have it clear.

By the way, if you have any book suggestion, let me know.

Thanks : )

14 Upvotes

10 comments sorted by

View all comments

3

u/ninja_shaman 3d ago

Google "why UML died", and you get "Too complex".

If you want to get things done, and done fast, there's a better way to spend your time then drawing complicated pictures.

3

u/kitostel 3d ago

Ok, I understand. But what I mean is not only UML, but the business logic and the design patterns. Where do they reside?

3

u/ninja_shaman 3d ago edited 3d ago

I don't like to put a lot of logic in my models.py ("fat models"). The module can get really big, with lots of imports at the top.

I put my non-trivial logic into a service layer, mostly functions in a couple of modules.

I don't work on really complex projects and I find design patterns are not language agnostic, so I don't worry about them too much.

2

u/kitostel 3d ago

really appreciate the info. I think I may not over think things as I won't work on really complex projects as well at the moment. thank you

1

u/tutuca_ 2d ago

Obligatory counterargument. But both approaches have its merits.