Android Application Architecture

Harshith Shetty
2 min readApr 22, 2018

In Android world, there is a lot of design patterns and many libraries which are used to make a great App Architecture.

In Google I/O 2017, Google introduced Android architecture components which brought a host of libraries which made handling lifecycles and reactive pattern easier to implement than ever before and also a recommended guide to app architecture.

And Kotlin which reduces our code and also brings a lot of inbuilt features on top of Java.

Then there are other libraries like Dagger2 which are crucial for any large scale app where there are lots of dependencies and it’s better to handle them and provide them from one place rather than creating instances all over the places.

I have made a demo project with simplest implementation of these libraries which may help as a starter project or boilerplate to understand how they work together in a MVVM (Model-View-ViewModel) pattern as mentioned in Guide to app architecture by Google.

Link: Mini Android Architecture

Screenshots:

Libraries implemented:

  1. Viewmodel — For keeping our business logic seperate from the view layer(activity, Fragments). It also survives orientation changes.
  2. Room — Local ORM Database
  3. LiveData — Observable data which respects lifecycle. i.e. Data is emitted only when view is in Active state(after OnStart and before OnPause)
  4. Dagger 2 — Dependency injection
  5. SortedList — notifying adapter about changes in list efficiently.
  6. Retrofit — Network API calls
  7. Gson — Json parsing

There are lots of resources and tutorials for each of these libraries by great people explaining them in detail and with abundant knowledge.

If you are new to android you can use this project as a template for playing and learning about MVVM pattern, also go through the documentation and tutorials to learn about them in depth.

Sign up to discover human stories that deepen your understanding of the world.

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

Harshith Shetty
Harshith Shetty

Written by Harshith Shetty

Mobile App Architect @Shaadi.com

No responses yet

Write a response