Android Application Architecture - Event-Based or Multilevel

I am creating an SDK that will be used in a hosting application. This SDK will be integrated into applications with a large number of users.

We began to build it with the help of a multilevel architecture - a user interface, managers interacting with models and the network layer. Only three layers. The user interface receives updates on callbacks.


Side note: I was a member of the teams that created several Android applications with a large number of users, and in all of them we used the same multi-level architecture. These applications have active users, and there are still good reviews.


We have a beta version and it seems that everything is working as expected.

A week ago, one of our team members comes and says that he thinks we need to change our architecture based on events. We will have static event descriptors in the SDK that handle all listeners, and sending will be called from another component.

I think this is a little risky, I think it will be difficult to handle a large SDK with a lot of dependencies and services in a multi-threaded environment this way. In addition, since we are building the SDK, we want to isolate our main classes from our host application, and I think it will be almost impossible.

My questions are :

  • Do you think this is correct, is multilevel architecture good, and do we need to adhere to it, or is the event preferable?

  • , SDK, ?

  • , ?

, .

, :

architecting-android-the-clean-way

architectural-patterns-for-mobile-application-development

event-driven-programming-for-android

+4
2

Android , . Android , looper, , . , , . , , .

, Android , ( , , , , ..), , , .

- concurrency , ( concurrency ). , , .

. , SDK, Android ( ), , , .

concurrency () , , , , .

+5

Android. :

, , , . , , , .

,

+1

Source: https://habr.com/ru/post/1609047/


All Articles