2 little corrections from my side: 1. In this video I mapped the DTO to a model in the domain layer. You should rather do this in the data layer (in the repository) 2. The response handling should also rather be done in the repository (catching HttpException & IOException) as this is specific to Retrofit and the domain layer shouldn't know about that. Sorry that I didn't show that in the video, but I also never stop learning :)
Great work, thank you. But in 29:00 the main reason we create a repository interface (which is the Gateway in clean architecture terminology) is to invert the dependency so that the domain layer must no know anything about the outer layers including repositories (Gateway implementation) therefore repository interface abstract functions must return domain models instead of DTOs. this way we guarantee that we don't violate the DEPENDENCY RULE which is the most important thing in Clean architecture. Thank you again for your efforts.
And the job of RepositoryImpl functions are to work as an adapter and convert DTOs to domain models in addition to orchestrating data persistence and their exceptions.
This is the single most helpful video on Android development that I've found on RUclips. It inspired me to buy some of your courses. When it comes right down to it, this is what the majority of Android apps do. Download something, then display more information about it when the user indicates.
This is literally one of the best Android Related video i have ever seen! Learnt soo much from this mini project and your explanation is bloody brilliant!
I just finished this course and have a SOLID handle on how to structure modern Android apps. I finally understand why and where to use Flows! And DTO's are much clearer. Also getting really good with compose now.
Thank you Philipp for such wonderful course. In video 28.11, We are using Data Layer DTO class in domain. This is the violation of Clean Architecture rules as domain layer is independent from all other layers. We need to change CoinRepository, GetCoinsUseCase, CoinRepositoryImpl and getCoinsUseCase to fix above suggested change.
Incredible work. I can't believe you typed all that code in one breath without launching the app until the very end. Super impressive and very very helpful. Thanks so much!
So much informative movie. I did not realize that I am Studying. I am blown away by this 😲😲😲. After watching it in one go I was finding 1000 likes button.
interesting & informative - especially enjoy the "reality" of real time error fixing in the code, on-the-fly decisions ("we'll put it here no, wait add it to main activity.." or whatever) - more fun 'cos spontaneity less boring than the standard classroom/presentation stuff - more natural in this "long form" 90 minute coding chat & code format well done thnx again
Thaks for your high quality contents. I was just looking for this subject yesterday, and today I have it for free 😊. May God bless you and assist you in all your projects in life Peace ✌🏿 from Congo 🇨🇩
Hi, great video, I loved it. I would like to see the UI/Unit tests being implemented in this project that uses clean architecture, that would be very helpful.
Your video course is so good. Several levels beyond Google's text-only codelabs. They need to send you a 1 million dollar check for your positive impact on developer community.
Thank You Philipp. You have taught me so much about architectures. I have a very high paying and satisfying job because of you. Love and wishes for you.
Hey man! I personally want to thank you for this great video. I'm in a process of switching career from QA to mobile dev and this video is incredibly helpful. Your explanations are very clear and understandable even for a total noob like me. Keep it up the good work! I still can't believe this video is free. You're actually doing God's work! Thank you so much!
As you said in your comment that Repository should return the Response objects. Will this same architecture work for the data source which itself returns a flow for example Room database?
this is so cool. I think this is my second time watching this video. I couldn't really get it at first then I "actually" learned the fundamentals like some prerequisite knowledge for this video and I manage to understand the concepts quite nicely.
I am halfway through this video n guess what? ... I'm totally blown off - it is like a good dream that I don't want to end. Clear explanations, top Android tricks n concrete Android Architecture. And this is what I plan to do on finishing - first I will Like, the second thing is to share with the whole world, thirdly subscribe ... in short I will click every button underneath this great video including 'Break-Up with ur Girlfriend' button if I see it.
Thank you for this awesome tutorial! Just one question below Is there any usage on the saveStateHandle of ConinDetailViewModel? since it doesn't seem to be set from anywhere
hello from S.Korea! I was struggling with my project trying to structure it in clean architecture and your video helped me so much!!! I think I finally got the idea ! thank you so much Philipp :D
Hey Philipp, thank you so much for this incredibly valuable content. I was wondering if you would mind creating another video series on Clean Architecture with D/B caching and possibly unit testing included some time in your next teaching journey. The reason is because I think it would solidify everyone's understanding on clean architecture (through repetition). If you make it a paid-course, I would still definitely not hesitate to buy it. But anyways, thank you so much.
Thanks a lot! I will need some practice to completely undersrand it, but it makes sense. I only need understand presentation layer - VM-Activity/Fragment link, but I guess I can revisit your videos on the subject.
Really enjoyed watching your video on structuring the app using MVVM. I just have 2 notes on extending this further and have the dependencies between layers unidirectional: 1. Data Acces should not depend on the Domain and therefore I would create the mapping between DTOs and Models in the domain: Coin.fromDTO(coinDTO: CoinDTO): Coin 2. I would move the CoinRepository interface in the Data Access layer for the same reason as above
Mate! These tutorials are amazing! I can imagine how much effort these take! I do tutorials myself, more server backend oriented, but I'm learning from you to do Mobile apps with Kotlin! I'd love to partner with you for full-stack tutorials or development! Cheers!
Wonderful... just one thing missing ... a graph representing the web of dependencies ... shown along the video ... so one can follow the logic visually
Thank you for this. I just started to get into android with compose and this helps me understand why are certain things the way they are a little better :)
Thanks a lot! Your coding style is amazing, I really enjoy looking at it. I hope you know how people appreciate the hard work you have done!!! Best regards!!!
Thanks very much Phillipp! I enjoyed creating the app as I watched the video, and it worked great upon completion. Thanks for teaching about the architecture of apps. I cannot find content like this anywhere else!
Hi ! Thanks for the video :) Two questions: 1) when we have to call the same UseCases in the same order in two different viewModel, we duplicate a lot of code in the viewmodels. How could we solve ? 2) the network call should be executed in the IO dispatcher, in this case retrofit does it in the right Dispatcher automatically ??
you should start showing your app architectur using some diagramas not only talking. Not all is coding. To verify a clean architecture you need a good design. show prerequisites, the analysis, the design, the implementation and so on.
36:53 How would you approach the case when the e.localizedMessage is null and you still wanted to provide a localized custom error message to the user? To access a string resource, you would need a reference to Context (injected via constructor maybe?). What's the best approach here?
Hello Philip thank you for providing this for free hope you remember me iam the one which said that your course is paid and you should put some free content on RUclips but Form last month I built a simple ecommerce app for on of my friends It was so hard for me to build it but some how I built it but yesterday he called me and asked me to add some 5 to 6 features for free I was so angry at him and banged the phone at him and I understood how You felt when I asked you to provide Your amazing skills for free I apologise for it I hope you will forgive me and thank you for being an inspiration for android developers ❤️❤️❤️
@@PhilippLackner Thanks bro I was so annoying right when I said to put paid course for free I apologise for it and pls give me a heart if you give me a heart I will know you are not angry at me now❤️❤️
This is a great lecture - it was a perfect amount of pasting vs. coding and a great example app that was simple but enough to cover all of the topics that I was interested in (Hilt, Compose, Clean, Use Cases). You are an excellent instructor. I had fun. Thank you!
I have 1 question regarding scalability of this project: 1. If we want to add more features in this app, how can we centralize the exception handling for usecases done in try/catch blocks. If this were to scale I'm sure copy pasting catch blocks of usecases could bite in the back one day.
Thanks a lot for this free content! Just got curious about how to deal with that try catch blocks in a better way so we wouldn't need do have try catch all over the place.
Shouldn't you put the @SerealizedName annotation above each dto field? Because during obfuscation, the field names will change and will not match the API response.
Wow! clearly explained, this is intermediate/senior dev stuff. I haven't touch Android in ages(Been developing Swift/iOS) and this is what I needed, Subscribed and already smashed bell button to you Sir :)
Definitely not senior lol. People like Philipp have lowered the barrier significantly. Nowadays every developer worth their salt is learning architecture patterns and best practices. I myself am a junior dev, and I think I'm already late to the party. Thanks a lot Philipp! Enjoy your content very much.
Nice, Another app squished ;D Thanks, Philipp (still there are things that I don't quite understand but I think that you courses will help in that field, especially with discount) To the next App!
Dude, ths a lot, u cool, and video is cool too. I've just started working with compose and was looking how to make nice content loading state implementation. And as a result I got in my brain much more i can imagine. Applause..
I think you interchanged the definitions of DTO and models at 16:00. Model is the one that contains our api response and dto is used to transform that response for our ui. That’s why it’s called a Data Transfer Object because it transfers the data from one layer of our application to another, while model contains real life entities.
Been a fan of your videos, since you had 4k subs. I been working on a stock app that is pretty far along and I became frustrated when I wanted to migrate some of my UI to jetpack compose. This is perfect and also helps me refactor some of my ugly code.
Man...thats a lot of folders! Great video btw. Will be great if you can make a video for just basics of making API calls without all these complexities?
Hello Philipp. Silly question incoming: In your screens why dont you check the successful state? I feel like with that code if there is an error it will render the text plus an empty box with the column? Its a lazy column though. Im confused, hah
Hey @Philipp, I am trying to get page count from the api which is present in headers, with the above reference of resource file. I am not able to get that. Can you suggest something ?
Hello, thanks for your videos, i have a question about DI, especially about @Inject and how you use it in ViewModel, we didn't create any UseCase objects in our AppModule class so how it is exists?
2 little corrections from my side:
1. In this video I mapped the DTO to a model in the domain layer. You should rather do this in the data layer (in the repository)
2. The response handling should also rather be done in the repository (catching HttpException & IOException) as this is specific to Retrofit and the domain layer shouldn't know about that.
Sorry that I didn't show that in the video, but I also never stop learning :)
So repository should return Resource?
@@mdazharuddin4684 Yes
can you upload the corrected codes as a new branch to the git, would be appreciated, thanks so much
@@erolyildiz3693 All you need to do is move the code from use case to repoImpl and handle calling code
Using coinId from the constants would also be better imho
Great work, thank you.
But in 29:00 the main reason we create a repository interface (which is the Gateway in clean architecture terminology) is to invert the dependency so that the domain layer must no know anything about the outer layers including repositories (Gateway implementation) therefore repository interface abstract functions must return domain models instead of DTOs.
this way we guarantee that we don't violate the DEPENDENCY RULE which is the most important thing in Clean architecture.
Thank you again for your efforts.
And the job of RepositoryImpl functions are to work as an adapter and convert DTOs to domain models in addition to orchestrating data persistence and their exceptions.
@@MohammedElotol correct, thanks
Thank you, Philipp keeping this video free for the developers. It's a gold mine.
My pleasure!
Yes
This is the single most helpful video on Android development that I've found on RUclips. It inspired me to buy some of your courses.
When it comes right down to it, this is what the majority of Android apps do. Download something, then display more information about it when the user indicates.
Recently, I have completed this project (code along). As a beginner, there are so many things to learn. Thank you, mate.
I believe this video is "mandatory" to see, for each Android developer looking to improve and implement Clean Architecture. Philipp you rocks!!!
Just graduated and this is the best course i could came across to get an idea about clean arch!! Good Job!!!
This is literally one of the best Android Related video i have ever seen! Learnt soo much from this mini project and your explanation is bloody brilliant!
the best person with great voice, personality and knowledge in the planet. thanks for your great contents.
I just finished this course and have a SOLID handle on how to structure modern Android apps. I finally understand why and where to use Flows! And DTO's are much clearer. Also getting really good with compose now.
Thank you Philipp for such wonderful course.
In video 28.11, We are using Data Layer DTO class in domain. This is the violation of Clean Architecture rules as domain layer is independent from all other layers. We need to change CoinRepository, GetCoinsUseCase, CoinRepositoryImpl and getCoinsUseCase to fix above suggested change.
Finally, you use single activity and no fragment. Love it.
For jetpack compose nothing else makes sense
@@PhilippLackner okay, so this means we are out of the activity-fragmnet hell?
@@jatinvashisht4293 yea
@@PhilippLackner wow, that's very good actually 👏.
BTW thanks for replying 🙂
Incredible work. I can't believe you typed all that code in one breath without launching the app until the very end. Super impressive and very very helpful. Thanks so much!
He is launching it in his brain automatically 😄
One of the most required videos for Android Developers
This guy shares all the topics which I start to explore every time! This video is a gem! Kudos & Respect!
5 years university course would not cover all these topics!!!
Philipp, you are the absolute best! Your work is so appreciated! Really helpful and concise!
The best clean architecture using compose I've ever seen.
Can't believe such quality content is available for free.
Chapeaux and thank you, this is not common nowadays
Watching all the adds so you get something back.
Thank you.
So much informative movie. I did not realize that I am Studying. I am blown away by this 😲😲😲.
After watching it in one go I was finding 1000 likes button.
Thanks!
interesting & informative - especially enjoy the "reality" of real time error fixing in the code, on-the-fly decisions ("we'll put it here no, wait add it to main activity.." or whatever) - more fun 'cos spontaneity less boring than the standard classroom/presentation stuff - more natural in this "long form" 90 minute coding chat & code format
well done
thnx again
I learnt a lot from this. One thing for sure everybody will love is a tutorial for handling Compose x Hilt scoping. Thank you for these free contents!
Your English accent is awesome . It will grow fast among India developer.
Thaks for your high quality contents. I was just looking for this subject yesterday, and today I have it for free 😊. May God bless you and assist you in all your projects in life
Peace ✌🏿 from Congo 🇨🇩
Hi, great video, I loved it.
I would like to see the UI/Unit tests being implemented in this project that uses clean architecture, that would be very helpful.
Your video course is so good. Several levels beyond Google's text-only codelabs.
They need to send you a 1 million dollar check for your positive impact on developer community.
Amazing Clean Architecture and Android development explanations.
Thank you.
Awesome Course
We need one merged in both Local Database and Network Requests Clean Architecture.
If I have to say one word, I would say:
*Masterpiece*
Thanks a lot!
How about a dive into Domain Driven Design / Development?
May also help folks understand why we use "domain" as part of our architectural designs.
and TDD :)
Thank You Philipp. You have taught me so much about architectures. I have a very high paying and satisfying job because of you. Love and wishes for you.
Congrats mate, glad my stuff helps!! :)
I use the clean architecture to develop complex app for companies..👍 I like the tutorial
Hey man! I personally want to thank you for this great video. I'm in a process of switching career from QA to mobile dev and this video is incredibly helpful. Your explanations are very clear and understandable even for a total noob like me. Keep it up the good work! I still can't believe this video is free. You're actually doing God's work! Thank you so much!
@@cosmicdioxide happy to help 🙏🙏
Thank you very much bro for your contribution to the developer community.
the content is awesome
2017 - God activities
2021 - God ViewModels
2025 - God Use cases
2029 - ?
God Kotlin
Master!
God AI
God Composables
2025 will actually be Agent Smith Use cases, where your code base has use cases scattered all around that do the exact same thing
As you said in your comment that Repository should return the Response objects. Will this same architecture work for the data source which itself returns a flow for example Room database?
Hi all right, a video suggestion, apply unit tests throughout the app with best practices
Congratulations for the excellent video
this is so cool. I think this is my second time watching this video. I couldn't really get it at first then I "actually" learned the fundamentals like some prerequisite knowledge for this video and I manage to understand the concepts quite nicely.
I am halfway through this video n guess what? ... I'm totally blown off - it is like a good dream that I don't want to end. Clear explanations, top Android tricks n concrete Android Architecture. And this is what I plan to do on finishing - first I will Like, the second thing is to share with the whole world, thirdly subscribe ... in short I will click every button underneath this great video including 'Break-Up with ur Girlfriend' button if I see it.
Thanks a lot!
😀
This is the best Clean Architecture tutorial I've ever seen. Thank you very much!
After watching this video, I can get knowledge about use cases with clean architecture. 👍
Very good job.. 👏👏🔥
Just finished video, what a wonderful video.
Amazing 👏
Thank you very much, Philipp!👍
Thank you for this awesome tutorial!
Just one question below
Is there any usage on the saveStateHandle of ConinDetailViewModel? since it doesn't seem to be set from anywhere
This is the best video I watched on your youtube channel. Thanks for your support.
Really the best explanation on youtube in clean arch in android
hello from S.Korea! I was struggling with my project trying to structure it in clean architecture and your video helped me so much!!! I think I finally got the idea ! thank you so much Philipp :D
Hey Philipp, thank you so much for this incredibly valuable content. I was wondering if you would mind creating another video series on Clean Architecture with D/B caching and possibly unit testing included some time in your next teaching journey. The reason is because I think it would solidify everyone's understanding on clean architecture (through repetition). If you make it a paid-course, I would still definitely not hesitate to buy it. But anyways, thank you so much.
Thanks a lot! I will need some practice to completely undersrand it, but it makes sense. I only need understand presentation layer - VM-Activity/Fragment link, but I guess I can revisit your videos on the subject.
Really enjoyed watching your video on structuring the app using MVVM. I just have 2 notes on extending this further and have the dependencies between layers unidirectional:
1. Data Acces should not depend on the Domain and therefore I would create the mapping between DTOs and Models in the domain: Coin.fromDTO(coinDTO: CoinDTO): Coin
2. I would move the CoinRepository interface in the Data Access layer for the same reason as above
Then you misunderstood something. It's the other way around, domain shouldn't depend on data. Any layer can access domain
You are right. Thanks
Mate! These tutorials are amazing! I can imagine how much effort these take! I do tutorials myself, more server backend oriented, but I'm learning from you to do Mobile apps with Kotlin! I'd love to partner with you for full-stack tutorials or development!
Cheers!
Wonderful... just one thing missing ... a graph representing the web of dependencies ... shown along the video ... so one can follow the logic visually
Thank you for this. I just started to get into android with compose and this helps me understand why are certain things the way they are a little better :)
Glad it helps!
Very useful for me to understand the use cases..Thank you very much Philipp
I have worked on my own do the whole instruction from this course and learned a lot of stuff, Can I share what I have learned with my Git?
This is a Masterclass on Android!
Thank you Philipp! These videos are Solid Gold, please keep doing these videos
Thanks for sharing clean architecture with MVVM.
Please continue video with unit testing, UI tested,
12:54
what is Resource Class?
did u make it or any reference that i can find for further study?
Thanks a lot! Your coding style is amazing, I really enjoy looking at it. I hope you know how people appreciate the hard work you have done!!! Best regards!!!
Thanks very much Phillipp! I enjoyed creating the app as I watched the video, and it worked great upon completion. Thanks for teaching about the architecture of apps. I cannot find content like this anywhere else!
Hi ! Thanks for the video :)
Two questions:
1) when we have to call the same UseCases in the same order in two different viewModel, we duplicate a lot of code in the viewmodels. How could we solve ?
2) the network call should be executed in the IO dispatcher, in this case retrofit does it in the right Dispatcher automatically ??
same questions
you should start showing your app architectur using some diagramas not only talking. Not all is coding. To verify a clean architecture you need a good design. show prerequisites, the analysis, the design, the implementation and so on.
I disagree. It's boring what you offer. Many hours discussions about two-three SQL tables
That depends on how you present it. But thanks a lot for sharing your knowledge 😊
36:53 How would you approach the case when the e.localizedMessage is null and you still wanted to provide a localized custom error message to the user? To access a string resource, you would need a reference to Context (injected via constructor maybe?). What's the best approach here?
It is awesome to listen this topics from you and your logic. You are the best !!
Thanks for putting together this tutorial. It's very helpful.
Now I know how to use Clean Architecture and Dagger hilt properly
Philipp If my app have multiple features so for every feature I will create all three layers again again ?
Most amazing Android video on the web!
Hi, great video, I loved it.
I would like to see the one that uses clean architecture, that would be very helpful.
Thanks a lot for taking the time to makes this kind of videos, we developers really appreciate what you do and specially how you do it, big thanks!
Hello Philip thank you for providing this for free hope you remember me iam the one which said that your course is paid and you should put some free content on RUclips but
Form last month I built a simple ecommerce app for on of my friends
It was so hard for me to build it but some how I built it but yesterday he called me and asked me to add some 5 to 6 features for free I was so angry at him and banged the phone at him and I understood how
You felt when I asked you to provide
Your amazing skills for free I apologise for it I hope you will forgive me and thank you for being an inspiration for android developers ❤️❤️❤️
everybody needs to put food on their table. Thanks and you're welcome, happy learning
@@PhilippLackner Thanks bro I was so annoying right when I said to put paid course for free I apologise for it and pls give me a heart if you give me a heart I will know you are not angry at me now❤️❤️
Thank you brother
More Such videos, please!!!
You are amazing Android Teacher!!! Respect!
Thanks, will do!
This is a great lecture - it was a perfect amount of pasting vs. coding and a great example app that was simple but enough to cover all of the topics that I was interested in (Hilt, Compose, Clean, Use Cases). You are an excellent instructor. I had fun. Thank you!
Thank you!!
@@PhilippLackner Enjoy your coffees
I have 1 question regarding scalability of this project:
1. If we want to add more features in this app, how can we centralize the exception handling for usecases done in try/catch blocks. If this were to scale I'm sure copy pasting catch blocks of usecases could bite in the back one day.
46:20 still haven't got my answer mate. Could you be kind enough to guide ?
I found this amazing, very well explained each and every concept. Thank you Philipp!!
Thanks a lot for this free content! Just got curious about how to deal with that try catch blocks in a better way so we wouldn't need do have try catch all over the place.
This is excellent video, learning ,coding and understanding 👏 Thanks so much 🙏
that is so helpful, danke schon for everything Phlipp Lackner
Nice content. you can move domain package to a pure kotlin library module, and let it has no other "details" dependencies.
Shouldn't you put the @SerealizedName annotation above each dto field? Because during obfuscation, the field names will change and will not match the API response.
I liked and enjoyed this video a lot.
I specially logged in with google account to like this video. :)
love the news letter idea !
Love the video too. Best android channel on RUclips
Wow! clearly explained, this is intermediate/senior dev stuff. I haven't touch Android in ages(Been developing Swift/iOS) and this is what I needed, Subscribed and already smashed bell button to you Sir :)
Glad it was helpful!
Definitely not senior lol. People like Philipp have lowered the barrier significantly. Nowadays every developer worth their salt is learning architecture patterns and best practices.
I myself am a junior dev, and I think I'm already late to the party.
Thanks a lot Philipp! Enjoy your content very much.
Nice, Another app squished ;D
Thanks, Philipp (still there are things that I don't quite understand but I think that you courses will help in that field, especially with discount)
To the next App!
Hey Philipp, you used @inject on the CoinRepositoryImpl constructor, so you don't need to create an instance of it in the app module
Its such a more valuable content and great at all time. It's clearly understandable. More to go. Thanks for the video @Philipp.
Dude, ths a lot, u cool, and video is cool too.
I've just started working with compose and was looking how to make nice content loading state implementation. And as a result I got in my brain much more i can imagine.
Applause..
I think you interchanged the definitions of DTO and models at 16:00. Model is the one that contains our api response and dto is used to transform that response for our ui. That’s why it’s called a Data Transfer Object because it transfers the data from one layer of our application to another, while model contains real life entities.
Thanks for all the effort you put into this for free. Much love
My pleasure!
Awesome, well explained!
Wouldn't deleting and inserting for an update cause two emits from Room (and using a transaction fix that)?
I really Enjoyed that course and watched 2 times.
Been a fan of your videos, since you had 4k subs. I been working on a stock app that is pretty far along and I became frustrated when I wanted to migrate some of my UI to jetpack compose. This is perfect and also helps me refactor some of my ugly code.
Man...thats a lot of folders! Great video btw. Will be great if you can make a video for just basics of making API calls without all these complexities?
Hello Philipp. Silly question incoming:
In your screens why dont you check the successful state? I feel like with that code if there is an error it will render the text plus an empty box with the column? Its a lazy column though. Im confused, hah
Thanks very much really helpful and helped me a lot in understanding some topics
Hey @Philipp, I am trying to get page count from the api which is present in headers, with the above reference of resource file. I am not able to get that. Can you suggest something ?
Great Course Philipp! many thanks for creating and sharing this with the world!
Hello, thanks for your videos, i have a question about DI, especially about @Inject and how you use it in ViewModel, we didn't create any UseCase objects in our AppModule class so how it is exists?
thank you, so much good stuff, I have had empathy for the newbies already
While we are injecting the UseCases in the viewModel, why are we not providing them in the AppModule file?