Hold on. The flow depicted incorrectly. The Data does not go from the DataSource to Provider. Pages contain (depends on) Providers. Provider contain UseCase. UseCase contain Repository. Repository contain DataSource. And when the UI needs data to render - the Provider asks it from the UseCase, it in turns asks the Repository, and repo asks DS and then the Data returns ALL THE SAME WAY up to the UI in reverse order.
Because I never understood usecases, from the source I was reading, I'm using riverpod(my provider) as a bridge between the UI and the repositories in the domain layer. I would love to see an implementation of the usecases and see how I can refactor my code if need be
In most of the cases you don't need UseCases, only when the logic is really complicated or it's reused in different places of the app. In most of the cases your business logic lives in your Cubits/Provders and is needed only on one specific page so no need to move this stuff into a separe UseCase class
Good video!👍 Easy to understand the concept with visual It will be great if you can make an extra video to explain the concept with code example Good job!
I support this request, long time ago I tried to implement this approach in my project but it was confusing because shared tasks like datasource and utils. Some people uses actions/events instead of pages, because a page can be a composition of other pages. so I hope that a moderately complex project is developed that covers these cases
This video is a lot of work but, without concrete code examples, I don't understand. I'm using Flutter, Provider and Riverpod daily. Can you please show me the folder architecture and an example with dart files? Thank you for your work!
Where would you put the reactive logic ? for example you send a request to the server, the server respond OK now you want to show a toast and navigate where would you do that?
Can someone explain what Repositories (Entities) do and why then it goes to Repositories (Models)? Why doesn't it go directly from Repositories (Entities) to DataSource? What does Repositories (Models) do?
I think he tried to explain the Interface usage. On the Business layer we should use an Interface of the Repository which uses the business entities. But the actual implementation of the Repository lives in the Data layer. There should be no Repositories which operate with rae models (DTO)
🔥Complete Free Clean Architecture Course Available Here: ua-cam.com/video/SmJB8cy8emU/v-deo.html
for first time I fully understood the concept of clean code
I was literally just thinking about to find a Flutter Clean Architecture with diagram visualization, and here we are!
If you need more info, you can find the full course available for free here: ua-cam.com/video/SmJB8cy8emU/v-deo.html . Thanks Maxc
one million thanks for our guy here. very clear, concise and effective.
No problem!
One of the best visualization of clean architecture. Thank you
The way you teach is very understandable. Thanks!
So helpful, you really put your time into this! May God Bless you!
I really appreciate you guys taking your time to explain this to us. Thanks so much.🙏🏾🙏🏾
Amazing video 🔥 post more videos on clean architecture using bloc and riverpod
Thank you Bhaarat 👋
This is the best way to explain clean architecture!
Oh boy! Im not gonna lie, I missed you! its great to see you are back. Cant wait for more content coming
Much appreciated 🙏 Feel free to send video ideas at info@fluttermapp.com ✌
They completely changed the approach, and again everyone’s favorite anti-pattern of the anemic model
For the data update step, shouldn't the presentation layer and the data layer ever talk to each other directly and use the domain layer instead?
I share the same opinion. The data should bubble up thru the domain layer to the presentation layer.
I was surprised when I heard it, though I'm a bit new to this field 😂
How datasoudrce directly talk to providers?
It needs to pass back via usecase only, correct ?
Full course available for free here: ua-cam.com/video/SmJB8cy8emU/v-deo.html . I hope this will help you 🙏
Great work!
nice explanation, I feel more understood from your explanation rather than the other, thanks
Glad it was helpful!
I like this video, it simple to understand the hole of clean architecture things
now I can be able to use this in all my projects.
Hold on. The flow depicted incorrectly.
The Data does not go from the DataSource to Provider.
Pages contain (depends on) Providers.
Provider contain UseCase.
UseCase contain Repository.
Repository contain DataSource.
And when the UI needs data to render - the Provider asks it from the UseCase, it in turns asks the Repository, and repo asks DS and then the Data returns ALL THE SAME WAY up to the UI in reverse order.
Because I never understood usecases, from the source I was reading, I'm using riverpod(my provider) as a bridge between the UI and the repositories in the domain layer. I would love to see an implementation of the usecases and see how I can refactor my code if need be
Hi Frank, You can find the full course available for free here: ua-cam.com/video/SmJB8cy8emU/v-deo.html ✌✌
In most of the cases you don't need UseCases, only when the logic is really complicated or it's reused in different places of the app.
In most of the cases your business logic lives in your Cubits/Provders and is needed only on one specific page so no need to move this stuff into a separe UseCase class
Good video!👍 Easy to understand the concept with visual
It will be great if you can make an extra video to explain the concept with code example
Good job!
I support this request, long time ago I tried to implement this approach in my project but it was confusing because shared tasks like datasource and utils. Some people uses actions/events instead of pages, because a page can be a composition of other pages. so I hope that a moderately complex project is developed that covers these cases
Would also like this
This video is a lot of work but, without concrete code examples, I don't understand.
I'm using Flutter, Provider and Riverpod daily. Can you please show me the folder architecture and an example with dart files?
Thank you for your work!
You can find the full course available for free here: ua-cam.com/video/SmJB8cy8emU/v-deo.html
What a great video, thanks alot !!😄
You're very welcome!
Perfect dude ❤❤
thanks, this was very helpful
Where would you put the reactive logic ? for example you send a request to the server, the server respond OK now you want to show a toast and navigate where would you do that?
Provider/BLoC/Cubit
Can someone explain what Repositories (Entities) do and why then it goes to Repositories (Models)? Why doesn't it go directly from Repositories (Entities) to DataSource? What does Repositories (Models) do?
I think he tried to explain the Interface usage.
On the Business layer we should use an Interface of the Repository which uses the business entities.
But the actual implementation of the Repository lives in the Data layer.
There should be no Repositories which operate with rae models (DTO)
Amazing Video as always! I hope you still remember me HAHA! Been here since Day 1
Yoo Joshua, for sure I remember you, It's been a while man! 🙏
@@FlutterMapp I still been an avid fan of your work! Im super proud and happy about your growth and work!
Tu fais tu UA-cam a temps plein? J'adore tes videos en passant. C'est grace a toi en parti que mon application progresse bien!
Letsgooo! UA-cam for fun only yet lol 🙏 C'est quoi ton app?
@@FlutterMapp elle résous le problème de confiance entre inconnus.
Thanks !
where is domain layer?
Domain is the business layer
Man! this thing was causing me a headache, thank for simplifying it. Nice circle tho
Sir clean architcure playlist make
Well, this is just yet another opinionated view, I would suggest to take it with a grain of salt. Do your own research.
😇👍
'Promosm'
Why do all this pain when you can write javascript code? Also react faster than flutter, it's proven many times, why do this bro?
Flutter apps are faster then React native apps
@kirill4531 do not pizdi