/ios-learn-mvvm

Learn to use proper MVVM Design Pattern

Primary LanguageSwiftMIT LicenseMIT

Learn Proper MVVM

1. Swift Tutorials: MVVM Design Pattern in iOS

Learn basic MVVM using static data to authenticate login by checking static username and password.

  • You can check the full tutorial here.
         

2. Beginning Swift: Networking, Table Views, and MVVM

Learn to use MVVM with API data. Was modified the example a bit to match my style.

  • You can check the full tutorial here.
  • And you can check the API source here.

3. Model View View-Model (MVVM): Getting Started

Learn to use MVVM with Observable (not RxSwift by-the-way). Was modified the example from Android-Java to iOS-Swift and write the code to match my style.

  • You can check the full tutorial here.
  • And you can check the article about Observable here.
         

4. MVVM with Clean Architecture

Learn to do separation on MVVM using Clean Architecture. There are 3 main layers, Presentation, Domain, and Data layers.

  1. Presentation. Contains the Views and ViewModels. The Presentation layer depends only on the Domain layer.
  2. Domain. Contains the Models (entities) and UseCases. The UseCase depends on what we need and might not include all repositories.
  3. Data. Contains the Repositories. The Repository is what we need to communicate with ReST API or local persistent data like CoreData or Realm. And The Data layer depends only on the Domain Layer. I was modified the example to match my coding style.
  • You can check the full article here.
  • And you can check the source-code here.

5. MVVM with 3rd Party Library

Learn to use the power of RxSwift, RxCocoa, RxAlamofire, even Swinject and SwinjectStoryboard.

  • You can check Swinject documentation here
  • And you can also check the SwinjectStoryboard here.

6. MVVM RxSwift Practical Example App

Learn to use the power of RxSwift, RxCocoa, and ceate app coordinator.

  • You can check the full tutorial here