A proof of concept of the VIPER architecture

Related tags

Miscellaneous tmdb
Overview

tmdb

This project contains a proof of concept of the VIPER architecture. For this we are going to make use of the public API tmdb, with which we will implement a search engine, a list and a view detail.

Setup

You have to follow these steps to build and run this project in Xcode:

Install cocoapods:

$ gem install cocoapods #Use sudo if necessary

Install pods:

$ pod install

Application Architecture

VIPER Arquitecture

Each scene is divided into the following classes:

  • View: This class configures the app interface and alerts the Presenter about user interactions.
  • Interactor: Business logic of the app. It makes API calls to fetch data.
  • Presenter: This class gets user responses from the View, calls the Router to navigate to other scenes and Interactor to fetch data in order to update UI accordingly.
  • Entity: Model classes used by the Interactor.
  • Router: In this class there is the logic to perform navigation between scenes. In our case, we named this class Wireframe.

Following this definition, each scene has one file for each layer: ViewController, Interactor, Presenter and Wireframe. We also have models used by the interactor.

Viper is a delegation driven architecture, so, the communication between layers is performed through protocols. This is why we have another file called Protocols, in which we have all scene protocols (ViewControllerProtocol, InteractorProtocol, PresenterProtocol and WireframePorotocol).

We have another class called Configurator in order to configure and prepare the scene. In this class all the dependencies between layers are injected.

To learn more about VIPER:


App folder structure

  • tmdb: tmdb's classes

    • Source: app delevelopment files
      • Models: entities that are used by Interactor.
      • Scenes: contains one folder for each scene, with VIPER modules and .xib.
      • Networking: classes to manage API service calls.
      • UI: UI components and Cocoa extensions of tmdb
      • Util: common classes throughout the app
        • Extensions
    • Resources: assets, fonts, localizable...
    • Supporting Files: configuration files like Info.plist and AppDelegate
  • tmdbTests: unit testing files of tmdb target

    • Source: test development files
    • Supporting files: configuration files
You might also like...
Challenge-viper-finance - Project for VIPER Architecture Dev Sprints on Devpass
Challenge-viper-finance - Project for VIPER Architecture Dev Sprints on Devpass

VIPER Challenge - Finance App 💰 Neste desafio, aplicaremos conceitos da arquite

SwiftUI TextEdit View - A proof-of-concept text edit component in SwiftUI & CoreText.
SwiftUI TextEdit View - A proof-of-concept text edit component in SwiftUI & CoreText.

A proof-of-concept text edit component in SwiftUI & CoreText. No UIKit, No AppKit, no UITextView/NSTextView/UITextField involved.

A very basic proof-of-concept Swift HTTP server that does not require Foundation

Swift Server Introduction This is very rough and basic HTTP server written in Swift without using Foundation. This is partially based on the Swifter r

A network extension app to block a user input URI. Meant as a network extension filter proof of concept.
A network extension app to block a user input URI. Meant as a network extension filter proof of concept.

URIBlockNE A network extension app to block a user input URI. Meant as a network extension filter proof of concept. This is just a research effort to

Proof-of-concept `WKWebview.evaluateJavaScript(...)` replacement for WebSocket-based Javascript execution.

Proof-of-concept `WKWebview.evaluateJavaScript(...)` replacement for WebSocket-based Javascript execution.

Proof concept of modularized app with SwiftPackages built over MVI + Combine + SwiftUI in a single repo
Proof concept of modularized app with SwiftPackages built over MVI + Combine + SwiftUI in a single repo

PKDex-iOS Proof concept of modularized app with SwiftPackages built over MVI + Combine + SwiftUI in a single repo Introduction This project is a proof

QR2Pass: a proof of concept for an alternative (passwordless) authentication system to a web server

QR2Pass This is a proof of concept for an alternative (passwordless) authenticat

TCC ClickJacking - A proof of concept for a clickjacking attack on macOS
TCC ClickJacking - A proof of concept for a clickjacking attack on macOS

A proof of concept for a ClickJacking attack on macOS. Why? TCC (Transparency, Consent, and Control) restricts and control applicatio

Proof of concept app for trying to integrate passkeys and WebAuthn into Vapor
Proof of concept app for trying to integrate passkeys and WebAuthn into Vapor

Vapor Passkey Demo Proof of concept app for trying to integrate passkeys and WebAuthn into Vapor Usage Clone the project, then in Terminal run swift r

A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background
A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background

Atmos A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background. "Ima use this in my app..." Introducing Metal to S

A proof-of-concept WebURL domain renderer, using a port of Chromium's IDN spoof-checking logic to protect against confusable domains

WebURLSpoofChecking A proof-of-concept WebURL.Domain renderer which uses a port of Chromium's IDN spoof-checking logic (Overview, Implementation) to p

The concept won first place in the Design Concept Award contest Season 1 in 2021.
The concept won first place in the Design Concept Award contest Season 1 in 2021.

TallyCounter Developed by Vladyslav Fil as part of the You are launched "Design Concept Award" contest Season #1. Tally Counter Micro-Interaction demo

The concept took third place in the Design Concept Award contest Season 1 in 2021.
The concept took third place in the Design Concept Award contest Season 1 in 2021.

SpringAnimation Developed by Yurii Sameliuk as part of the You are launched "Design Concept Award" contest Season #1. SpringAnimation demo. Inspired b

The concept took second place in the Design Concept Award contest Season 1 in 2021.
The concept took second place in the Design Concept Award contest Season 1 in 2021.

SmileRate Developed by Alex Kryvodub as part of the You are launched "Design Concept Award" contest Season #1. SmileRate demo. Inspired by Duy Luong c

The concept took third place in the Design Concept Award contest Season 1 in 2021.
The concept took third place in the Design Concept Award contest Season 1 in 2021.

SpringAnimation Developed by Yurii Sameliuk as part of the You are launched "Design Concept Award" contest Season #1. SpringAnimation demo. Inspired b

The concept won first place in the Design Concept Award contest Season 1 in 2021.
The concept won first place in the Design Concept Award contest Season 1 in 2021.

TallyCounter Developed by Vladyslav Fil as part of the You are launched "Design Concept Award" contest Season #1. Tally Counter Micro-Interaction demo

The concept won first place in the Design Concept Award contest Season 2 in December 2021.
The concept won first place in the Design Concept Award contest Season 2 in December 2021.

SwiftUI-ChristmasGift Developed by Alex Kryvodub as part of the You are launched "Design Concept Award" contest Season #2. ChristmasGift demo. alex.mp

The concept took second place in the Design Concept Award contest Season 2 December 2021.
The concept took second place in the Design Concept Award contest Season 2 December 2021.

SwiftUI-UrlaunchedMerryChristmasCard Developed by Yurii Sameliuk as part of the You are launched "Design Concept Award" contest Season #2. MerryChrist

The concept took third place in the Design Concept Award contest Season 2 in December 2021.
The concept took third place in the Design Concept Award contest Season 2 in December 2021.

SwiftUI-UrlaunchedLaunchScreen Developed by Vladyslav Fil as part of the You are launched "Design Concept Award" contest Season #2. Animated Launch Sc

Owner
Luis Martínez Zarza
Luis Martínez Zarza
Create an app using VIPER architecture

How not to get confused with VIPER Implementation This is a demo app to share in swift study group using VIPER Architechture When using VIPER Architec

null 1 Dec 4, 2021
A demo project with VIPER architecture

AQIDemo What is it? A demo project with VIPER architecture. All views, Interactors Presenter and routers are in place with their respective folder. Ap

Vivek Agar 0 Nov 23, 2021
IOS Swift Application using VIPER Architecture

IOS Swift Application using VIPER Architecture. This is a simple design application for E-Commerce using VIPER architecture and CoreData, I prefer using Delegate Protocols rather than Third Party Library such as Rx but at this project I make it as an example on how to using VIPER.The application also support localization.

Mahmoud Salah 0 Dec 1, 2021
Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Alaa Azab 0 Oct 7, 2021
A sample app that implements MVVM architecture using Swift, ViewModel, Alamofire

MVVM Architecture Android: Template This repository contains a sample app that implements MVVM architecture using Swift, ViewModel, Alamofire, and etc

null 0 Oct 19, 2021
A compiler, assembler and emulator for the QCPU 2 architecture

QCPU CLI A CLI for compiling Q-code, assembling extended QCPU 2 assembly and emulating machine code. Tags @PAGE <upper> <lower> @HEADER <label> <argum

Joey Smalen 5 Nov 16, 2022
Wiggles-iOS - Beautiful Puppy adoption app built to Demonstrate the SwiftUI and MVVM Architecture

Wiggles ?? Beautiful Puppy adoption app built to Demonstrate the use of SwiftUI

Sameer Nawaz 186 Dec 18, 2022
Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice versa.

Rosetta Enforcer Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice ver

John Seong 21 Sep 25, 2022
Arm64 architecture handler - It uses unicorn and libffi to run iOS arm64 binaries on x86_64 macOS

aah arm64 architecture handler. It uses unicorn and libffi to run iOS arm64 binaries on x86_64 macOS, with varying degrees of success. Most things wil

Jesús A. Álvarez 159 Dec 2, 2022
Swift-VIPER-Module - Xcode template for VIPER Architecture written in Swift 4

⚠️ Deprecated ⚠️ This library is deprecated. When you decide to use VIPER architecture in your project, it is very tired create new modules, because y

Juanpe Catalán 533 Nov 17, 2022