ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Android Architecture šŸ—

Philippe BOISNEY
ProAndroidDev
Published in
10 min readApr 13, 2019

Table of Contents

1. Demonstration Project šŸ“±

This is an 8K GIF. To much power in it.

2. Considering Multi-modules šŸ—„

2.1. App module.

Extract from build.gradle (app).

2.2 Data modules

Example of a DI Module created for the ā€œremote moduleā€.
ArchApp ā€œdataā€ modules. You can also find them here.
ā€œrepository moduleā€ depends on classes that are located within ā€œremoteā€ & ā€œlocalā€ modules.

2.3 Feature modules

ArchApp feature modules. You can also find it here.
DI Module of the ā€œHomeā€ feature (source)

2.4 Navigation module

ArchApp ā€œnavigation moduleā€. You can also find it here.

2.5 Common & CommonTest modules

ArchApp ā€œcommon modulesā€. You can also find them here.

3. Considering MVVM & Databinding šŸš€

Interactions in an MVVM architecture

3.1 MVVM: Model

Extract from GetTopUsersUseCase
Extract from UserRepository

3.2 MVVM: ViewModel

Extract from HomeViewModel

3.3 MVVM: View

Extract from HomeFragment
Extract from fragment_home.xml
Extract from HomeBinding

4. Considering Navigation Component ā›µļø

Red auto-complete in Android Studio
Using SafeArgs feature
Test using FragmentScenario. Extract from HomeInstrumentedTests.

5. Considering Unit & Instrumented Tests šŸš¦

Extract from UserServiceTest (remote module)
Extract from UserDaoTest (local module)
Extract from UserRepositoryTest (repository module)
Instrumented tests for the ā€œHomeā€ feature (source)
Unit tests for the ā€œHomeā€ feature (source)

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Responses (17)

Write a response