Merqueo app uses VIPER architecture

Overview

merqueo-test

How the app works

alt text

Instalation

This project require XCode 13.0, Swift 5.0 and should be run on device with iOS 15+ and then, you should run the app.

Architecture

This project uses VIPER architecture, VIPER is an application of Clean Architecture to iOS apps. The word VIPER is a backronym for View, Interactor, Presenter, Entity, and Routing. Clean Architecture divides an app’s logical structure into distinct layers of responsibility. This makes it easier to isolate dependencies (e.g. your database) and to test the interactions at the boundaries between layers. Architecting iOS Apps with VIPER.

alt text

This architecture is conformed by 5 layers which have single responsibilities, which represent an opportunity to have a project decoupled, testable, and scalable.

View

This layer is responsible to manage the view and the view controller, which allows to have centralized all the components and their behavior. This layer have their UIView components and UIViewControllers.

Presenter

The presenter layer is responsible to manage the communication between the View layer, Router layer and Interactor layer. Its main function is handle each visual request, retrieve information from interactor layer or, route the actual view to another one with the Router.

Router

This layer is responsible to manage the communication between modules, its allows us changing between views and, create modules for each feature on the app.

Interactor

The interactor is the main integral layer, because on it we could manage all the business logic and have communication with the data modules which retrieve us data from local or remote repositories.

Entity

Entity layer provides a model which interactor use to create objects from the fetched data. The Entity is probably the simplest element inside a VIPER structure.

Good Practices

With the following practices, we've achieved create a product with highly quality.

  • Clean code
  • SOLID Principles
  • DRY Principle
  • Dependency Injection
  • Modularized architecture

Project Structure

App Folder

Is a folder which have the appDelegate, sceneDelegate, assets and, LaunchScreenStoryboard).

alt text

Modules

In this folder we have each app module. In this case we have a Movie, and DetailMovie Modules, where we can find a viper architecture for each module. This architecture allow us to define single responsabilities for each layer.

alt text

Extensions

In this folder we can find a multiples extensions. The main idea of this folder is have a transversal module which help us with reusables functions.

alt text

Services

This layer allows us to separate in a single context everything related to networking and web services.

alt text

Unit Test

In this section we have the unit test structure, this folder meets the Viper architecture requirements. To continue, we can find a Test Double approach where we use Mocks, and Stubs doubles to test the differents architecture layers.

alt text

You might also like...
Challenge-vip-delivery - Project for VIP (Clean Swift) Architecture Dev Sprints on Devpass
Challenge-vip-delivery - Project for VIP (Clean Swift) Architecture Dev Sprints on Devpass

VIP (Clean Swift) - Delivery App 🍕 Neste desafio, aplicaremos conceitos da arquitetura VIP para finalizar a implementação de um aplicativo. Desenvolv

This is a tiny experimental application using SwiftUI with Flux architecture.
This is a tiny experimental application using SwiftUI with Flux architecture.

🚀 SwiftUI-Flux This is a tiny experimental application using SwiftUI with Flux architecture.

NewsApp-MVVM - News application with MVVM architecture
NewsApp-MVVM - News application with MVVM architecture

NewsApp-MVVM News application with MVVM architecture.

 The App Brewery Complete App Development course project
The App Brewery Complete App Development course project

Destini The App Brewery Complete App Development course project. "A Choose Your

Scrumdinger-ios - Built as a part of iOS app dev tutorials from app-dev-training
Scrumdinger-ios - Built as a part of iOS app dev tutorials from app-dev-training

Scrumdinger This repository contains the code written during my course of taking

Tipsy - Bill splitting and tip calculating App developed during iOS & Swift classes - The Complete App Development Bootcamp
Tipsy - Bill splitting and tip calculating App developed during iOS & Swift classes - The Complete App Development Bootcamp

Tipsy 💵 Bill splitting and tip calculating App developed during iOS & Swift cla

A simple app that I created to migrate my photos from Lightroom Classic to Apple's Photos.app.
A simple app that I created to migrate my photos from Lightroom Classic to Apple's Photos.app.

CustomPhotoImporter A simple app that I created to migrate my photos from Lightroom Classic to Apple's Photos.app. This is optimised for my specific n

Concept for organizing View and Data layers within SwiftUI App
Concept for organizing View and Data layers within SwiftUI App

SwiftUI MVVM Concept It is not about how to create Lists and Charts and View design. It's about possibility how to organize View and Data layers withi

Owner
Brayam Mora
iOS dev. Fan of clean code and simplicity.
Brayam Mora
Exchanger - a simple iOS application demonstrating one of approaches to implement VIPER 💎 architecture in modern Objective-C

The Exchanger is a simple iOS application demonstrating one of approaches to implement VIPER ?? architecture in modern Objective-C.

Vladimir Kaltyrin 11 Oct 11, 2022
RestaurantMenu App Viper

RestaurantMenuAppViper В качестве открытого API используется https://www.themealdb.com/api.php (рецепты блюд) В связи с ограниченым функционалом данно

Ivan 0 Jan 14, 2022
Flix is an app the uses the the movies database to get upcoming movies, with infinite scrolling

Flix Flix is an app the uses the the movies database to get upcoming movies, with infinite scrolling Libraries Flix uses Swift Package Manager (SPM),

null 0 Oct 31, 2021
Swift iOS coffee ordering app that uses the MVVM design pattern that makes

CoffeeOrder Swift iOS coffee ordering app that uses the MVVM design pattern that makes "GET" and "POST" requests to an API for the orders Screenshots

Jerome Pullen Jr. 1 Feb 15, 2022
Uses Firestore to remotely store books that are sorted by genre locally.

Uses Firestore to remotely store books that are sorted by genre locally. Books can be added, removed, or edited from within the app or on Firebase.

Eli Hartnett 0 Jul 9, 2022
A sample iOS app built using the Clean Swift architecture

Main Purpose is to create a simple project for Clean-Swift This project wrote with using Clean-Swift and MVP Design Pattern

Eyup Cimen 8 Oct 24, 2022
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

Ahmed Nasser 5 Jun 9, 2022
REDUX like architecture sample for iOS

perdux_sample_swiftUI REDUX like architecture sample for iOS (target 14.*) Motivation: to share reactive architecture approach with single direction d

alexis 3 Jan 27, 2022
A simple in iOS to demonstrate a basic MVVM architecture.

Repository A Simple iOS application in swift with MVVM-C architecture. Achitecture This project build on MVVM-C (Model, View, ViewModel, Coordinator)

Pankaj Kumar Jha 0 Oct 24, 2021
Weather Forecast Assigment is an iOS application built to highlight MVP and Clean Architecture concepts

Weather Forecast Assigment - iOS - MVP + Clean Architecture Description Weather Forecast Assigment is an iOS application built to highlight MVP (Model

Khôi Việt 2 Oct 30, 2021