MVVM-Clean with DI implementation sample project

Related tags

Guides MVVM-Clean-DI
Overview

MVVM-Clean with Dependency Provider

Introduction

This project contains MVVM-Clean architecture and Dependency injection

Folder Structure

Every module has :

1- Data Layer

Repository Implementations and one or many Data Sources.

Repository

Repositories are responsible for coordinating data from different Data Sources.

Data Source

Data Source can be Remote or Local. (for example: persistent database or network call)

2- Domain Layer

Domain Layer (Business logic) is the inner-most part of the onion (without dependencies to other layers, it is totally isolated). It contains Entities(Business Models) & Use Cases.

Entity

Entities are data models.

Usecases

Usecase refers to the class which contains the business logic. This does not have (compile) dependencies to the view or any external framework.

3- Presentation Layer

Presentation Layer contains UI (UIViewControllers). Views are coordinated by ViewModels (Presenters) which execute one or many Use Cases. Presentation Layer depends only on the Domain Layer.

View

ViewControllers/Views which only displays prepared data and communicate with ViewModels.

View Model

ViewModel receives actions from events such as button tap or view lifecycle onAppear and processes them.

Dependency Provider

Dependency provider will be made for every module. It's job is to instantiate and resolve dependencies of each module.

Cloning the project

Using XCode:

Tap the clone down arrow and choose XCode, it will then ask to choose the branch name to checkout and destination path to save. After that it will directly open the project on XCode.

Using command:

git clone https://github.com/YOUR-USERNAME/REPOSITORY-TO-CLONE

Renaming complete project name

  • Open the project on XCode and rename the .xcodeproj file. It will then ask to select all the files required to rename.
  • Change scheme name by selecting scheme -> manage scheme -> edit currently selected scheme name
  • Change info.plist path, select .xcodeproj -> under targets select your project name -> under build settings select packaging and change Info.plist File path
  • Change Bundle Identifier under targets select project name -> under general change bundle ID
You might also like...
iOS native app demo with Xcode and Swift using MVVM architecture and Apple's Combine framework for functional reactive programming, all with UIKit
iOS native app demo with Xcode and Swift using MVVM architecture and Apple's Combine framework for functional reactive programming, all with UIKit

iOS (Swift 5): MVVM test with Combine and UIKit MVVM and functional reactive programming (FRP) are very used in iOS development inside companies. Here

A demo demonstrates how to use combine and MVVM in the SwiftUI app
A demo demonstrates how to use combine and MVVM in the SwiftUI app

SwiftUI-MVVM-Combine A demo demonstrates how to use combine and MVVM in the Swif

Create a simple MVVM-C iOS architecture with Swift for starters

iOS-Architecture-MVVM MVVM+Coordinators IOS Architecture Tutorial By Bobby Pehtr

This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on..
This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on..

SwiftUI MVVM COREDATA NOTE APP This a simple swiftui app where i used mvvm architecture, coredata swiftui and so on... #FEATURES SWIFTUI MVVM COREDATA

WhaleFull - MVVM + RxSwift + CTMediator + MJRefresh + DZNEmptyDataSet

WhaleFull 👌 . MVVM + RxSwift + CTMediatror + MJRefresh + DZNEmptyDataSet Englis

MVVM-RXSWIFT-COMBINE- - Demo application populating posts from network request using
MVVM-RXSWIFT-COMBINE- - Demo application populating posts from network request using

MVVM = RXSWIFT + COMBINE Demo application populating posts from network request

NewsAppMVVM - A Swift iOS App created to practice MVVM Design Pattern
NewsAppMVVM - A Swift iOS App created to practice MVVM Design Pattern

NewsAppMVVM A Swift iOS App created to practice MVVM Design Pattern. This app re

PunkAPI(BrewDog) 을 이용한 RxSwift-MVVM 예제 (Naver Tech Concert)

BringMyOwnBeer 🍺 RxSwift를 이용한 MVVM 패턴 예제 Contents About BringMyOwnBeer 🍺 Concept Contact Me About BringMyOwnBeer 🍺 생소한 RxSwift와 MVVM 개념을 보다 쉽게 이해할

Mvvm - Collection View Notes With Swift
Mvvm - Collection View Notes With Swift

CollectionViewNotes Haciendo apuntes para cuando pierda la memoria Comenzando 🚀

Owner
Faraz Ahmed Khan
iOS Developer
Faraz Ahmed Khan
SampleProjectMVVM - Sample project using MVVM parsing data from Giphy.com

iOS Take Home Create an iOS app with two views, MainViewController and DetailVie

HG HrachGarabedian 0 Jan 27, 2022
SpaceX rocket listing app using RxSwift and CLEAN Architecture with MVVM

Jibble SpaceX rocket listing app using RxSwift and CLEAN Architecture with MVVM Demo Features Reactive Bindings URL / JSON Parameter Encoding Filter Y

Ammad Akhtar 0 Dec 5, 2021
Swift, UIkit, Anchorage, Clean Architecture, UICollectionViewDiffableDataSourcem, MVVM+Coordinators patterns

About the app iOS project realized with Swift, UIkit, Anchorage, Clean Architecture, UICollectionViewDiffableDataSource and MVVM + Coordinators patter

Luca Berardinelli 2 Oct 3, 2022
A Swift implementation of a Flickr-search application that uses MVVM and ReactiveCocoa

ReactiveCocoa, Swift and MVVM This application is a Swift-port of an MVVM / ReactiveCocoa example application I wrote a few months ago. Instructions T

Colin Eberhardt 377 Sep 26, 2022
ProductListSwiftUI - SwiftUI Project to fetch product list using the fakestoreapi and the MVVM architectural pattern

ProductListSwiftUI SwiftUI Project to fetch product list using the fakestoreapi

Vitalii Shapovalov 4 Sep 16, 2022
HotCoffee is learning project with MVVM, Generic,Swift 5, TableView

HotCoffee A simple Coffee Ordering app built using TableView, MVVM design pattern and Swift5. Tools Xcode Version 13.2.1 Framework -UIKit Architecture

Ghullam Abbas 2 Aug 26, 2022
SignalKit is a reactive Swift framework with focus on clean and readable API.

Abstract SignalKit is a lightweight event and binding framework. The core of SignalKit is the Observable protocol. Each implementation of the Observab

Yanko Dimitrov 249 Sep 23, 2022
This is an iOS Safari Extension Sample that adds a "Develop menu" to Safari on iOS to allow you to analyze websites.

Develop Menu for Mobile Safari This is an iOS Safari Extension that adds a "Develop menu" to Safari on iOS to allow you to analyze websites. This is a

Watanabe Toshinori 2 Jun 16, 2022
Exemplify a LazyVGrid in SwiftUI in a MVVM pattern with Mock Data and images in assets.

SwiftUI-LazyVGrid Exemplify a LazyVGrid in SwiftUI in a MVVM pattern with Mock Data and images in assets. Screenshots Samples IP & Credits All those b

Ethan Halprin 3 Aug 9, 2022
Mini-application iOS native avec Xcode et Swift exploitant l'architecture MVVM et le framework Combine d'Apple pour la mise en place de la programmation réactive fonctionnelle, le tout avec UIKit.

iOS (Swift 5): Test MVVM avec Combine et UIKit L'architecture MVVM et la programmation réactive fonctionnelle sont très utlisées dans le développement

Koussaïla BEN MAMAR 2 Nov 5, 2022