Загрузка...

SwiftUI: MVVM Data Persistence Decoupling Using Dependency Injection (User Defaults) Part 1 of 2

In SwiftUI (iOS) decouple your View and ViewModel code from your data persistence code. This is often a messy business unless you create the right architecture. I will show you how to do this with Combine framework and Dependency Injection using protocol and the "any" key word. With this you don't have to touch the View and ViewModel code even if you completely change the back end. This will show how to create a MockDataService and UserDefault based DataService. This is part 1. The next video with demonstrate how to use CoreData for the data persistence.

Use this link to download the source code from github. https://github.com/Westmaner/DataService

Видео SwiftUI: MVVM Data Persistence Decoupling Using Dependency Injection (User Defaults) Part 1 of 2 канала Tim Yoon
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять