SlideShare a Scribd company logo
1 of 142
Download to read offline
ONCE
UPON A TIME…
A story by @neteinstein / @tiper …………………
#dclx23
ONCE
UPON A TIME…
… A MULTIPLATFORM, MULTI-TENANT CHALLENGE…
A story by @neteinstein / @tiper …………………
(the bald guy) / (the small guy)
#dclx23 / #JustSawSomebodyFromMinderaSpeak
@neteinstein @tiper
Mobile Software Craftsman @ Mindera
Helping teams getting better with LoopGain
Co-Founder @ GDG Porto
Burning people @ O Que Arde Cura
Somebody who sometimes the keys I hit on the
keyboard generate a sequence of characters
that resembles working code that somehow find
its way into production @ Mindera
@neteinstein @tiper
Mobile Software Craftsman @ Mindera
Helping teams getting better with LoopGain
Co-Founder @ GDG Porto
Burning people @ O Que Arde Cura
Somebody who sometimes the keys I hit on the
keyboard generate a sequence of characters
that resembles working code that somehow find
its way into production @ Mindera
#JustSawSomebodyFromMinderaSpeak
And so it begins
AS WITH ALL GOOD STORIES… WITH A COMPANY TRYING TO BUILD 7 APPS FROM A SHARED CODE BASE…
7 tenants, 1 Codebase, ideas?
React
Flutter Xamarin
WARNING
THE FOLLOWING SLIDES
CONTAIN FACTS AND
OPINIONS THAT MIGHT
TRIGGER FANBOYISM
Go for it if…
… having a top notch app is core to your business;
… Focused on each ecosystem’s UI/UX — patterns easily recognised by
users
… core features require using the state-of-the-art and leverage all the
platform capabilities.
But…
… you have budget to maintain 2-N teams, given more developers are
needed, as they are specialised.
… more code bases means more alignment, possible bugs etc
Go for it if…
… your company’s know-how is .NET/C#
… the app is not core to your business, or it is but you
have a lot of complex code to share among apps
… you want 1 team / reduce costs
But…
… the app might not be as performant as other options;
… developer community support is a real concern;
… can be twice as big as a native file
… not the best for apps with complex graphics
Go for it if…
… your company’s know-how is strong in React *
… the app is not core to your business, or it is, but you have a lot of
complex code to share among apps;
… time-to-market frame is key or you’re trying to build a POC, that you
might or might not reuse code from.
… you want to reduce costs
But…
… depending on the complexity of the app, at some point during
development you are likely to need native development
… the app will have “good enough” performance as it becomes more
complex, unless you go for native solutions to cope with that.
Go for it if…
… your company’s know-how is strong in Dart;
… you want a complete common app (UX/UI + Logic)
… you’re trying to build a POC, that you might or might
not reuse code from
But…
… finding Dart developers can be challenging (and
expensive)
… there is always the risk of Google dropping Flutter
Go for it if…
… you already have good Android devs with Kotlin experience
… having a top-notch app is core to your business
… you want to just share the logic not UX/UI
… you want to reduce costs (less devs and codebase)
But…
… still Beta
… still hard to find devs with proper KMP knowledge
…still exports to iOS as Obj-C
Go for it if…
… you already have good Android devs with Kotlin
experience
… a common UI/UX between OSes is desirable
… you want to reduce costs
But…
… still Alpha for iOS
… harder to customize components on each OS
7 dif Apps, 1 Codebase, ideas?
React
Flutter Xamarin
SERIOUS NOTE
EACH FRAMEWORK IS A TOOL
THERE IS NO SINGLE PERFECT
TOOL FOR EVERY JOB
DON’T FORGET THAT
7 dif Apps, 1 Codebase, ideas?
React
Flutter Xamarin
7 dif Apps, 1 Codebase, ideas?
React
Flutter Xamarin
Your option better be good…
7 Apps, 1 Codebase…ideas?
React
Flutter Xamarin
Your option better be good…
7 Apps, 1 Codebase…ideas?
React
Flutter Xamarin
Your option better be good…
Before you ask:
Yes, it’s me and
I had hair…
7 Apps, 1 Codebase…ideas?
React
Flutter Xamarin
Your option better be good…
No, Tiago was
still the same
size…
Before you ask:
Yes, it’s me and
I had hair…
7 Apps, 1 Codebase…ideas?
React
Flutter Xamarin
Your option better be good…
No, Tiago was
still the same
size…
Before you ask:
Yes, it’s me and
I had hair…
Now stop the
questions, let’s
continue.
7 Apps, 1 Codebase…ideas?
React
Flutter Xamarin
Your option better be good…
The right answer is…
The right answer is… a question!
The right answer is… a question!
What are the constraints?
You’re the first one to ask…
💡 Shared logic
🖌 Features might have same or different UX/UIs
Meaning:you need to support both - we’ll decide along the way
💸 Budget
💥 Single code base for 7 tenants didn’t scale
properly…
7 Apps, 1 Codebase, ideas?
React
Flutter Xamarin
Your option better be good…
Kotlin
Multiplaform?
Ok, let’s deep dive…
API
Let’s start simple… so apps connecting to an API.
Native UI
Native UI
Shared Code
API
Step 2: Break into Native UI and Shared Code (KMP)
Native UI
Native UI
Shared Code
API
Step 3: We can have multiple Apps being fed by the Shared
code layer (each with its UI layer)
Native UI Native UI
And how the hell do we
share:
● Common features
● UI components?
Good question!
Let’s assume 2 tenants for simplicity.
App P App T
Step 4: Let’s deep dive into the Android side.
Native
App
Code
Profile Register
…
Login
Step 4: Let’s deep dive into the Android side.
Native
App
Code
KMP
Shared
Library
Login
Business Logic Module
Profile Module
Register
Business Logic
Module
…
Network Module
...
Profile UI Register UI
…
Login UI
…
Step 4: Android: UI Components Library
Native
App
Code
KMP
Shared
Library
Login
Business Logic Module
Profile Module
Register
Business Logic
Module
…
Network Module
...
Profile UI Register UI
…
Login UI
…
Big Button
Android Native
UI Components Library
Text Label
Small Button
...
Step 4: A feature has 2 blocks
Native
App
Code
KMP
Shared
Library
Login
Business Logic Module
Profile Module
Register
Business Logic
Module
…
Network Module
...
Profile UI Register UI
…
Login UI
…
Big Button
Android Native
UI Components Library
Text Label
Small Button
...
Step 4: Android: and a feature have different logic
implementations (and UI)
Native
App
Code
KMP
Shared
Library
Login
Business Logic Module
Profile Module
App P Profile App T Profile
Register
Business Logic
Module
…
Network Module
...
Profile UI Register UI
…
Login UI
…
Big Button
Android Native
UI Components Library
Text Label
Small Button
...
Step 4: Android: and a feature have different logic
implementations (and UI)
App P Native Code
KMP
Shared
Library
Login
Business Logic Module
Profile Module
App P Profile App T Profile
Register
Business Logic
Module
…
Network Module
Homepage Logic
Profile UI
…
Big Button
Android Native
UI Components Library
…
App P Native Code
Profile UI
Homepage UI
Homepage UI
Login UI
Android Native
Common Features
…
Step 5: iOS (same with an extra layer to bring Swift sugar
syntax)!
Native
App
Code
KMP
Shared
Library
Login
Business Logic Module
Profile Module
App P Profile App T Profile
Register
Business Logic
Module
…
Network Module
...
Profile UI Register UI
…
Login UI
…
Big Button
iOS Native
UI Components Library
Text Label
Small Button
...
Objective-C to Swift Abstraction Layer
Step 5: iOS!
Native
App
Code
Profile UI Register UI
…
Login UI
Objective-C to Swift Abstraction Layer
Again this Native App Code above is a simplified version.
It will contain an Architecture pattern, Navigation, Deep
Links, Pushs, etc as a “normal” app.
Step 6: Architecture curiosity.
Native
App
Code
Profile UI Register UI
…
Login UI
Objective-C to Swift Abstraction Layer
Native
App
Code
Profile UI Register UI
…
Login UI
TCA
MVVM
Step 7: How do we export?
Login Module
Register Module
Register Module
Domain
Module
Profile P
Module
Network Module
App P Business
Library
Profile T
Module
App T Business
Library
Step 8: And how do we work with all this?
Dependency
Dependency
Dependency KMP Common Lib
Business Layer (API,
DB..)
Dependency
Dependency
Step 8: How does it work on Android?
Android Common Components
Kotlin Code for Android native
UI components
App T Android
App P Android
Android Common Features
To be shared across tenants
Step 8: And how do we work with all this?
Dependency
Dependency
Dependency KMP Common Lib
Business Layer (API,
DB..)
Dependency
Dependency
Step 9: And iOS?
Export
Export
iOS Common Components
Swift Code for Android native
UI components
App T iOS KMP
XCFramework generated from KMP
for iOS App consumption
App T iOS
iOS Common Features
To be shared across tenants
Dependency
App P iOS
Dependency
App P iOS KMP (Exports)
XCFramework generated from KMP
for iOS App consumption
Dependency
Dependency
Dependency
Android Common Components
Kotlin Code for Android native
UI components
App T Android
App P Android
Android Common Features
To be shared across tenants
Are you sure you can do
this?
Let’s deep dive to
prove it!
Credits to https://duffthepsych.com/
Before the code overdose…
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
WARNING
THE FOLLOWING SLIDES
CONTAIN FACTS AND
OPINIONS THAT MIGHT
NOT WORK FOR YOU
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:components:theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin DSL
:components:theme :components:composables
build.gradle.kts {
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin
:components:theme :components:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin
:components:theme :components:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin
:components:theme :components:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin
:components:theme :components:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:components:theme :components:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:components:theme :components:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:androidApp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:androidApp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:androidApp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:androidApp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:androidApp
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin
:feature:prime:domain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin
:feature:prime:domain :feature:prime:data
Implementation goes here
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:feature:prime:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:feature:prime:composables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:feature:prime:composables
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:feature:prime:presentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Compose
:feature:prime:presentation
viewmodel
presenter
antonio
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Android
:tenant:android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Android
:tenant:android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Android
:tenant:android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Android
:tenant:android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Android
:tenant:android
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need.
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s recap ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build.gradle.kts {
}
Kotlin DSL
:feature:prime:data
:feature:prime:domain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin DSL
:feature:prime:data
:feature:prime:domain
:shared
build.gradle.kts {
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Kotlin DSL
:feature:prime:data
:feature:prime:domain
:shared
build.gradle.kts {
}
Let’s “check” ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s “check” ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s “check” ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s “check” ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s “check” ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Let’s “check” ‘the requirements’ {
}
Shared UI components. That can be themed and
customized per need
Shared features. Data, business logic, UI
Architecture agnostic. Each tenant/platform can
have its own MVDeprecatedNextYear
Navigation independent. Each tenant will define
its own
Compose multiplatform support
Thank you!
And then the code
lived happily ever after…
You wish…
Tell the truth!
Erm…
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.1 {
}
Life DSL
What we learned on the KMP journey
● Be sure what you are trying to accomplish
Do you need shared logic, features, components? For business sometimes it
all seems the same.
● Get the right team
Being an Android dev is not equivalent to developing KMP properly
● Act as one team, not 2 (Android & iOS)
This needs much closer alignment between OSes make sure that happens
● Start with less repos and break slowly
Multiple repos is cumbersome. Use submodules or merge repos if the team is
small
● iOS will be dependent on Android
Either have everyone working on KMP or make sure the Android team is large
enough
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.1 {
}
Life DSL
What we learned on the KMP journey
● Be sure what you are trying to accomplish
Do you need shared logic, features, components? For business sometimes it
all seems the same.
● Get the right team
Being an Android dev is not equivalent to developing KMP properly
● Act as one team, not 2 (Android & iOS)
This needs much closer alignment between OSes make sure that happens
● Start with less repos and break slowly
Multiple repos is cumbersome. Use submodules or merge repos if the team is
small
● iOS will be dependent on Android
Either have everyone working on KMP or make sure the Android team is large
enough
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.1 {
}
Life DSL
What we learned on the KMP journey
● Be sure what you are trying to accomplish
Do you need shared logic, features, components? For business sometimes it
all seems the same.
● Get the right team
Being an Android dev is not equivalent to developing KMP properly
● Act as one team, not 2 (Android & iOS)
This needs much closer alignment between OSes make sure that happens
● Start with less repos and break slowly
Multiple repos is cumbersome. Use submodules or merge repos if the team is
small
● iOS will be dependent on Android
Either have everyone working on KMP or make sure the Android team is large
enough
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.1 {
}
Life DSL
What we learned on the KMP journey
● Be sure what you are trying to accomplish
Do you need shared logic, features, components? For business sometimes it
all seems the same.
● Get the right team
Being an Android dev is not equivalent to developing KMP properly
● Act as one team, not 2 (Android & iOS)
This needs much closer alignment between OSes make sure that happens
● Start with less repos and break slowly
Multiple repos is cumbersome. Use submodules or merge repos if the team is
small
● iOS will be dependent on Android
Either have everyone working on KMP or make sure the Android team is large
enough
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.1 {
}
Life DSL
What we learned on the KMP journey
● Be sure what you are trying to accomplish
Do you need shared logic, features, components? For business sometimes it
all seems the same.
● Get the right team
Being an Android dev is not equivalent to developing KMP properly
● Act as one team, not 2 (Android & iOS)
This needs much closer alignment between OSes make sure that happens
● Start with less repos and break slowly
Multiple repos is cumbersome. Use submodules or merge repos if the team is
small
● iOS will be dependent on Android
Either have everyone working on KMP or make sure the Android team is large
enough
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.2 {
}
Life DSL
What we learned on the KMP journey
● How agnostic do you want to be?
If another team picks up another tenant is it ok to change architectures?
● Compose Multiplatform vs Jetpack Compose
If there is a plan to support other platforms it’s simple to pick up
● Use design tokens
If possible use something like Toolabs with Figma to auto-generate code
● Desktop is useful to force decoupling,
but...
It’s a pain sometimes to support features that are more mobile aimed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.2 {
}
Life DSL
What we learned on the KMP journey
● How agnostic do you want to be?
If another team picks up another tenant is it ok to change architectures?
● Compose Multiplatform vs Jetpack Compose
If there is a plan to support other platforms it’s simple to pick up
● Use design tokens
If possible use something like Toolabs with Figma to auto-generate code
● Desktop is useful to force decoupling,
but...
It’s a pain sometimes to support features that are more mobile aimed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.2 {
}
Life DSL
What we learned on the KMP journey
● How agnostic do you want to be?
If another team picks up another tenant is it ok to change architectures?
● Compose Multiplatform vs Jetpack Compose
If there is a plan to support other platforms it’s simple to pick up
● Use design tokens
If possible use something like Toolabs with Figma to auto-generate code
● Desktop is useful to force decoupling,
but...
It’s a pain sometimes to support features that are more mobile aimed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.2 {
}
Life DSL
What we learned on the KMP journey
● How agnostic do you want to be?
If another team picks up another tenant is it ok to change architectures?
● Compose Multiplatform vs Jetpack Compose
If there is a plan to support other platforms it’s simple to pick up
● Use design tokens
If possible use something like Toolabs with Figma to auto-generate code
● Desktop is useful to force decoupling,
but...
It’s a pain sometimes to support features that are more mobile aimed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Lessons.3 {
}
Life DSL
What we learned on the KMP journey
Keep having fun!
Today’s cement is tomorrow’s app 󰠻
Drop by our yellow booth if you want to know more
about what we are building at Mindera
…or just go all in fanboy and insult us 🙈
We promise we’ll give you a 🤗
anyway!
Btw, we’re hiring!
Mobile is within our
core. We’re grateful to
work with iconic brands.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A ‘Multiplatform’ {
< The End >
@neteinstein / @tiper
[multi-tenant challenge]
}
KMP.kt Mindera.com

More Related Content

What's hot

Learning agility
Learning agilityLearning agility
Learning agilityMegha Gupta
 
More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...
More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...
More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...Qualtrics
 
Agiles Testen
Agiles TestenAgiles Testen
Agiles Testenoose
 
chuyên đề quản trị nhân sự
chuyên đề quản trị nhân sựchuyên đề quản trị nhân sự
chuyên đề quản trị nhân sựÁi Phan
 
Embracing Change - Presentation
Embracing Change - PresentationEmbracing Change - Presentation
Embracing Change - PresentationPaul Segreto
 
Kanplexity - a jumping-off point for Cynefin using Kanban
Kanplexity - a jumping-off point for Cynefin using KanbanKanplexity - a jumping-off point for Cynefin using Kanban
Kanplexity - a jumping-off point for Cynefin using KanbanOrderly Disruption
 

What's hot (13)

Đề tài: Tạo động lực cho người lao động tại công ty Thương mại, 9đ
Đề tài: Tạo động lực cho người lao động tại công ty Thương mại, 9đĐề tài: Tạo động lực cho người lao động tại công ty Thương mại, 9đ
Đề tài: Tạo động lực cho người lao động tại công ty Thương mại, 9đ
 
Learning agility
Learning agilityLearning agility
Learning agility
 
NEXT LEVEL SHOPFLOOR MANAGEMENT
NEXT LEVEL SHOPFLOOR MANAGEMENTNEXT LEVEL SHOPFLOOR MANAGEMENT
NEXT LEVEL SHOPFLOOR MANAGEMENT
 
Tuyển Chọn 200 Đề Tài Khóa Luận Tốt Nghiệp Về Công Ty Xây Dựng, Hay Nhất.docx
Tuyển Chọn 200 Đề Tài Khóa Luận Tốt Nghiệp Về Công Ty Xây Dựng, Hay Nhất.docxTuyển Chọn 200 Đề Tài Khóa Luận Tốt Nghiệp Về Công Ty Xây Dựng, Hay Nhất.docx
Tuyển Chọn 200 Đề Tài Khóa Luận Tốt Nghiệp Về Công Ty Xây Dựng, Hay Nhất.docx
 
More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...
More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...
More Dynamic, More Democratized, More Data: Next-Gen Performance & Talent Man...
 
Agiles Testen
Agiles TestenAgiles Testen
Agiles Testen
 
chuyên đề quản trị nhân sự
chuyên đề quản trị nhân sựchuyên đề quản trị nhân sự
chuyên đề quản trị nhân sự
 
Agile – scrum 101 workshop deck
 Agile – scrum 101 workshop deck Agile – scrum 101 workshop deck
Agile – scrum 101 workshop deck
 
Hoàn thiện công tác quản trị nguồn nhân lực tại Công ty Bảo Vệ An Ninh Toàn Việt
Hoàn thiện công tác quản trị nguồn nhân lực tại Công ty Bảo Vệ An Ninh Toàn ViệtHoàn thiện công tác quản trị nguồn nhân lực tại Công ty Bảo Vệ An Ninh Toàn Việt
Hoàn thiện công tác quản trị nguồn nhân lực tại Công ty Bảo Vệ An Ninh Toàn Việt
 
Luận văn: Giải pháp giảm nghèo ở huyện Ia Pa, tỉnh Gia Lai, HAY
Luận văn: Giải pháp giảm nghèo ở huyện Ia Pa, tỉnh Gia Lai, HAYLuận văn: Giải pháp giảm nghèo ở huyện Ia Pa, tỉnh Gia Lai, HAY
Luận văn: Giải pháp giảm nghèo ở huyện Ia Pa, tỉnh Gia Lai, HAY
 
Embracing Change - Presentation
Embracing Change - PresentationEmbracing Change - Presentation
Embracing Change - Presentation
 
Đề tài phân tích hoạt động quản trị nguồn nhân lực, HAY
Đề tài  phân tích hoạt động quản trị nguồn nhân lực, HAYĐề tài  phân tích hoạt động quản trị nguồn nhân lực, HAY
Đề tài phân tích hoạt động quản trị nguồn nhân lực, HAY
 
Kanplexity - a jumping-off point for Cynefin using Kanban
Kanplexity - a jumping-off point for Cynefin using KanbanKanplexity - a jumping-off point for Cynefin using Kanban
Kanplexity - a jumping-off point for Cynefin using Kanban
 

Similar to A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023

Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
Enterprise ipad Development with notes
Enterprise ipad Development with notesEnterprise ipad Development with notes
Enterprise ipad Development with notesjaxarcsig
 
Common Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfCommon Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfPridesys IT Ltd.
 
Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)Giacomo Bergami
 
Notes (2012-06-08)
Notes (2012-06-08)Notes (2012-06-08)
Notes (2012-06-08)Chris Pitt
 
GTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem SessionGTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem SessionSittiphol Phanvilai
 
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin MultiplatformISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin MultiplatformISS Art, LLC
 
iOS development made easy
iOS development made easyiOS development made easy
iOS development made easyAdrian Thompson
 
Android design lecture #1
Android design   lecture #1Android design   lecture #1
Android design lecture #1Vitali Pekelis
 
Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...
Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...
Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...simonedaniels3
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014Codemotion
 
MyAppConverter DroidconUK 2014
MyAppConverter DroidconUK 2014MyAppConverter DroidconUK 2014
MyAppConverter DroidconUK 2014myappconverter
 
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons  react native vs. flutter vs. ionic vs. xamarin vs. native scriptComparisons  react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native scriptMoonTechnolabsPvtLtd
 
When e-commerce meets Symfony
When e-commerce meets SymfonyWhen e-commerce meets Symfony
When e-commerce meets SymfonyMarc Morera
 
What Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdfWhat Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdfMoon Technolabs Pvt. Ltd.
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case studyJohan Ronsse
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Introduction to Android Develpment
Introduction to Android DevelpmentIntroduction to Android Develpment
Introduction to Android DevelpmentNikhilPawar932560
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentJustin James
 

Similar to A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023 (20)

Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
HealthyCodeMay2014
HealthyCodeMay2014HealthyCodeMay2014
HealthyCodeMay2014
 
Enterprise ipad Development with notes
Enterprise ipad Development with notesEnterprise ipad Development with notes
Enterprise ipad Development with notes
 
Common Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfCommon Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdf
 
Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)
 
Notes (2012-06-08)
Notes (2012-06-08)Notes (2012-06-08)
Notes (2012-06-08)
 
GTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem SessionGTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem Session
 
ISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin MultiplatformISS Art. How to do IT. Kotlin Multiplatform
ISS Art. How to do IT. Kotlin Multiplatform
 
iOS development made easy
iOS development made easyiOS development made easy
iOS development made easy
 
Android design lecture #1
Android design   lecture #1Android design   lecture #1
Android design lecture #1
 
Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...
Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...
Flutter vs Ionic vs React Native vs Xamarin - Which is best for Cross-Platfor...
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014
 
MyAppConverter DroidconUK 2014
MyAppConverter DroidconUK 2014MyAppConverter DroidconUK 2014
MyAppConverter DroidconUK 2014
 
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons  react native vs. flutter vs. ionic vs. xamarin vs. native scriptComparisons  react native vs. flutter vs. ionic vs. xamarin vs. native script
Comparisons react native vs. flutter vs. ionic vs. xamarin vs. native script
 
When e-commerce meets Symfony
When e-commerce meets SymfonyWhen e-commerce meets Symfony
When e-commerce meets Symfony
 
What Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdfWhat Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdf
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case study
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Introduction to Android Develpment
Introduction to Android DevelpmentIntroduction to Android Develpment
Introduction to Android Develpment
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
 

Recently uploaded

Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...wyqazy
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Niamh verma
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 

Recently uploaded (8)

Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 

A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023

  • 1. ONCE UPON A TIME… A story by @neteinstein / @tiper ………………… #dclx23
  • 2. ONCE UPON A TIME… … A MULTIPLATFORM, MULTI-TENANT CHALLENGE… A story by @neteinstein / @tiper ………………… (the bald guy) / (the small guy) #dclx23 / #JustSawSomebodyFromMinderaSpeak
  • 3. @neteinstein @tiper Mobile Software Craftsman @ Mindera Helping teams getting better with LoopGain Co-Founder @ GDG Porto Burning people @ O Que Arde Cura Somebody who sometimes the keys I hit on the keyboard generate a sequence of characters that resembles working code that somehow find its way into production @ Mindera
  • 4. @neteinstein @tiper Mobile Software Craftsman @ Mindera Helping teams getting better with LoopGain Co-Founder @ GDG Porto Burning people @ O Que Arde Cura Somebody who sometimes the keys I hit on the keyboard generate a sequence of characters that resembles working code that somehow find its way into production @ Mindera #JustSawSomebodyFromMinderaSpeak
  • 5. And so it begins AS WITH ALL GOOD STORIES… WITH A COMPANY TRYING TO BUILD 7 APPS FROM A SHARED CODE BASE…
  • 6. 7 tenants, 1 Codebase, ideas? React Flutter Xamarin
  • 7. WARNING THE FOLLOWING SLIDES CONTAIN FACTS AND OPINIONS THAT MIGHT TRIGGER FANBOYISM
  • 8.
  • 9. Go for it if… … having a top notch app is core to your business; … Focused on each ecosystem’s UI/UX — patterns easily recognised by users … core features require using the state-of-the-art and leverage all the platform capabilities. But… … you have budget to maintain 2-N teams, given more developers are needed, as they are specialised. … more code bases means more alignment, possible bugs etc
  • 10. Go for it if… … your company’s know-how is .NET/C# … the app is not core to your business, or it is but you have a lot of complex code to share among apps … you want 1 team / reduce costs But… … the app might not be as performant as other options; … developer community support is a real concern; … can be twice as big as a native file … not the best for apps with complex graphics
  • 11. Go for it if… … your company’s know-how is strong in React * … the app is not core to your business, or it is, but you have a lot of complex code to share among apps; … time-to-market frame is key or you’re trying to build a POC, that you might or might not reuse code from. … you want to reduce costs But… … depending on the complexity of the app, at some point during development you are likely to need native development … the app will have “good enough” performance as it becomes more complex, unless you go for native solutions to cope with that.
  • 12. Go for it if… … your company’s know-how is strong in Dart; … you want a complete common app (UX/UI + Logic) … you’re trying to build a POC, that you might or might not reuse code from But… … finding Dart developers can be challenging (and expensive) … there is always the risk of Google dropping Flutter
  • 13. Go for it if… … you already have good Android devs with Kotlin experience … having a top-notch app is core to your business … you want to just share the logic not UX/UI … you want to reduce costs (less devs and codebase) But… … still Beta … still hard to find devs with proper KMP knowledge …still exports to iOS as Obj-C
  • 14. Go for it if… … you already have good Android devs with Kotlin experience … a common UI/UX between OSes is desirable … you want to reduce costs But… … still Alpha for iOS … harder to customize components on each OS
  • 15. 7 dif Apps, 1 Codebase, ideas? React Flutter Xamarin
  • 16. SERIOUS NOTE EACH FRAMEWORK IS A TOOL THERE IS NO SINGLE PERFECT TOOL FOR EVERY JOB DON’T FORGET THAT
  • 17. 7 dif Apps, 1 Codebase, ideas? React Flutter Xamarin
  • 18. 7 dif Apps, 1 Codebase, ideas? React Flutter Xamarin Your option better be good…
  • 19. 7 Apps, 1 Codebase…ideas? React Flutter Xamarin Your option better be good…
  • 20. 7 Apps, 1 Codebase…ideas? React Flutter Xamarin Your option better be good… Before you ask: Yes, it’s me and I had hair…
  • 21. 7 Apps, 1 Codebase…ideas? React Flutter Xamarin Your option better be good… No, Tiago was still the same size… Before you ask: Yes, it’s me and I had hair…
  • 22. 7 Apps, 1 Codebase…ideas? React Flutter Xamarin Your option better be good… No, Tiago was still the same size… Before you ask: Yes, it’s me and I had hair… Now stop the questions, let’s continue.
  • 23. 7 Apps, 1 Codebase…ideas? React Flutter Xamarin Your option better be good…
  • 25. The right answer is… a question!
  • 26. The right answer is… a question! What are the constraints?
  • 27. You’re the first one to ask… 💡 Shared logic 🖌 Features might have same or different UX/UIs Meaning:you need to support both - we’ll decide along the way 💸 Budget 💥 Single code base for 7 tenants didn’t scale properly…
  • 28. 7 Apps, 1 Codebase, ideas? React Flutter Xamarin Your option better be good… Kotlin Multiplaform?
  • 29. Ok, let’s deep dive…
  • 30. API Let’s start simple… so apps connecting to an API.
  • 31. Native UI Native UI Shared Code API Step 2: Break into Native UI and Shared Code (KMP)
  • 32. Native UI Native UI Shared Code API Step 3: We can have multiple Apps being fed by the Shared code layer (each with its UI layer) Native UI Native UI
  • 33. And how the hell do we share: ● Common features ● UI components? Good question!
  • 34. Let’s assume 2 tenants for simplicity. App P App T
  • 35. Step 4: Let’s deep dive into the Android side. Native App Code Profile Register … Login
  • 36. Step 4: Let’s deep dive into the Android side. Native App Code KMP Shared Library Login Business Logic Module Profile Module Register Business Logic Module … Network Module ... Profile UI Register UI … Login UI …
  • 37. Step 4: Android: UI Components Library Native App Code KMP Shared Library Login Business Logic Module Profile Module Register Business Logic Module … Network Module ... Profile UI Register UI … Login UI … Big Button Android Native UI Components Library Text Label Small Button ...
  • 38. Step 4: A feature has 2 blocks Native App Code KMP Shared Library Login Business Logic Module Profile Module Register Business Logic Module … Network Module ... Profile UI Register UI … Login UI … Big Button Android Native UI Components Library Text Label Small Button ...
  • 39. Step 4: Android: and a feature have different logic implementations (and UI) Native App Code KMP Shared Library Login Business Logic Module Profile Module App P Profile App T Profile Register Business Logic Module … Network Module ... Profile UI Register UI … Login UI … Big Button Android Native UI Components Library Text Label Small Button ...
  • 40. Step 4: Android: and a feature have different logic implementations (and UI) App P Native Code KMP Shared Library Login Business Logic Module Profile Module App P Profile App T Profile Register Business Logic Module … Network Module Homepage Logic Profile UI … Big Button Android Native UI Components Library … App P Native Code Profile UI Homepage UI Homepage UI Login UI Android Native Common Features …
  • 41. Step 5: iOS (same with an extra layer to bring Swift sugar syntax)! Native App Code KMP Shared Library Login Business Logic Module Profile Module App P Profile App T Profile Register Business Logic Module … Network Module ... Profile UI Register UI … Login UI … Big Button iOS Native UI Components Library Text Label Small Button ... Objective-C to Swift Abstraction Layer
  • 42. Step 5: iOS! Native App Code Profile UI Register UI … Login UI Objective-C to Swift Abstraction Layer Again this Native App Code above is a simplified version. It will contain an Architecture pattern, Navigation, Deep Links, Pushs, etc as a “normal” app.
  • 43. Step 6: Architecture curiosity. Native App Code Profile UI Register UI … Login UI Objective-C to Swift Abstraction Layer Native App Code Profile UI Register UI … Login UI TCA MVVM
  • 44. Step 7: How do we export? Login Module Register Module Register Module Domain Module Profile P Module Network Module App P Business Library Profile T Module App T Business Library
  • 45. Step 8: And how do we work with all this? Dependency Dependency Dependency KMP Common Lib Business Layer (API, DB..) Dependency Dependency Step 8: How does it work on Android? Android Common Components Kotlin Code for Android native UI components App T Android App P Android Android Common Features To be shared across tenants
  • 46. Step 8: And how do we work with all this? Dependency Dependency Dependency KMP Common Lib Business Layer (API, DB..) Dependency Dependency Step 9: And iOS? Export Export iOS Common Components Swift Code for Android native UI components App T iOS KMP XCFramework generated from KMP for iOS App consumption App T iOS iOS Common Features To be shared across tenants Dependency App P iOS Dependency App P iOS KMP (Exports) XCFramework generated from KMP for iOS App consumption Dependency Dependency Dependency Android Common Components Kotlin Code for Android native UI components App T Android App P Android Android Common Features To be shared across tenants
  • 47. Are you sure you can do this? Let’s deep dive to prove it!
  • 49. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need.
  • 50. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI
  • 51. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear
  • 52. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own
  • 53. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 54. WARNING THE FOLLOWING SLIDES CONTAIN FACTS AND OPINIONS THAT MIGHT NOT WORK FOR YOU
  • 55. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 56.
  • 77. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 78. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 79. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 80.
  • 81.
  • 84. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 85. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 86.
  • 90. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 91. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 92.
  • 95.
  • 96.
  • 100.
  • 101. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 102. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 113. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need. Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 114. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 115. Let’s recap ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 116.
  • 117.
  • 121. Let’s “check” ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 122. Let’s “check” ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 123. Let’s “check” ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 124. Let’s “check” ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 125. Let’s “check” ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 126. Let’s “check” ‘the requirements’ { } Shared UI components. That can be themed and customized per need Shared features. Data, business logic, UI Architecture agnostic. Each tenant/platform can have its own MVDeprecatedNextYear Navigation independent. Each tenant will define its own Compose multiplatform support
  • 128. And then the code lived happily ever after…
  • 129. You wish… Tell the truth! Erm…
  • 130. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.1 { } Life DSL What we learned on the KMP journey ● Be sure what you are trying to accomplish Do you need shared logic, features, components? For business sometimes it all seems the same. ● Get the right team Being an Android dev is not equivalent to developing KMP properly ● Act as one team, not 2 (Android & iOS) This needs much closer alignment between OSes make sure that happens ● Start with less repos and break slowly Multiple repos is cumbersome. Use submodules or merge repos if the team is small ● iOS will be dependent on Android Either have everyone working on KMP or make sure the Android team is large enough
  • 131. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.1 { } Life DSL What we learned on the KMP journey ● Be sure what you are trying to accomplish Do you need shared logic, features, components? For business sometimes it all seems the same. ● Get the right team Being an Android dev is not equivalent to developing KMP properly ● Act as one team, not 2 (Android & iOS) This needs much closer alignment between OSes make sure that happens ● Start with less repos and break slowly Multiple repos is cumbersome. Use submodules or merge repos if the team is small ● iOS will be dependent on Android Either have everyone working on KMP or make sure the Android team is large enough
  • 132. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.1 { } Life DSL What we learned on the KMP journey ● Be sure what you are trying to accomplish Do you need shared logic, features, components? For business sometimes it all seems the same. ● Get the right team Being an Android dev is not equivalent to developing KMP properly ● Act as one team, not 2 (Android & iOS) This needs much closer alignment between OSes make sure that happens ● Start with less repos and break slowly Multiple repos is cumbersome. Use submodules or merge repos if the team is small ● iOS will be dependent on Android Either have everyone working on KMP or make sure the Android team is large enough
  • 133. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.1 { } Life DSL What we learned on the KMP journey ● Be sure what you are trying to accomplish Do you need shared logic, features, components? For business sometimes it all seems the same. ● Get the right team Being an Android dev is not equivalent to developing KMP properly ● Act as one team, not 2 (Android & iOS) This needs much closer alignment between OSes make sure that happens ● Start with less repos and break slowly Multiple repos is cumbersome. Use submodules or merge repos if the team is small ● iOS will be dependent on Android Either have everyone working on KMP or make sure the Android team is large enough
  • 134. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.1 { } Life DSL What we learned on the KMP journey ● Be sure what you are trying to accomplish Do you need shared logic, features, components? For business sometimes it all seems the same. ● Get the right team Being an Android dev is not equivalent to developing KMP properly ● Act as one team, not 2 (Android & iOS) This needs much closer alignment between OSes make sure that happens ● Start with less repos and break slowly Multiple repos is cumbersome. Use submodules or merge repos if the team is small ● iOS will be dependent on Android Either have everyone working on KMP or make sure the Android team is large enough
  • 135. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.2 { } Life DSL What we learned on the KMP journey ● How agnostic do you want to be? If another team picks up another tenant is it ok to change architectures? ● Compose Multiplatform vs Jetpack Compose If there is a plan to support other platforms it’s simple to pick up ● Use design tokens If possible use something like Toolabs with Figma to auto-generate code ● Desktop is useful to force decoupling, but... It’s a pain sometimes to support features that are more mobile aimed
  • 136. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.2 { } Life DSL What we learned on the KMP journey ● How agnostic do you want to be? If another team picks up another tenant is it ok to change architectures? ● Compose Multiplatform vs Jetpack Compose If there is a plan to support other platforms it’s simple to pick up ● Use design tokens If possible use something like Toolabs with Figma to auto-generate code ● Desktop is useful to force decoupling, but... It’s a pain sometimes to support features that are more mobile aimed
  • 137. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.2 { } Life DSL What we learned on the KMP journey ● How agnostic do you want to be? If another team picks up another tenant is it ok to change architectures? ● Compose Multiplatform vs Jetpack Compose If there is a plan to support other platforms it’s simple to pick up ● Use design tokens If possible use something like Toolabs with Figma to auto-generate code ● Desktop is useful to force decoupling, but... It’s a pain sometimes to support features that are more mobile aimed
  • 138. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.2 { } Life DSL What we learned on the KMP journey ● How agnostic do you want to be? If another team picks up another tenant is it ok to change architectures? ● Compose Multiplatform vs Jetpack Compose If there is a plan to support other platforms it’s simple to pick up ● Use design tokens If possible use something like Toolabs with Figma to auto-generate code ● Desktop is useful to force decoupling, but... It’s a pain sometimes to support features that are more mobile aimed
  • 139. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Lessons.3 { } Life DSL What we learned on the KMP journey Keep having fun! Today’s cement is tomorrow’s app 󰠻
  • 140. Drop by our yellow booth if you want to know more about what we are building at Mindera …or just go all in fanboy and insult us 🙈 We promise we’ll give you a 🤗 anyway! Btw, we’re hiring!
  • 141. Mobile is within our core. We’re grateful to work with iconic brands.
  • 142. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 A ‘Multiplatform’ { < The End > @neteinstein / @tiper [multi-tenant challenge] } KMP.kt Mindera.com