A demo project using VIPER architecture and building user interface programmatically

Overview

ProductDiscovery

A demo project that building a UIKit user interface programmatically. Because the UI is made of code very long so I have separated it from ViewController. I also separate the business logic from the ViewController. Now the viewcontroller just performs the function as its name suggests.

Demo

Compatibility

  • iOS 13 and later
  • Swift 5 and later

Functions

  • Call API to get product list
  • Store product list to local datadase, so the app can work offline
  • Search product list by name and code
  • Rank search results by relevance
  • Highlisht matched terms in displayed results
  • Filter products as user types query
  • Localized

Architecture

A project that uses VIPER for software architecture. VIPER is a backronym for View, Interactor, Presenter, Entity, and Router.

Project structure

  • View: The responsibility of the view is to send the user actions to the presenter and shows whatever the presenter tells it.
  • Interactor: This is the backbone of an application as it contains the business logic.
  • Presenter (View controller): Its responsibility is to get the data from the interactor on user actions and after getting data from the interactor, it sends it to the view to show it. It also asks the router/wireframe for navigation.
  • Entity: It contains basic model objects used by the Interactor.
  • Router: It has all navigation logic for describing which screens are to be shown when. It is normally written as a wireframe.

Project structure

Project structure

License

Copyright vimask, Licensed under the MIT license.

You might also like...
Demo of using AVPictureInPictureController with an AVSampleBufferDisplayLayer content source not working on tvOS or macOS

PiP Bug Demo I believe there is an Apple-level framework issue when using AVPictureInPictureController with an AVSampleBufferDisplayLayer content sour

ITunesSearchApiDemo - A demo for using iTunes Search API

iTunesSearchApiDemo This is a demo for using iTunes Search API. For more informa

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

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.

 MeCab Demo for iOS 15 and SPM
MeCab Demo for iOS 15 and SPM

MeCab Demo for iOS 15 and SPM Sample project for MeCab, a Japanese tokenizer/morphological analyzer. Updated for iOS 15 and SPM. Successor to landonep

MemeMe, students will create an app that enables a user to take a picture, and add text at the top and bottom to form a meme
MemeMe, students will create an app that enables a user to take a picture, and add text at the top and bottom to form a meme

With this first version of MemeMe, students will create an app that enables a user to take a picture, and add text at the top and bottom to form a meme. The user will be able to share the photo on Facebook and Twitter and also by SMS or email.

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

Demo of a simple ASP.NET Core web API written in Swift

Welcome! This repo is a demo which shows the use of Llama Swift with ASP.NET Core. Llama is my exploratory project to compile "other languages" for .N

GoodAsOldPhones is the demo app of Swift tutorial on code school.
GoodAsOldPhones is the demo app of Swift tutorial on code school.

GoodAsOldPhones GoodAsOldPhones is the demo app of Swift tutorial on code school. This app demonstates basic use and implementation of tab bar control

Comments
  • Nhiều điểm chưa ổn về kiến trúc

    Nhiều điểm chưa ổn về kiến trúc

    • Mình thấy bạn sử dụng VIPER nhưng mình lại k thấy P - Presenter và R - Router ở đâu trong code cả
    • Vì không có router nên bạn đang khởi tạo các màn hình trực tiếp từ viewController, điểm này cũng chưa ổn vì các màn hình cần được khởi tạo từ phía router
    • View Controller tương tác trực tiếp với interactor là sai, VC chỉ có thể tương tác vs Presenter, Presenter sẽ tương tác với những thằng khác để lấy kết quả rồi trả về cho VC
    • Mình vẫn thấy tồn tại logic if không cần thiết ở VC, VC trong viper cần ngu hết sức có thể nên cần cố gắng chuyển toàn bộ những logic như if else sang presenter
    opened by minhtien1403 1
Owner
Vinh Vo
Vinh Vo
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
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
This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI with ShazamKit'

Shazam-Kit-Tutorial This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI w

Swapnanil Dhol 7 Mar 17, 2022
Demo project using React Native technology to create a simple iOS app to find music in iTunes

React Native, native iOS apps with JavaScript iTunesCatalog is a demo app that aims to show the React Native platform potential. There are included th

Alexis Santos Pérez 55 Feb 10, 2022
RestaurantMenu App Viper

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

Ivan 0 Jan 14, 2022
Demo project for MOPCON2021

Nav This project is a demo for MOPCON 2021. The topic is SwiftUI Navigation Study. There are 3 ways to see how the code works, which demos different v

Ethan Huang 5 Oct 12, 2022
This is a demo project which contains the steps to create App with TunnelRay library

This is a demo project which contains the steps to create App with TunnelRay library Environment requirements: XCode: > 13.1 Cocoapods: > 1.11.2 Detai

null 2 Oct 17, 2022
🚀 This demo is very simple project, which designed to understand SwiftUI

?? This demo is very simple project, which designed to understand SwiftUI. It includes Main screen, DayList screen and detail screen.

Necati Evren Yaşar 40 Jan 6, 2023
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

Devpass 5 Oct 24, 2022
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.

FindSurface-GUIDemo-iOS (Swift) CurvSurf FindSurface™ GUIDemo for iOS (Swift) Overview This demo app demonstrates a real-time application using FindSu

CurvSurf 0 Nov 28, 2022