Introduction
In the previous chapter, you learned about using RxJava and coroutines for doing background operations and data manipulation. Now, you will learn about architectural patterns so you can improve your application.
When developing an Android application, you might tend to write most of the code (including business logic) in activities or fragments. This would make your project hard to test and maintain later. As your project grows and becomes more complex, the difficulty will increase too. You can improve your projects with architectural patterns.
Architectural patterns are general solutions for designing and developing parts of applications, especially for large apps. There are architectural patterns you can use to structure your project into different layers (the presentation layer, the user interface (UI) layer, and the data layer) or functions (observer/observable). With architectural patterns, you can organize your code in a way that makes it easier for you...