Author Archives: Ali

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 »

Dependency Injection in the Coffeeshop

Inject what… in the Coffee Shop? I believe if one would like to define an interface whose methods many people implement, it literally has to do with eating. Developers, in particular, are not an exception. The joy of coding in the coffee shop while sipping your double espresso is well known to many of us. For those who have… Read More »