python-clean-architecture icon indicating copy to clipboard operation
python-clean-architecture copied to clipboard

Question: How would this project benefit for someone already using Django?

Open simkimsia opened this issue 4 years ago • 2 comments

I got the book from leanpub. Still reading it.

On page 96 I saw this image

I understand that this repo is a companion to the book, so out of curiosity, how would this project benefit someone already using Django extensively?

simkimsia avatar Apr 16 '20 15:04 simkimsia

Thanks for the question.

From the quote you've pasted, I'm guessing that you're talking about Clean Architectures in Python by Leonardo Giordani. No, I'm not the author of the book and by no means the repo is related to the book.

According to the Django and the Clean Architecture, I wouldn't agree with the author. From my own experience with Django 1.3-1.9, Django architectural style is far from being Clean. It promotes patterns that are quick to implement but mess up with the Single Responsibility Principle and separation of application's layers. The most known are Model and ModelForm. When you're prototyping, it's great. When you're maintaining a large complex application, it's horrible. Of course, you can make your implementations for each of the Clean Architecture patterns but to make it work perfectly, you have to make a huge effort. And this is the reason this project has started.

According to the python-clean-architecture, it's far from being usable. That's why all the warnings in the project's README. Someday it will make your life easier and cleaner, maybe. Bringing a Clean Design to an existing Django app is a nice goal and the library will aim for that. I would love to see it. But for now, try other good projects, like the Cosmic Python. Take a look at the https://www.cosmicpython.com/book/appendix_django.html and the whole https://github.com/cosmicpython/book

Do you want me to answer any more specific questions?

lhaze avatar Apr 21 '20 22:04 lhaze

Apologies I thought the book and repo are related

My bad 🤗

Yes I recently bought the hard copy of cosmic python and starting to pay closer attention to architecture

The impetus comes from my existing django production Apps starting to creak from the complexity

Harry and Bob are experts of flask tho they did write some appendix abt adapting the concept for Django

I am still keen with what you and Leonardo doing because I want to make my apps more awesome and easier to grow and maintain

Can I ask what direction you taking with this repo going forward in general?

And specifically with regards to Django if any?

Love what you, cosmicpython, Leonardo are all doing separately abt bringing better architectural patterns for python into the world 👍

simkimsia avatar Apr 22 '20 05:04 simkimsia