Cleaner Code With Use Cases - The Full Guide

preview_player
Показать описание
This video will show you how you can use use cases (interactors) in your Android project to make your code a cleaner place.

⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:

💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:

Subscribe to my newsletter for regular Android, Kotlin & Architecture advice!

Join this channel to get access to perks:

Regular live codings on Twitch:

Join my Discord server:

You like my free content? Here you can buy me a coffee:

00:00 - How Use Cases work
09:00 - Why we use Use Cases
12:39 - When not to use Use Cases
Рекомендации по теме
Комментарии
Автор

Hey Philipp, please make a video on how to use proguard and R8 with clean architecture based project.

ginognm
Автор

Learning tons of stuff in just a short video, Thanks Phillie and keep more of these coming.

tonnie
Автор

Nobody and never explained such complicated things so clearly

brianryan
Автор

Great explanation! I already used use cases on some smaller projects, so this video has filled the gaps in my knowledge. Vielen Dank, Philipp! Du machst das prima :)

marinbeslo
Автор

Great video! The clean architecture video was super overwhelming for me, so breaking down some of those things is super helpful, maybe one day i'll be writing code as clean as you.

calvindeceuster
Автор

Omg it’s so bizarre how much boiler plate code in jetpack compose. As an iOS swift developer I’m in shock you end up having 25 files and 200 lines of code for an app with 2 buttons and 3 functions. Nuts.

backupproducer
Автор

Appreciate the work mate... a use case is one of the functional requirements of the app ...it follows the idea of separating the domain logic from the rest of the app but developers are fixated with the name 😅 ...its is just a component(in this context a class) which handle a specific function very well [think of it as a service that provides to other components]

small tip like my domain functionality to be separate from any layer[does not depend on data i will have my state management layer reference the domain function interfaces and having event-handler component implement the interface the same time having infrastructure layer[in this case the data layer] reference an interface from domain and have an component to implement it in the data layer having both view-model in the this case and data layer depend on domain for the bushiness functionality through the interfaces it provides

ebrahimmansur
Автор

Every time I watch your videos, I find myself reaching for the "like" button just to realize I've already pushed it. 👍

DmitriMolchanov
Автор

What if a single use-case is used across two features?
Let's say, we have feature_ profile & feature_login as two separate features.
And say they want to make use of profile_use_case, how to make it available to both of them?

rajbopche
Автор

I have a question if the use case has a multi-action -> example get data from the server after that save the response to the database locally, and display it on UI. We should be defined all in 1 user case or defined in ViewModel. Thanks

bautp
Автор

I like this video, but doesn't the ProfileUseCase need @Inject annotation for it to be provided?

GeertBerkers
Автор

for smaller projects, which is usually the case for mostly developers now a days, thats will be an over kill,

xFuryPlayz
Автор

I love your content Philip! My only concern with this style of architecture is that is "smells" too much like what Juval Lowy refers to as "Functional Decomposition".

I do like that using the wrapper class and treating "use cases" collectively as a single component encapsulates the business logic much better than many separate viewModels do. That has always been a concern for me with standard MVVM architecture.

I can definitely see this as better than typical Android architecture.

leavemealone
Автор

hi i relly need you to tell what the place you get this information and this knowladge

mohamedaliadelabdulhadi
Автор

Wouldn't creating a default interface for these UseCases be helpful? For example:

Inteface IUseCase<in I, out O> {
operator fun invoke(input: I): O
}

and

Inteface IAsyncUseCase<in I, out O> {
suspend operator fun invoke(input: I): O
}

DerCheckerzeigts
Автор

Great video! i would like to see a video that shows how to retrofit api with query/path using usecase and dependency injection small video if possible. Thanks alot!

husseinchahine
Автор

I used years ago, using MVP and Java, now getting back to them on kotlin

Автор

Man, I'm watching one video and want to watch another! It's so addictive!)

go_better
Автор

So helpful, thank you very much!!! This is the only later required to understand to build proper mvvm for me!

benchakalaka
Автор

That is great job!
But in my app, I cannot decide to put my RecyclerView adapters anywhere! Where are adapters place is, I mean directory structure for adapters! Thanks beforehand
!

anvarzaripboyev