Ports and Adapters (Hexagon) architecture

Ports and Adapters architecture also known as Hexagon architecture was first introduced and conceptualized in 2005 by Dr. Alistair Cockburn. It can also be referred as an object structural pattern.

»
Author's profile picture Jay Rambhia on Android

Ports and Adapters (Hexagon) architecture

Ports and Adapters architecture also known as Hexagon architecture was first introduced and conceptualized in 2005 by Dr. Alistair Cockburn. It can also be referred as an object structural pattern.

»
Author's profile picture Jay Rambhia on Android

Introduction to MVVM architecture in Android

MVVM stands for Model-View-ViewModel. Google has started recommending usage of this architecture to develop android apps and have provided a lot of new tools and frameworks to support implementation of this architecture. ViewModel and LiveData being the basics to implement it. Google is also working towards providing support to integrate these components seamlessly with android activity and fragment lifecycles. Although the current state of these tools is not ideal, it’s pretty stable and works well.

»
Author's profile picture Jay Rambhia on Android

Implement the Battleship gameplay using Redux in Android

Continuing from the previous article - Battleship game in Kotlin, we will use Redux architecture to write the gameplay. Redux is a predictable state container with unidirectional data flow. As we write our reducers and middleware, you’ll realize what predictable state container brings to the table. It makes everything straight forward and easy to debug.

»
Author's profile picture Jay Rambhia on Android

Battleship game in Kotlin

Battleship is a game of two players which is played on grids on which each players fleet of ships are marked. Players take turns to take shots at the other player’s ships. The objective of the game is destroy the opponent’s fleet. Read more on Wikipedia. Building this game is also a very famous design interview question.

»
Author's profile picture Jay Rambhia on Android

Add Middleware to your Redux architecture implementation

Middleware is a crucial part of Redux architecture. It helps you have side effects in your Redux architecture - making asynchronous API calls, querying your database, handling navigation, logging, etc. No Redux implementation is complete without side effects or middleware. It’s what drives your app.

»
Author's profile picture Jay Rambhia on Android

Write your own Redux implementation in Kotlin

In the previous articles, I talked about Redux architecture and the Role of middleware in Redux. There’s no better way to learn something than implementing it yourself. We are going to write a very lightweight implementation of Redux architecture in Kotlin which can be used for our android app.

»
Author's profile picture Jay Rambhia on Android

Middleware in Redux architecture for android application

In the previous article, I wrote about Redux architecture and how it can be used in an android app - Redux architecture for android apps. At the end of the article, I briefly talked about Middleware. I found Middleware to be the most confusing part about the Redux architecture and none of the posts about Redux architecture talk about much about it so it’s quite difficult to wrap your mind around it.

»
Author's profile picture Jay Rambhia on Android

Redux architecture for android apps

I’m sure you must have heard about Redux architecture from your front end colleagues and friends and maybe from someone who is an app developer. Redux is a very popular framework for a predictable state container for Javascript apps. It has become quite ubiquitous in its usage with React to develop scalable web apps. Redux is inspired from Flux architecture which emphasizes on unidirectional data flow. Redux takes some good parts from Flux - store, actions, dispatcher, unidirectional data flow and improves upon it to.

»
Author's profile picture Jay Rambhia on Android

Android Lint Deep dive - Advanced custom Lint rules

This is the second article in the Android Lint series. In the previous article, we talked about basics of Android Lint tool, how to write a custom lint rule, register the issue and set it up. In this article, we shall explore more about Lint and write a lint rule which is a bit advanced.

»
Author's profile picture Jay Rambhia on Android

Older posts