Category Archives: Android

AndroidX migration in a nutshell

Why AndroidX By the introduction of AndroidX, clear distinction is now made between the operating system packages and the support libraries or dependencies used to extend it. Going forward, the former (android OS) is going to be inside android and the support libraries inside  androidx package hierarchy. Not only does this make things clearer but it also enables… Read More »

android architecture: Part 7: ViewModel with LiveData and RxJava

Scope In part 6, I rewrote the movie search app in MVVM using LiveData  and ViewModel  architectural components from Jetpack. The app looks good in portrait mode, but there is an issue when screen rotates which is due to what I call an incorrect use of LiveData in part 6. This was deliberately made to draw… Read More »

android architecture: Part 6: MVVM with LiveData and ViewModel

Introduction In part 4, I started with implementing my benchmark movie app in Model-View-ViewModel (MVVM) using RxJava and with no use of Google architecture components (part of Jetpack now). Part 5 is where I first used LiveData as an architecture component, where I showed how LiveData can be used as a simple lifecycle-aware alternative to RxJava for implementing… Read More »

android architecture: Part 5: MVVM with LiveData

Introduction In the last part, I wrote about Model-View-ViewModel (MVVM) and its structure, together with an implementation of the same sample movie search app I introduced in the first part of the series. As mentioned in part 4, MVVM is chosen by Google as the standard for writing android apps owing to its advantages over… Read More »

android architecture: Part 4: MVVM with RxJava

What is MVVM architecture? Model-View-ViewModel (MVVM) is a successor of MVC, invented by Microsoft architects to apply event-driven programming to applications involving user interface (UI) (Here is the original article). Separation of concerns reaches its highest in this architecture, as the different parts of the architecture are completely separate and have minimum dependence on each… Read More »

android architecture: Part 3: MVP

Previous parts: Part 1: introduction Part 2: MVC What is MVP architecture? In the previous part, I wrote about some pitfalls of the MVC architecture and attributed them to the fact that the Controller does not DIRECTLY pass the data to the View and informs the View to get it directly from the Model. Well,… Read More »

android architecture: Part 2: MVC

This is the second article of the series on android architecture. The first part outlines the content to be discussed in the series. What is MVC architecture? The model-view-controller (MVC) has been the traditional architectural pattern for developing applications having user interface. Even though as an android architecture for developing apps, it is not much popular… Read More »

android architecture: Part 1: introduction

Scope There are many ways of writing android applications especially for simpler cases, but how they compare to each other is a question of android architecture whose answer distinguishes developers. A beginner in android development might be able to build an application that meets the same functionality as that built by an experienced developer. It… Read More »