Implement the Battleship gameplay using Redux

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

How to get away with READ/WRITE permissions on Android

Android has been using permissions since its beginning but never really enforced the correct usage until Marshmallow and developers took advantage of it and went rampant. Since Marshmallow (API 23, Android 6.0), android ecosystem introduced permission requests and now we have to ask user to explicitly provide permissions which is really good in the sense of privacy for the users, but adds a lot of work for developers and provides kind of bad user experience.

»
Author's profile picture Jay Rambhia on Android

Get started with Android Lint - Custom Lint Rules

Android build system provides a lot of tools to optimize the code, find potential issues, improve performance, etc. One of the tool it supports is Lint. Lint is a tool which analyzes the source code and flags potential bugs and errors during the build, and Android Studio even uses Lint to show those bugs and errors in the editor.

»
Author's profile picture Jay Rambhia on Android

Synchronizing state between different components in Litho

This is the fifth post in the series - Exploring Litho. In the first post - Android GIF search engine with Litho, we explored some key aspects of Litho - LayoutSpec, MountSpec, Use Glide to load images, Update RecyclerView data, etc. In the second post - Managing State in Litho, we dabbled around with state in Litho components. In the third post - Navigation with Litho, we used LithoView and components to navigate instead of an Acitivity or a Fragment. If you’re not familiar with Litho, I would suggest you to go through the previous posts. We explored Events and how to use them to propagate changes in the fourth post - Using Events in Litho.

»
Author's profile picture Jay Rambhia on Android

Older posts