-
Notifications
You must be signed in to change notification settings - Fork 0
Need of architecture in application
Devrath edited this page May 29, 2021
·
1 revision
- When you start to build complicated applications the way in which you structure your code becomes very important.
- When people start to build applications, people start to add more and more code to
fragment/activity. - New developers keep joining the team, they start building the applications in a similar way.
- This is a problematic situation because the Application doesn't follow the separation of concerns.
- Separation of concerns states that each classes stay focused in as many small number of tasks.
- You can consider the
activity/fragmentto be a layer responding to thelife cycle eventsfrom theoperating system. - Adding your business logic to the
activity/fragmentbreaks separation of concerns - It is very difficult to test this business logic here because you always need to run
device/emulatorto test your business logic which you could have done without and just could have used aJVMto unit test the business logic.