Breaking Down Mobile System Design

Hitesh Kohli
6 min readFeb 4, 2024

--

Photo by Amélie Mourichon on Unsplash

I wanted to level up my app development skills. But, I do not want to develop the same old chat applications with Firebase. I wanted something exciting and challenging.

What is one skill that is useful to all app developers despite of their language?

Answer — Mobile System Design

D for Definition

Mobile system design is the study of developing apps that are convenient to use and high in quality. It is the process of decision-making that impacts the revenue to design of the app.

Previously I have explored some foundations of mobile system design:

This article is an extension of it. In this article, we will explore more on the development side of apps.

L for Levels

Mobile System Design can be divided into many levels. They are not strict levels per se, but just a guideline from easy to hard. Let’s get down to each level and explore its significance.

Level 1: Governing Limited Resources of Mobile

Level 1 — Mobile System Design

If someone starts learning app development, they always come across this topic called “Memory leak”. It is one of the most important topics to understand and it forms the foundations of apps.

Memory leak refers to an instance when a program is allocated memory but can not release it. It can be caused due to wrong context usage or giving wrong objects. Memory leaks will cause the app memory to become bloated until the app crashes to free up the space. It is always a bad experience for the user. Therefore, we have to always take care of memory leaks.

Mobile System Design argues that we have to not only manage memory but also other aspects of the app. If we are not managing these aspects then OS will take over to do the necessary management.

Let’s take an example:

In a social media app, if we are loading multiple images in an infinite scrolling feed. Then we need to save some images or videos in the user’s memory. So that we do not have to do an API call again and again. Saving posts on the phone leads to bloated memory. If we do not clear the cache it will lead to a bad user experience for the user. This is one example of memory management in apps

Level 2: Understanding App Development Specifics

Level 2 — Mobile System Design

You could have all the knowledge in the world, but if you are unaware of the thing you want. Then you will not be able to get it.

If we are developing an app and the UI gets stuck. We search around but do not find any mistakes in the code. So, what was the problem?

We were doing a network call on the main thread. If I was not aware of threads then I would not be able to guess it.

Therefore, understanding app specifics like Kotlin coroutines or state management in Flutter plays a crucial role in the app development process.

An app developer should understand app development topics like:

  • Rest API calling
  • WebSockets
  • Pagination
  • SOLID principle etc

Level 3: Understanding Design Patterns

Level 3 — Mobile System Design

Another aspect of app development is to make apps scalable. We can do so by following practices like Clean architecture and design patterns. If you are an Android developer or any app developer, you should understand concepts like dependency injection or factory patterns.

We can easily add new features and remove features from the app with the help of great design patterns.

Level 4: Understanding the UI architecture

Level 4 — Mobile System Design

As app developers level up their skills. They come across a new nuance of App architecture, where concepts like CLEAN architecture or MVVM patterns come into play. They start to tinker with the architectural patterns and mostly overcomplicate things. Then they eventually realize that there is no need for this much complexity. Instead, they are just guidelines, not rules.

However, one aspect of architecture remains untouched during their learning journey. It is the UI layer architecture.

What do I mean by UI layer architecture?

  • UI layer architecture means that we try to architect the UI screens so that they become plug-and-play.
  • If you want to implement a new screen then copy all the functions and design the new screen
  • Plug it into the code and voila we have a new screen

For example:

If I take the example of Instagram. It has multiple layers of features.

How can we design the structure of the UI so efficiently so that we can implement any feature without disturbing or changing other files?

That is the study of UI architecture

Level 5: Understanding Backed data pulling

Level 5 — Mobile System Design

You must have heard this line “ Frontend is just presenting data from the backend”. Well, it is kind of true, until things start to change from the backend. App development is not simply doing a get or a post call to the server and receiving data. Instead, it is more about how can we present the data effectively.

I have already talked about the data model in my previous article. That is one aspect of this. I will write one more article talking about backend development for Android developers.

For now, here is an interesting Twitter thread that you might like.

Level 6 — High-Level architecture

Level 6 — Mobile System Design

We have come to the final level of mobile system design, the app architecture. One of the most controversial and interesting topics to talk about. It is a combination of part product-making decisions and part-development decisions. A good CTO will always understand it.

Main point to keep in mind:

Architecture is designed to make things easier to implement and make the app scalable. It is not designed to overcomplicate things.

Everyone has their own opinion on architecture. Here is mine.

Here are some of my threads on Architecture:

Thank you for reading. I hope you enjoyed this newsletter. If I have written something wrong please forgive me.

If you want these types of blogs and threads in your inbox. Here is an interesting newsletter for you:

If you want to watch me build something. Here is a video. I hope you enjoy it.

If you want to contribute to open source. Here are some Github repos.

--

--

Hitesh Kohli

I will help you build distribution with apps |Building and Designing apps| Writing Newsletters 📩| Building @Developcommute & Niwa