Architecture principles
Now that we are able to build and deploy on an AVD, let's resume the development phase itself.
Standalone application
In "simple cases", the Android application has no contact with any other tier. The application is self-dependent. Therefore, the principles of architecture common to any other standalone application apply.
The application has to be divided based on functional criteria, for instance: domain or model, Data Access Object (DAO), service, and view. In Android terminology, views are activities. A graph of direct dependencies is shown in the following image:
In other terms, the view may have direct access to the services, but not to the DAO layer. Yet, any layer is aware of the model.
This best practice allows developing many applications built on common basic blocks, with a frontend and a behavior being totally different.
The management of external dependencies is regular: dependencies are defined mainly by the triplet groupId
, artifactId,
and...