- Developer's Commute
- Posts
- Is Clean Architecture overrated? Or an essential for developers? - Developer Commute's Newsletter
Is Clean Architecture overrated? Or an essential for developers? - Developer Commute's Newsletter
Let's explore the phenomenon of clean architecture. And why it became so important.
Good Morning, It is your captain speaking. Welcome aboard the Developer’s Commute.
APP CORE CONCEPT
Gif by scaler_official on Giphy
Clean Architecture is Overrated. Or is it?
“Clean Architecture is Overrated.”
“Clean Architecture is a must while developing apps.”
App developers always come across this nuance of architecture. Some say it is just a waste of time while others greatly focus on it. So, some important questions arise that need to be answered. Let's explore the phenomenon of clean architecture. And why it became so important.
Parts:
Introduction to Clean Architecture
Foundations of Architecture
Which Architecture should we choose while developing apps?
A New Approach Towards Clean Architecture
Should we care about Clean Architecture from a business point of view?
I will keep adding to this series of articles with mobile system design, etc. So, stay tuned for that.
Sponsor:
This newsletter is sponsored by me. If you want to sponsor this newsletter. You can reach out to me on Twitter.
Introduction to Clean Architecture:
Clean architecture is not a unique idea but a synthesis of many ideas. It is not a programming concept but a preferred structure for all software. It acts as a guideline that developers use to produce scalable and maintainable apps.
Ideas like Hexagon architecture, onion architecture and layering architecture gave inspiration to clean architecture. Each of these architectures explored or introduced new benefits for developers. But, overall the foundational idea of the architecture remained the same. Clean architecture is based on SOLID principles. If you can understand the SOLID principles and implement them then you are implementing clean architecture.
But a question remains unanswered.
Why do we need Clean Architecture?
Here are some reasons:
Good architecture gives us a model to build software that is testable, maintainable and expandable
→ It separates our code into individual entities that are not coupled to each other
→ Instead they depend on abstractions like interfaces to talk to each other
→ Writing tests for decoupled codebases becomes easier
→ Individual codebases can be easily injected into new components
→ Adding new components or code bases becomes much easier
→ Easier for new developers to contribute to the legacy codebase
So have you heard about MVVM or MVP? Do they follow clean architecture?
Yes
MVVM, MVC, MVP or Viper are all based on clean architecture. We have given different names to the layers of codebases but the foundational idea remains the same.
Clean architecture → Follow SOLID principles and separate code into individual entities that are not coupled to each other.
But does the clean architecture take a lot of time? Does it make sense from a business point of view?
These were some of the basic benefits of clean architecture. But, let us argue that we do not care about these benefits. Instead, we care more about getting our MVP ready for production. So, that we can test it in the market.
Does Clean architecture make sense for MVP?
The nuance of clean architecture seems to break in the case of MVPs. Startups or small companies focus more on getting the codebase ready for the market. Instead of following all the good practices. They code the software as quickly as possible without caring about its maintenance.
Startups are more interested in getting products ready and out in the market. So that they can test and pivot with the user’s wants.
But is this the right approach?
Yes and No
Before clean architecture comes system design. If we have designed the system correctly then we do not need to care much about clean architecture for MVPs. Instead, companies should focus more on producing features and testing them in the market.
This was an introduction to clean architecture. I hope it ignited a little bit of curiosity as well as give you a new point of view. We will go step by step with this series. If you want to give me some feedback you can find me on Twitter.
> Here <
This is for today I hope enjoyed this newsletter. If you enjoyed it please let me know and if I have written something wrong please forgive me.
Thank you for reading
Regards,
Developer Commute’s Captain
Free Ebook
Dad Developer Meme
Tweets That You Might Love
Tweets That You Will Find Interesting
Android Developer aye?
Do you know about Clean Architecture?
Here is how I used it in a production-level app:
(1/14)
— Hitesh Kohli | App Developer (@Hitesh__kohli)
4:19 PM • Dec 5, 2023
Android Developer aye?
Understand the basics of Android
Activities are the foundation of Android
Here is everything:
(1/10)
— Hitesh Kohli | App Developer (@Hitesh__kohli)
4:05 PM • Jan 1, 2024