Skip to content

Sample apps to understand common architectures used to build Android apps

Notifications You must be signed in to change notification settings

antranapp/14DaysOfAndroidArchitecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Android MVVM Architecture in 14 stress free days.

Introduction:

  • Learning Architecture is an important step when learning software development.
  • Architectures are hard to learn since there are so many of them.
  • Most of tutorials found in Internet introduce too many concepts at the same time and it is hard to follow for most of beginners.

What you should already know:

  • You should have some basic knowledges of Object-Oriented programming.
  • You should have some basic knowledges of Android development.
  • You should have installed all required development tools for Android development on your machine.

What you'll learn:

Hands-on coding:

What you'll do:

the cat app

We will implement a cat images browsing app with the following features:

  • Fetching list of cat images from TheCatAPI.
  • Displaying fetched images in a grid layout.
  • Using recommended techniques and frameworks from Google to implement the app using MVVM architecture step by step.
  • Implementing the app in an incremental process, starting with a pure Kotlin implementation to a full-blown MVVM-based implementation using frameworks in Android's Architecture Components and popular 3rd-party frameworks.

What's next:

After finishing the course, you'll have hopefully learned intuitively how the MVVM Architecture works by implementing a simple app by using different popular frameworks provided by Google and 3rd parties. Depending on your motivation and the level of knowledge, you can follow different paths forward to learn more about Android development.

A small step:

Try to apply what you have learnd in another app that uses the dog api instead. With this approach, you will have more or less the same structure for you app but you have to deal with a different data model, a different api.

A medium step:

There are two options to learn even more:

  • Extending the current cat app by implementing additional features such as:

    • users can favorite images, the information of favorite images should be persisted locally in some kinds of database, and there should be an additional screen to show such favorite images
  • Implementing a completely different app using public or private APIs to try out different techniqures:

    • Github App using Github API
    • News App using newsapi.org
    • Image browsing apps using Unsplash or Pixabay APIs
    • ....

There are a list of public APIs that you can use to implement your next sample app here https://github.com/public-apis/public-apis

A giant step:

Everyone of us has an idea (or multiple ideas) for a killer app (or apps). Go forward and realize your dreams. You will be proud of yourself afterward :)

Curriculum:

This basic project is implemented in pure Kotlin and built-in frameworks from the Android SDK and doesn't use any 3rd party frameworks.


  • Volley is used for Networking.
  • Gson is used for Deserializing of JSON response.
  • Picasso is used for displaying & caching of image data.

  • Retrofit is used for Networking.
  • Moshi is used for Deserializing of JSON response.
  • Glide is used for displaying & caching of image data.

Resources:



Resources:




Resources:


Inject the repository directly into the ViewModel


  • Folder structure
  • Multiple ViewModels
  • Multiple Dagger modules
  • Caching using Room

Resources:


  • PagedList Component.
  • NetworkState in ImageDataSource

Resources:


Day 12: Testing


Day 13: Apply further advanced techniques:


  • Build-time code generation (Dagger) vs Runtime dependency injection.

Resources:

Additional Resources:

Architectures:

Dagger:

Completed apps: