Foresight 👀 into the Future 🔮 of Mobile 📱 Development

YLabZ
8 min readFeb 23, 2022

--

Photo by Bhaumik Shrivastava on Unsplash

The journey into modern mobile development detailed by a series of Tweets.

This article covers both Android (Jetpack / Compose / Kotlin Flow) & iOS (Swift / SwiftUI / Swift Structured Concurrency).

It is my belief that:

  • Every line of Objective-C / UIKit / GCD / MVC will need to be rewritten to Swift / SwiftUI / Swift structured concurrency / Combine Framework (MVVM).
  • Every line of Java / XML / MVC will need to be rewritten to Kotlin / Jetpack Compose / Kotlin Flow (MVVM).
  • Kotlin Multiplatform Mobile (KMM) shows great promise and following the previous two built points will make moving to KMM much easier.

Being able to see the future direction of mobile development is a huge win for the company(time/money), developer happiness, and most importantly a better product for our users.

Developer velocity is the key to innovation. The faster the develop, test, learn, repeat cycle is the better the final product. — Ash

Having spent years building on mobile these are the important lessons learned:

  1. Native declarative / reactive development is the way to go.

Helping companies adopt MVVM architecture we have seen huge benefits.

2. Bluetooth is very important

3. True advancement in healthcare will be made by combining:

  • Mobile sensors
  • Machine Learning
  • Understanding real time physiological data/state of a person.

Charting the future of Android development

Have been doing this before day one!

  • Wrote one of the first articles explaining Jetpack Compose
  • One of the first Jetpack Compose apps on Google Play Store
  • Teaching / Speaking around the country
  • Participated in the first ever Jetpack Compose developer challenge (won 2/4)

Kotlin

Knowing Jetbrains builds amazing tech was always interested in Kotlin.

Android Announces Support for Kotlin (17 May 2017)

Started teaching Kotlin as soon as the Android team announced support.

Jetbrains sponsored our track teaching Kotlin @ SVCC. They have done an amazing job with Kotlin.

Presented @ Google Dev Group the power of Kotlin and how it makes Android development better.

Presented both Android (Kotlin) and iOS (Swift) development to make the case that mobile development is getting much better.

Presenting @ Google making the case that Kotlin is the best language for Android development.

Nov 27, 2018

Built all apps using Jetpack Libs.

https://developer.android.com/jetpack

Traveled to Boston to review how Kotlin makes Android much better. Covered Kotlin Flow and MVVM.

Because we learned Kotlin we could make the jump to Jetpack Compose!

Jetpack Compose

Android announced Jetpack Compose at Google I/O 2019 just a few months before SwiftUI. Wrote one of the first articles explaining Jetpack Compose.

Had to build Android Studio from source just to use Jetpack Compose!

Kotlin Flow (MVVM / MVI) with Jetpack Compose

Using Jetpack Compose with Kotlin Flow we can build elegant declarative / reactive mobile apps.

Building Apps for the Google Play Store

Using all the power of the new Android development framework building apps for the Google Play Store.

Charting the Future of iOS Development

The future belongs to (the) Swift.

Being aware of the amazing work Chris Lattner was doing with LLVM* it was not a complete surprise when Swift was announced at Apple WWDC 14 (June 2 to 6, 2014) as “Objective-C without C”.

Only a few days later started teaching Swift — Jun 13

(Jun 13, 2014)

Immediately started speaking at events trying to convince everyone that Swift was the future by focusing on the strengths of Swift and how it solved various issues of Objective-C.

Swift / iOS @ AT&T Dev Summit

Day long session teaching iOS development with Swift.

(Jan 4, 2016)

Swift / iOS @ SVCC

And continued showing people that Swift is the future of iOS development.

(Sep 29, 2015)
Jul 10, 2017
Jun 13, 2018

Most people were very reluctant to switch to Swift but it is the key to future iOS development. If they do not move to Swift then they can not move to SwiftUI and Swift structured concurrency. This is just the tip of the iceberg.

At WWDC 21 they only had one session that even mentioned Objective-C in passing.

Note: In some tweets use Objective-C(rap) but that is just in jest and fun. Spending years coding Objective-C have much respect for it. Objective-C is a great language for what it is (older then C++) but its time has come and gone.

Most people do not like programming in Objective-C(rap)

Only a few languages are disliked as much as Objective-C(rap)

It’s time to move to Swift!

SwiftUI

SwiftUI was released at WWDC 2019 — Jun 3, 2019.

Started teaching SwiftUI just after it was released — July 4, 2019!

Jul 4, 2019

SwiftUI is declarative and allows the same code to run on all form factors (phone / mac / tv / watch). When Apple releases the foldable this will be the best (only?) way to build the UI.

Combine Framework (MVVM Architecture)

Day long session covering SwiftUI & Combine Framework

Aug 8, 2020

Swift Structure Concurrency

Swift needs a threading model. It is a vital part of any modern language. Now that we have Swift structured concurrency we no longer need Gand Central Dispatch (GCD).

May 31, 2021

Teaching half day session on Swift structured concurrency

Swift / SwiftUI / Swift Structured Concurrency are the the future of iOS!

New from WWDC 22

And even today still trying to convince people this is the future. This is an ongoing endeavor to help people see the future of mobile development.

Believe time is showing that this is the correct path for future iOS development.

Android / iOS convergence

Now teaching Android and iOS at the same time as the concepts are very similar.

The Power of the Smartphone

Powering the future

Why is all this so important?

Using the best language / framework / architecture allows us to push the limits of what we can do with a smartphone!

Always thinking how to harness the power of the smartphone.

These tools allow us to build apps at the speed of thought. Developer velocity is the key to innovation. The faster the try, learn, repeat cycle is the better the final product.

Summery of Experience

A brief look at our experience build MAD App.

Jetpack Compose

Started building Jetpack compose from the very beginning:

In these series of articles we show how to build Android Studio from source so we can start using Jetpack Compose back in May 19th 2019!

Open Source Projects

Yelp Finder App

A declarative reactive Android application built using Jetpack Compose and Kotlin flows.

Source:

Article:

Features

Android Arch

  • Gradle modularised project by features
  • The Clean Architecture with MVI pattern in presentation layer
  • Jetpack Compose (maps) / Material 3 design 100% Previews — for UI layer
  • Kotlin Coroutines & Kotlin Flow — for concurrency & reactive approach
  • Kotlin Serialization converter — for JSON parsing
  • Ktor — for networking
  • Hilt — for Dependency Injection pattern implementation
  • Room — for local database
  • Coil — for image loading
  • Version Catalog — for dependency management
  • JUnit5, Turbine and MockK — for unit tests
  • Jetpack Compose test dependencies and Hilt — for UI tests
  • GitHub Actions — for CI/CD
  • Renovate — to update dependencies automatically
  • KtLint and Detekt — for code linting
  • API keys stored in app’s BuildConfig

video

This video demonstrates the Yelp Finder app, a declarative reactive Android application built using Jetpack Compose and Kotlin flows. The video showcases the app’s features and how it efficiently retrieves and displays Yelp data.

Here’s a summary of the key features:

  • Map View: Makes efficient Yelp GraphQL calls for businesses on the map by category and automatically updates markers as the map moves or the category changes. Tapping a marker shows its name, rating, and centers the map on it.
  • List View: Shows the same data as the map view but in a list format. Tapping a list item shows a detailed view.
  • Detailed View: Shows the business image, location on the map, and driving directions if permissions are granted. It also has a share button for social media.
  • Favorites View: Shows businesses favorited from the list view. These favorites are also accessible from the heart icon in the bottom bar, allowing you to manage them globally.
  • Real-time Updates: All tabs share the same data source, so they update in real-time as you move the map, update the list, or change favorites.
  • Driving Directions: The detailed view instantly shows driving directions when you grant permissions. You can also re-center the map to your current location using the compass icon.
  • Global State: The app preserves its state across restarts, so you’ll always see the same data when you reopen it.

Overall, Yelp Finder is a powerful and user-friendly app that helps you explore and find businesses near you. It leverages the capabilities of Jetpack Compose and Kotlin flows to provide a smooth and efficient experience.

MVI KFlow

Detailed Description:

We take a standard MVVM Android Arch Component (AAC) project (Room, Repo, ModelView, Activities/XML) and replace them with “the new stuff”.

Replacing:

  • MVVM with MVI
  • Activities/XML (navigation) with Compose (screens)
  • Livedata with Kotlin Flow
  • Workmanager with CoroutineWorker
  • RxJava with Kolin ShareFlow

Also adding

  • Dagger Hilt
  • Coil

Video:

Slides

Source

Companies

Apps on Android Play Store

Apps on Google Play Store

https://play.google.com/store/apps/developer?id=YLabZ&hl=en_US&gl=US

Please leave any comments and feedback. Looking forward to hearing from you.

Thanks,

~Ash

--

--

No responses yet