Great job here and enjoying this tutorial series. One nitpick (perhaps it is just naming), but exposing "NetworkOperation" to the presentation layer seems wrong since the Presentation layer should not have any idea that networking is involved (i.e. the data could potentially be coming from local database, not networking). The Repository should be hiding this detail and providing some domain-level thing (like "NetworkOperation - perhaps a different name? "Resource" was used for this purpose in past examples) Regardless of the name, providing a domain-level Loading/Success/Failure value is still relevant and useful regardless of where the data is coming from and your functional programming additions to Resource are very cool.
Yeah that's a totally valid nitpick to be honest! We do this already with the network vs. domain classes that handle the data. I didn't want to overcomplicate in a single video, but what you're describing is "the way" to do it. If you wanted to create a PR to map NetworkOperation to Resource and preserve the functionality of it all, I could make a video about your comment and how to review a PR :) I think it would make for an awesome video!
Amazing tutorial and congratulations again on the promotion!
Thank you sir 🫡
Great job here and enjoying this tutorial series. One nitpick (perhaps it is just naming), but exposing "NetworkOperation" to the presentation layer seems wrong since the Presentation layer should not have any idea that networking is involved (i.e. the data could potentially be coming from local database, not networking). The Repository should be hiding this detail and providing some domain-level thing (like "NetworkOperation - perhaps a different name? "Resource" was used for this purpose in past examples) Regardless of the name, providing a domain-level Loading/Success/Failure value is still relevant and useful regardless of where the data is coming from and your functional programming additions to Resource are very cool.
Yeah that's a totally valid nitpick to be honest! We do this already with the network vs. domain classes that handle the data. I didn't want to overcomplicate in a single video, but what you're describing is "the way" to do it. If you wanted to create a PR to map NetworkOperation to Resource and preserve the functionality of it all, I could make a video about your comment and how to review a PR :) I think it would make for an awesome video!