Changing an API with Clean Architecture is so easy.
- Nikolay Miroshnychenko

- Dec 6, 2024
- 1 min read

Image by Michal Jarmoluk
Recently, NewsApi.org changed one of the endpoints I use in an app I’m building for my upcoming KMP course. They removed the ability to get news for a specific country, so I decided to switch to NewsData.io to fetch location-based news.
⌛ How long did it take me to switch APIs? 20 minutes.
Why? Because my app uses Clean Architecture (well, Clean-ish Architecture). All the data-related logic is isolated in one layer, so the only thing I needed to change was the mapper between the data and domain layers. That’s it.
Now, imagine if I had scattered API-specific classes all over my app. The refactoring would’ve been a nightmare, especially if this app was already in production.
Clean Architecture often gets a bad rap because of the initial setup—people say it’s overkill or unnecessary. But it’s situations like these where the upfront effort pays off tenfold.
Good architecture is an investment 💰. Even a "Clean-ish" approach can save you time and headaches down the line.
Have you tried Clean Architecture (or "Clean-ish") in your projects? What’s your take—overkill or worth it?
PS: If you’re curious about applying Clean Architecture in Kotlin Multiplatform, stay tuned for my course where this app will play a key role! 🚀






Comments