6 Design Patterns Every Android Developer Must Know

6 Design Patterns Every Android Developer Must Know

Philipp Lackner

2 года назад

77,973 Просмотров

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


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

New Kind Of
New Kind Of - 05.09.2023 06:26

Simplied and to the point. Good work Philipp 👏

Ответить
bezelye seven ördek
bezelye seven ördek - 18.07.2023 16:59

facade is like mcdonalds i dont want to see how the bigmac is made

Ответить
Stefanus Anggara
Stefanus Anggara - 21.03.2023 10:10

Also there is Observer pattern that we will use it all the time if we use LiveData in ViewModel

Ответить
Oleg Tarashkevich
Oleg Tarashkevich - 30.01.2023 05:02

Thanks for the videos. With your help I'm learning android developing and English at the same time :))

Ответить
Saul Leiva
Saul Leiva - 27.01.2023 22:55

Podrias explicarme mas detalladamente como implementar el patron Factory en mi proyecto porfavor ?

Ответить
Arthur Fonseca
Arthur Fonseca - 14.01.2023 20:35

I think it got too abstract at some point, maybe some bigger examples would be more useful for understanding each pattern, but thx for the video anyway

Ответить
Kub eQu
Kub eQu - 27.10.2022 21:54

Are you copying Ahmad Kazimi's article or is he copying from you?

Ответить
Kamerton Audiophile player
Kamerton Audiophile player - 26.09.2022 03:50

Developers may know, but Google Android managers have no idea that DSF and DFF are audio files too.

Ответить
GeishaTheSerpantClan
GeishaTheSerpantClan - 04.08.2022 15:16

Well.. I don't find this video is easy to understand. How come that others can understand? After watching singleton it's ... I donno I wish that you could do examples how exacly singleton should look like.

Ответить
samdroid37
samdroid37 - 17.07.2022 23:21

please make a video over page object model pattern for testing with kotlin!

Ответить
Arsh Sethi
Arsh Sethi - 04.07.2022 00:34

most of it went over my head but alright

Ответить
Jamal
Jamal - 13.06.2022 04:29

A great video as always, Ty.

Ответить
RBA
RBA - 22.05.2022 18:30

Hey Philipp,
i've got a question regarding the patterns introduced by you. You start with singletons. For what I know, they are considered being an anti-pattern, which shouldn't be used due to tight coupling, etc. So, why using them at all?

Ответить
Connor Glennon
Connor Glennon - 02.05.2022 15:55

I'd like to express to some of the less experienced viewers why one of your comments on builder patterns in Kotlin is a bit inaccurate. Not wrong though. I'm referring to using named args to simulate a builder pattern. While this can be very useful and is likely a good idea in some builders. The builder pattern is used to create complex objects. The point of it is that you don't always have everything you need at the time you call a constructor. With your way the developer has to make sure all required dependencies are before calling the constructor as the object is meant to be immutable (or very close to it) once created. This is why a builder object is made. The values can change and be set after the builder objects creation. This builder can be passed around to configuration classes. That or the creation of a dependency can happen, then the builder set function is called, then you create the next dependency and so on. One other benefit to the builder object is that it can throw an error for objects that aren't configured correctly. Usually the Builder constructor has the minimum requirements for the .build() function to work but this isn't always true. The androidx biometric library has a good example of the builder throwing an exception for improperly configured builders. If you try to set the prompt cancellation button text while also trying to set device credential as an option for the prompt then these two states can't exist at the same time as they occupy the same space on the biometric prompt. So an error is thrown. In my eyes this is poor design so that leads into my next paragraph.

Where I agree with your approach is that the builder to me (purely opinion at this point) is a bit of an anti pattern. It lets you get away with bad design. If you can't create the dependencies before calling the constructor then maybe you need to refactor some stuff or maybe the object is a bit too complex and doing too much.

As with everything in programming it is knowing your requirements and which tool (pattern in this case) to get a job done. There is no one solution and that is why I am not saying you are wrong for your Kotlin approach to builders. Just wanted newer devs to understand the use of the Builder object.

Ответить
Tidel xD
Tidel xD - 08.04.2022 02:47

Nice

Ответить
Suraj Kumar
Suraj Kumar - 24.03.2022 16:25

can you create a video for "keyboard productive hacks in android sudio"?
i know few of them I like:
1. ctrl + Alt + Shift + up/down to go the edited location in the same page
2. double shift to search anything.

Ответить
Alexandru Spasenie
Alexandru Spasenie - 20.02.2022 11:54

Loved it! I like how easy is to understand from what you explain.

Ответить
Dev Gabriel
Dev Gabriel - 18.02.2022 21:33

Is Observer one of them and very used in Android too? Or im wrong?

Ответить
RighteousCoder
RighteousCoder - 12.02.2022 10:28

So a note about the Kotlin way of doing builder, it isn't actually the builder pattern, b/c it doesn't hide the concrete implementation details from the end user. A proper builder pattern can have constructor parameters of the built class change name/order/etc. and not be visible to the end user. However, in the kotlin methodology, you are directly exposing the constructor to the end user. Even with parameter naming, you have an easier chance of making compile breaking changes if you do this vs hiding the details inside the builder.

Ответить
Subind Suresh
Subind Suresh - 30.01.2022 06:00

Thank you bro.

Ответить
Asif Mehmood
Asif Mehmood - 19.12.2021 22:44

great information it's help full for me great effort bro

Ответить
Akira
Akira - 13.12.2021 06:51

stupid question
In frontend web dev why we need to learn design patterns because I am learning react and never saw this things....

Ответить
nihal@softy
nihal@softy - 24.11.2021 19:45

U are awesome bro.. please grow your beard.. you look damn handsome in that look. Apart from this, your biggest fan. You teach and explain things in different level. Love it bro . 😊

Ответить
Muhammad Muzammil
Muhammad Muzammil - 24.11.2021 15:18

Can you please show some examples of adapter pattern other than recycler view adapter. Literally i couldn't adapt the adapter pattern :P

Ответить
Ardit
Ardit - 11.11.2021 17:48

😃

Ответить
Calvin De Ceuster
Calvin De Ceuster - 01.11.2021 22:22

Just give me my freakin hamburgers!
Thank you

Ответить
Raju Shingadiya
Raju Shingadiya - 29.10.2021 19:55

perfact

Ответить
Javier Martinez
Javier Martinez - 22.10.2021 10:58

Great video!!

Can you create a video about how we can organize a Gradle in a big app o maybe how use tasks. For example a Jacoco task to use in sonar

Ответить
Scamparelli
Scamparelli - 16.10.2021 22:34

Hey Philipp, thank you for the excellent video - your explanations are really nice to watch and I like that small errors are left in (such as in the return statement in the 'factory' example), however I really, really, REALLY struggle with dependency injection.

I just can't understand how I would implement it or how I would change my app to use this pattern.. I hope I am not alone! I would therefore really appreciate it if you would do a video where you start with a simple existing design that you convert to use dependency injection to show the benefits of this methodology.. thank you!! (you did ask for suggestions!). Oh and I work in Kotlin so I'm happy I can avoid the builder pattern!!

Ответить
pradeep
pradeep - 16.09.2021 20:36

it's awesome, thank you so much

Ответить
جزيء Molecule
جزيء Molecule - 16.09.2021 18:37

Thank you so much bro! I recently discovered your channel and it's super helpful! Great content!

Ответить
Sunil Dhakar
Sunil Dhakar - 16.09.2021 12:04

Hi, Philipp Great job. can you create a video on app performance for big apps?

Ответить
Esthefani Agapito
Esthefani Agapito - 06.09.2021 16:25

It was really helpful! I'm learning to develop for android but this topic isn't so talked in many courses or even when happen is to much superficial, so could you say when should a beginner student as me start to study it?

Ответить
Unaisul Hadi
Unaisul Hadi - 31.08.2021 06:39

Excellent video Phil!!

Ответить
Allan Kardec
Allan Kardec - 29.08.2021 12:39

awsome

Ответить
Mohamed A. Dahab
Mohamed A. Dahab - 28.08.2021 00:02

Thanx man this was very very helpful 😊

Ответить
Shreyash Choudhary
Shreyash Choudhary - 25.08.2021 12:33

Yeah! 2 of 6 I don't even heard before ❤️

Ответить
Abhishek Auti
Abhishek Auti - 19.08.2021 15:01

Hey man it was really helpful

Ответить
Mike
Mike - 11.08.2021 09:31

If singleton pattern is just an object in kotlin, why we create room database class singleton like java singletons (using @syncronized and private Instance)?

Ответить
Yelaman Myrzahanov
Yelaman Myrzahanov - 10.08.2021 22:23

As always, unique content and easy to watch
Can you please make video about anti pattens in Android?

Ответить
Mr SkilLZ
Mr SkilLZ - 08.08.2021 22:01

Hello sir , your doing great 🔥 , I will start android dev , from next week , can tell start android with XML or jetpack compose , I am good with flutter nd been doing from last 8 months

Ответить
Kagiri Charles Maina
Kagiri Charles Maina - 04.08.2021 22:45

You are the best Android and Kotlin teacher I have encountered!! Thank you Phillip...you are literally saving careers out here💯💯💯

Ответить
Moody mudi
Moody mudi - 04.08.2021 15:12

Thank you for this video, please keep making those kind of videos :D. I suggest one about gradle

Ответить
Sat Talk
Sat Talk - 04.08.2021 10:13

Great video.. Pl. make a project on Forum App or Polling App

Ответить
Joseph Molina
Joseph Molina - 04.08.2021 03:33

Please continue to make more videos on these topics !

Ответить
Reza Rahmani
Reza Rahmani - 03.08.2021 22:41

Please make a free tutorial for Ktor

Ответить
jay gitonga
jay gitonga - 03.08.2021 17:17

As always great videos Phillip! Do a tutorial on clean architecture or mvi

Ответить
Abu Iman
Abu Iman - 03.08.2021 12:35

Hi, Philipp,
I've sent you a message in Instagram.
Could you please check it!

P.s. thanks for the great videos!👍🏻👍🏻👍🏻

Ответить