The Top 5 Practices That Make My Android Architecture More Scalable

  Рет қаралды 14,814

Philipp Lackner

Philipp Lackner

Күн бұрын

In this video, I'll share my top 5 practices that I would recommend anyone for their Android codebase to make it more scalable.
Secure the limited testing bonus course before it's gone on July 14th and save 25% with SUMMER:
pl-coding.com/android-essenti...
25% on ALL courses and bundles:
pl-coding.com/premium-courses...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/drop-table-ment...
Get my FREE PDF about 20 things you should never do in Jetpack Compose:
pl-coding.com/jetpack-compose...
Regular programming advice on my Instagram page:
/ _philipplackner_
Join my Discord server:
/ discord
00:00 Introduction
00:36 Practice 1
03:24 Practice 2
05:46 Practice 3
10:55 Practice 4
15:11 Practice 5

Пікірлер: 25
@xAngel03
@xAngel03 15 күн бұрын
1. Dependincy Injection 2. Testing 3. Modular Design 4. Avoiding In-Memory Global State 5. Packge Structure Consistency
@Nek_12
@Nek_12 24 күн бұрын
That feeling when you said you should avoid global state and 10 seconds ago you showed that you had a private mutable var connectedNode that had a race with other coroutines.
@PhilippLackner
@PhilippLackner 24 күн бұрын
Global state is not dangerous if it's automatically re-assigned after process death which is the case for this connected node. If the process dies and is then recreated, we'll have to re-establish the connection anyways. I've also explained that in the course. Not sure which race condition you mean there regarding connectedNode.
@Nek_12
@Nek_12 23 күн бұрын
​@@PhilippLackner The wear messaging class sends messages using connectedNodeId which it will overwrite when you call connectToNode multiple times, causing messages to be sent to the wrong node. The design was supposed to observe and map the current node to a connection flow to prevent multiple clients from using it simultaneously. Your point about the local state is valid, the issue is how you manage it...
@tch.777
@tch.777 24 күн бұрын
Amazing like always, ty ❤
@snb_officall
@snb_officall 20 күн бұрын
Hi philip, could you show how to make one feature? it showed in 3D the real position of the phone in space, not only rotation, but in full from height to tilt, please, I am subscribed to you
@ren7907
@ren7907 23 күн бұрын
Philip, very nice video. Quick question, does it make sense to have a folder/package with only one file inside? for example, the mappers folder has only one file "DeviceNodeMapper".
@littlebitofeverything237
@littlebitofeverything237 24 күн бұрын
Thanks!
@user-pn7hx7wx2k
@user-pn7hx7wx2k 24 күн бұрын
Global state is dangerous, I had to rewrite my code to use local preference instead. Because process death caused app crash. I was tempted to use savedInstanceState to update global state, but I just decided in the end local preference aproach.
@jinde5566
@jinde5566 20 күн бұрын
I was using DataStore and combine with workflow that need Global state in UseCases
@shahar19971
@shahar19971 24 күн бұрын
In case you need global state for contacts Would you use state flow like in your example, or save that into room/datastore?
@snb_officall
@snb_officall 21 күн бұрын
hi Philip, I recently saw a program like crypto steps there to sell sneakers and pay for steps there they asked me for money to start and I deleted it now I can’t find a similar application, could you show me how to make one feature from there? it showed in 3D the real position of the phone in space, not only rotation, but in full from height to tilt, please, I am subscribed to you
@TheBlackManMythLegend
@TheBlackManMythLegend 24 күн бұрын
Just read job offers and learn that . Testing , solid principle , kotlin , jet pack compose and so on.
@aamirhoda7363
@aamirhoda7363 22 күн бұрын
One Question though about "Consistent Package Structure" -- As we have structured packages based on features, then my question is, if my "admin_override" feature has a couple of very small features that open up different screens as follows: 1. setting "printers" config through a screen, 2. showing "system_logs" through a screen, 3. "admin_override" screen itself for setting a couple of values/settings for the app to use; then inside "admin_override" package, should I create sub-packages called "system_logs" & "printers" which will further contain the usual "data", "domain", "presentation", "di" packages; as well as "data", "domain", "presentation", "di" packages in "admin_override" package as well ??? admin_override |__data |__domain |__presentation |__di |__system_logs |__data |__domain |__presentation |__di |__printers |__data |__domain |__presentation |__di 👆 For Consistency ??
@PhilippLackner
@PhilippLackner 22 күн бұрын
That quickly results in package hell :D Don't make it more complex than it needs to be. If you feel like system logs and printers are part of the admin override feature, include them in the corresponding layer packages
@MrPDTaylor
@MrPDTaylor 24 күн бұрын
Phillip, do you know Timo Boll?
@PhilippLackner
@PhilippLackner 24 күн бұрын
Legend
@androidpc9656
@androidpc9656 22 күн бұрын
What if the globol state should not persist only live until the app closes?
@kivan26
@kivan26 22 күн бұрын
All the data should be accessed the same way, trough repositories. It is a repository implementation detail whether the data is stored in DB, file, rest api, shared prefs, or even in memory...
@sureshsivalingam01
@sureshsivalingam01 21 күн бұрын
Hey philipp or anybody know. In Android essential bundle course. I need some clarification which is lifetime access and which is limited time access?
@PhilippLackner
@PhilippLackner 21 күн бұрын
@@sureshsivalingam01 they're all lifetime access
@sureshsivalingam01
@sureshsivalingam01 14 күн бұрын
Thank u
@MrPDTaylor
@MrPDTaylor 24 күн бұрын
Guten tag
@MrPDTaylor
@MrPDTaylor 24 күн бұрын
Ich bin ein Berliner
@MrPDTaylor
@MrPDTaylor 24 күн бұрын
Third
MVVM vs. MVI - Understand the Difference Once and for All
18:40
Philipp Lackner
Рет қаралды 35 М.
derivedStateOf VS. remember(key) - THIS is Really the Difference 🤯
14:46
UNO!
00:18
БРУНО
Рет қаралды 1,8 МЛН
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 4,5 МЛН
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 32 МЛН
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 233 М.
Kotlin Multiplatform vs Flutter: Which should we use?
4:42
Kei Fujikawa
Рет қаралды 17 М.
3 Clean Code Hacks I Bet You Didn't Know (Kotlin & Android)
12:30
Philipp Lackner
Рет қаралды 26 М.
Performance Optimization with @Stable and @Immutable in Jetpack Compose
16:47
It’s time to move on from Agile Software Development (It's not working)
11:07
The Top 3 State Management Mistakes On Android
14:30
Philipp Lackner
Рет қаралды 22 М.
Every Framework Sucks Now
24:11
Theo - t3․gg
Рет қаралды 126 М.
Kotlin Code Reuse: Composing like you're Inheriting
14:42
Dave Leeds
Рет қаралды 7 М.
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 28 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,2 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 63 МЛН
Vision Pro наконец-то доработали! Но не Apple!
0:40
ÉЖИ АКСЁНОВ
Рет қаралды 50 М.
low battery 🪫
0:10
dednahype
Рет қаралды 1,6 МЛН