What Is the Best Architecture for Android Apps?

What Is the Best Architecture for Android Apps?

Philipp Lackner

1 год назад

55,015 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@ClowneryCity
@ClowneryCity - 17.11.2023 14:40

Thanks Philipp, this is well explained, you're a good teacher.💪

Ответить
@nieqingls2931
@nieqingls2931 - 03.11.2023 04:23

in compose + flow , how to control webview to reload ?

Ответить
@ArthurKhazbs
@ArthurKhazbs - 19.09.2023 12:46

The update-copy MVI approach is actually suggested in Google's ViewModel tutorial for Jetpack Compose app developers

Ответить
@CavernaMadridista-os9zn
@CavernaMadridista-os9zn - 29.07.2023 00:49

even MBS got a shout out jajajajaja

Ответить
@CavernaMadridista-os9zn
@CavernaMadridista-os9zn - 25.07.2023 22:20

A video to watch 2 times before an interview

Ответить
@electromagneticbytes
@electromagneticbytes - 17.07.2023 17:10

R.I.P MVVM..etc. after arrival of Jetpack compose 😅

Ответить
@k40ol
@k40ol - 23.06.2023 20:54

Good video!

Would prefer more:
- Diagrams, showing these in action.
- Less talking, more whiteboard / abstract concept demonstration.

Ответить
@shubham_soni007
@shubham_soni007 - 23.05.2023 13:08

Thanks bro. You are always helpful

Ответить
@kyleolson8977
@kyleolson8977 - 03.04.2023 23:11

I cannot agree with the "More Vulnerable to Race Conditions", at least for the reasons you're saying. If your data in MVVM or in MVI could be touched on another thread while you are touching it, you're doing something wrong. Any data which could be touched by multiple threads must be protected. "If you don't practice thread safety it's not thread safe" is not a bug if the thread safety is fairly straightforward as it is here.
At best, it's "less likely for mistake to matter". It's possible or even likely the copy is so quick compared to UI operations using data that if you are dealing with unprotected data in both models the MVVM ui is more likely to create an inconsistent state. This would be much more of a literal race condition.

Ответить
@HenriqueRocha
@HenriqueRocha - 30.03.2023 00:34

Stopped watching when he said that Activities and Fragments are represented by the V in MV* patterns. I don't know why so many people get this wrong.

Ответить
@FemiOkedey
@FemiOkedey - 20.03.2023 11:29

I prefer to use MVI for personal projects because it's easier to understand and explain especially with Compose.

But I prefer MVVM professionally.

Ответить
@nipunshah1373
@nipunshah1373 - 11.03.2023 09:30

Amazing gist on various architecture options available for Mobile Development.

As per my understanding just making flutter analogy for aforementioned videos :
MVVM => Provider/Riverpod (ie Stacked Archi)
MVI => BLOC
MVC => GETX

Above analogy is just in my opinion for flutter dev to map the knowledge share in the above video during flutter development !

Ответить
@go_better
@go_better - 28.02.2023 15:54

Thanks for the video. I will surely check your videos about the subjects, just at the moment I don't understand what are ViewModels, Fragments, Content providers and Broadcast recievers for. It feels like it's unnecessary concepts. I don't get their benefits. But once again, I'm going to do my research.

Ответить
@jamesh4746
@jamesh4746 - 28.02.2023 13:59

All your videos are super helpful and I'm learning heaps from them! I wanted to understand what you think about VIPER architecture for Android. I believe it's from iOS and was wondering if that can be useful for Android as well, especially Presenter vs ViewModel.

Ответить
@EricLouisYoung
@EricLouisYoung - 27.01.2023 06:08

I'm a backend dev getting up to speed on android. I do CQRS on the backend with Elixir. The pattern is so good that I'll be doing it in android. Seems very close to what you're calling MVI... intents = (C)ommands, and the (Q) (reading state) is merely the view subscriptions to the live data that gets updated as a result of successful Commands.

Ответить
@misiu9049
@misiu9049 - 30.10.2022 13:17

There is no the best architecture. Architecture is project specific !

Ответить
@SiamakAshrafi
@SiamakAshrafi - 22.10.2022 03:02

multi-module clean arch MVI is the best ... simple

Ответить
@yangyun6221
@yangyun6221 - 04.10.2022 14:29

If MVVM, then what is Acitvity/Fragment's role in this architecture. I have to say Android is a mess.

Ответить
@yangyun6221
@yangyun6221 - 04.10.2022 14:27

MVC: controller can updates View!

Ответить
@thiagosouza8931
@thiagosouza8931 - 05.09.2022 01:45

Isn't MVI more than states and events? Like reducer, middleware, state machine and everything? What you said sounds just like MVVM 🤔

Ответить
@saurabhyadav-sz9rx
@saurabhyadav-sz9rx - 15.08.2022 09:34

In my firm, we use clean-MVVM architecture.

Ответить
@Joro2933
@Joro2933 - 08.08.2022 01:15

Very nice video! I want to ask something, should I combine both MVC and MVVM tohether, for example: I have a viewmodel class that has a StateFlow reference and I need to update some UI state based on the values emited from the flow, so I want to extract the collect logic in a seraprate Controller class, and pass the viewmodel to controller, or better create a ViewModelGetter - interface that will be inherited from the Activity/Fragment, and will provide the viewmodel. Than the viewmodel will be obtained by ViewModelGetter interface?

Ответить
@TheBlackManMythLegend
@TheBlackManMythLegend - 26.07.2022 11:36

What I like about the videos of this awesome creator is that it's really good code and it's better than hello word. It's full of good practices. It's excellent for preparing for interviews( in my opinion) . It also increased my interest again for Android . ( as a 5 years experience android developer which means nothing if I don't push myself to learn new stuff or don't work in big teams in challenging projects, will start my first big team fintech job in august... So I am in the process to learn really good practice and that channel and his Github in my humble opinion are the go to place for me at the moment ) Very professional.

Ответить
@elqd91
@elqd91 - 24.07.2022 13:41

you’ve said that in MVI, a screen has one state object. following this, how would you handle having multiple API calls on a single screen? let’s say you have 2 cards, one that shows the weather and one that shows user info. would you still use one state object and how would this look? or one for each card (API call)?

Ответить
@haykmkrtchyan7093
@haykmkrtchyan7093 - 23.07.2022 20:56

Philipp can u make a video about MVI using the data classes? I've done that using only sealed classes))

Ответить
@haykmkrtchyan7093
@haykmkrtchyan7093 - 23.07.2022 20:55

MVP vs MVC.

MVP - In android the view and presenter use interfaces to talk with each other. It's based on callbacks. The view triggeres a function from the presenter interface. Presenter implementation changes the model, gets the result back, and triggers view interface function. The view itself implements that.

========> =======>
View Presenter Model
<======= <=======

MVC - I haven't seen any project with MVC in Android, but generally speaking if in MVP it's something like this View <-> Presenter <-> Model, then in MVC the model itself updates view. It doesn't work with the controller. View -> Controller -> Model -> View.

========> =======>
View Controller Model
<=========================

P.S. Sorry for the bad diagram but I guess that's clear 😆

Ответить
@alonshlider4881
@alonshlider4881 - 22.07.2022 16:39

MVI can be implemented with a sealed class representing the UI state which prevents the race condition you were talking about because you set the value to a new one and not copying the old one

Ответить
@mattgraves3709
@mattgraves3709 - 21.07.2022 01:48

Kind of depends on a lot of factors, But if you build it correctly, each module and or component can use its own architecture, giving each team autonomy over their own architecture.

Ответить
@bbk8550
@bbk8550 - 20.07.2022 13:43

Are 'Android Architecture Component' and 'Clean Architecture' the same? If difference between let me know?
Thank you...

Ответить
@moldovanpeter5123
@moldovanpeter5123 - 19.07.2022 21:20

What about MVVM + ReduxKotlin for state management? I know that there some who are working this way on Diamond Client Projects.

Ответить
@wojtekw9008
@wojtekw9008 - 19.07.2022 00:25

Hey Philipp,
Can you show difference's between MVI and MVVM on real code example? :)

Btw i really love your content ❤️

Ответить
@matthiaskerat351
@matthiaskerat351 - 17.07.2022 22:36

Doesnt belong business logic to the model and not the viewmodel in mvvm per definition?

Ответить
@CharfaouiYounes
@CharfaouiYounes - 17.07.2022 02:31

I think that any developer should learn about all of this architecture and get comfortable with them so that if we work on a project that uses MVP (Legacy Project), we can work effectively.
And when working on greenfield projects, we can use the appropriate and better architecture that suits the app well.

Ответить
@apoorvgupta2511
@apoorvgupta2511 - 16.07.2022 17:01

That green light in the background sets the mood

Ответить
@erfansn869
@erfansn869 - 15.07.2022 07:47

MVI + MVVM + CLEAN = Android recommended architecture

Ответить
@favour2871
@favour2871 - 14.07.2022 23:54

goat

Ответить
@mustafaammar551
@mustafaammar551 - 14.07.2022 02:28

you are the best
thank you

Ответить
@Alchemist10241
@Alchemist10241 - 13.07.2022 21:55

MVI plus a little bit MVVM is the best architecture. MVI fits very well with clean architecture.

Ответить
@freedomchuks
@freedomchuks - 13.07.2022 21:28

Update from the state flow is thread safe hence you wouldn't get the race condition

Ответить
@John-qt6qk
@John-qt6qk - 13.07.2022 21:06

MVVM ALL THE WAY

Ответить
@banawalkar
@banawalkar - 13.07.2022 18:31

You are superman😁

Ответить
@parveshkhatri1027
@parveshkhatri1027 - 13.07.2022 17:58

I'm learning android dev for a year and I don't like it. First, they don't give good documentation, I mean I can't go there and code something from reading there like creating a notification. Second, thay change things very quickly, codes from year-old tutorials can't be used today without modifications, which also they don't document that well.

Ответить
@illusion9423
@illusion9423 - 13.07.2022 17:44

I want to say.
I've recently started to learn android and I think your presence and quality of your videos really makes this community.

Your videos are detailed and they're great for learning from and you talk about all the relevant aspects of android and kotlin

Ответить
@alanesaugarciagutierrez6025
@alanesaugarciagutierrez6025 - 13.07.2022 17:30

Hi Phillip what about VIPER?

Ответить
@sandeep_khariwal8137
@sandeep_khariwal8137 - 13.07.2022 16:58

Should we learn all these model views or become good in one???

Ответить
@whitebl4ckk
@whitebl4ckk - 13.07.2022 16:54

Great video as always <3, I have question what do you think about architecture after viewmodel ?
Is clean architecture *domain/data/usecases) worth it on android ?
I'm doing one project now and with clean arch and its more pain than advantage.

Ответить
@RiccardoGabellone
@RiccardoGabellone - 13.07.2022 16:29

💪🏻

Ответить
@breensrobert
@breensrobert - 13.07.2022 16:25

well explained

Ответить
@nikhilsingh-zs1ul
@nikhilsingh-zs1ul - 13.07.2022 16:19

MVVM

Ответить