Flutter TDD Clean Architecture Course [5] – Contracts of Data Sources

preview_player
Показать описание
📗 Learn from the written tutorial 👇👇

👨‍💻 Do you write good code? Find out now!

Repository is the brain of the data layer of an app. It handles data from remote and local Data Sources, decides which Data Source to prefer and also, this is where data caching policy is decided upon.

In the previous part, we've gone over the basic structure of the data layer and today, it's time to start implementing the data layer right from its core - from the NumberTriviaRepository, all the while creating contracts for its dependencies.

In this part, we will only create contracts for all the Repository dependencies. This will allow us to mock them easily without needing to bother with implementing them just yet - that's coming in the next parts.

Go to my website for more information, code examples, and articles:

Follow me on social media:
Рекомендации по теме
Комментарии
Автор

Wonderful as always ! i'am addicted to this series watching it more than twice, thank you Reso Coder.

abderrahmansettani
Автор

Thanks so much for putting this series together! It's been one of the most useful Flutter architecture guides I've seen!

gonzo
Автор

This series turns you from an amateur to a pro coder.

himujjalupadhyaya
Автор

I am waiting for the full series to be completed so I can apply it to my projects

ahmedsalama
Автор

resocoder taught me more about software development than college did

sittaman
Автор

I can't wait for the next tutorial! I've been trying to implement the clean architecture but somehow it seems like it's not clean enough. The things that I did wrong was that, I created the same interface for both the remote and local data source, so sometimes the parameters required in the remote data source, aren't actually used in the local data source. And I've been wondering if I implemented the caching mechanism the right way. Thats why I'm so curious about the next part of this tutorial. You're doing a great job teaching. Thank you!

tityseptiani
Автор

Waited for the next episode ;) this series gets its own playlist. Keep up the nice work

ShadowInfest
Автор

Huge work, thanks for this tutorial series!

alexey
Автор

Man I love your tutorials, you are taking us to the next level. Just a question, could we do all this using Fakes instead of mocks?

tinoutech
Автор

Why use Params to wrap number[int] in the GetConcreteNumberTrivia use case and then unwrap it in the repository? Why not using number[int] at the beginning? And if we have a complex business logic that we have a lot of params needs to be passed to the lower level repository, for instance: add a contact(avatar, desc, name, address, phone1 phone 2, etc...), what should we do? To use a raw Contact entity(without database id), or wrap all those fields into AddContactParams and then unwrap them into separate fields in the repository? I am a little bit confused, help please. ;-D

RyanHooGeek
Автор

I think i finally understand how this is supposed to work

max_ishere
Автор

Great tutorial. Impatiently waiting for next in series.

guptaprabhat
Автор

You mentioned that you don't want to throw exceptions out of Repository layer, why is that? I didn't quite catch it in your first video and here as well. Isn't that Exception better than ErrorCode? Thanks.

A_I_GHOST
Автор

Wow. So far the tutorial is very good! Although there is a lot of stuff I need to process first.


Posílám pozdrav z Česka. <3

tenhobi
Автор

Okey can someone help me to understand a concept.
what is the use of NumberTrivalRepository of domain layer and NumberTrivalRepositoryImpl of data layer?

suzanaangboo
Автор

If functions are returning a stream, does it still make sense to use Either?

EamonnOConnell
Автор

Request,
Please make a video on realm db and mongodb crud operations on flutter

rakshithg
Автор

thank you again bro, how often are you going to publish each part?

eduardorabanal
Автор

As much as liked your videos but a suggestion of mine the folder structure could be simplified .

reapergrim
Автор

No, I don't want to be a software engineer at Google. If this ad comes up one more time, I'll quit Youtube.

varunsharma
visit shbcf.ru