Weather Forecast Assigment is an iOS application built to highlight MVP and Clean Architecture concepts

Overview

Weather Forecast Assigment - iOS - MVP + Clean Architecture

Description

Weather Forecast Assigment is an iOS application built to highlight MVP (Model View Presenter) and Clean Architecture concepts

Run Requirements

  • Xcode 12+
  • Swift 5

High Level Layers

MVP Concepts

Presentation Logic
  • View - delegates user interaction events to the Presenter and displays data passed by the Presenter
  • Presenter - contains the presentation logic and tells the View what to present
  • Configurator - injects the dependency object graph into the scene (view controller)

Clean Architecture Concepts

Application Logic
  • UseCase / Interactor - contains the application / business logic for a specific use case in application
  • Entity - plain Swift classes / structs
Gateways & Framework Logic
  • Gateway - contains actual implementation of the protocols defined in the Application Logic layer
  • Persistence / API Entities - contains framework specific representations

Assignment Application Details

  • Overview what I have to do in the assignment application:
    • Load data weather, display on view.
    • Check search input to make sure the keywords more than three characters berfore trigger search request.
    • Check if search request have from Cache (CoreData) before request to the server. This to prevent the request calling to the server at the same time with same request.
    • Make new search request to get newest data from server.
    • Hande error from server response.
    • Store the request & response to CoreData.
    • Accessibility supports:
      • Scaling text if supported to change the font size.
      • The screen reader is enable by VoiceOver.
  • Following MVP-Clean Architecture, I have been written:
    • WeatherPresenter - Return weather data to display on screen, valid input,...
    • SearchWeatherUserCase - Referenced with WeatherPresenter to process the search weather by city name feature, it manipulates Weathers Entity and comunicates with WeatherGateway to retrive / persist the weathers entity.
    • WeatherGateway - Implementation of the protocols defined from Use Cases layer.
      • ApiWeatherGateway - Using URLSession to request data from server.
      • LocalPersitenceWeatherGateway - Using CoreData to fetch weather data storaged.
    • Weather entity - Contains specific representations, includes: ApiWeatherRequest, ApiWeatherResponse, Weather Entity from CoreData.

ToDo

  • Unit Tests
  • UI Tests

Check List

  • The application is a simple iOS application that is written by Swift.
  • The application is able to retrieve the weather information from OpenWeatherMaps API.
  • The application is able to allow user to input the searching term.
  • The application is able to proceed searching with a condition of the search term length must be from 3 characters or above.
  • The application is able to render the searched results as a list of weather items.
  • The application is able to support caching mechanism so as to prevent the app from generating a bunch of API requests.
  • The application is able to manage caching mechanism & lifecycle.
  • The application is able to handle failures.
  • The application is able to support the disability to scale large text for who can't see the text clearly
  • The application is able to support the disability to read out the text using VoiceOver controls.
You might also like...
🌤 SwiftUI Weather App
🌤 SwiftUI Weather App

WeatherApp 《SwiftUI 与 Combine 编程》(喵神) 读后实践 一个天气 App,可搜索、关注城市,查看城市详细天气预报。 由 SwiftUI 驱动的跨平台 app,包括 UI 布局、状态管理、网络数据获取和本地数据存储等等。

A demo project using VIPER architecture and building user interface programmatically
A demo project using VIPER architecture and building user interface programmatically

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

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

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)

Merqueo app uses VIPER architecture
Merqueo app uses VIPER architecture

merqueo-test How the app works Instalation This project require XCode 13.0, Swift 5.0 and should be run on device with iOS 15+ and then, you should ru

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

An instagram clone for iOS built with Parse
An instagram clone for iOS built with Parse

Parstagram - Part II This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comm

This project is built to show how to support accessibility features in iOS applications in UIKit.
This project is built to show how to support accessibility features in iOS applications in UIKit.

ACCESSIBILITY EXAMPLE This project is built to show how to support accessibility features in iOS applications in a blog post. For the sake of Accessib

NasaAPOD App Built with swift
NasaAPOD App Built with swift

NasaAPOD Technical Description: App Runs on Swift 5 + iOS 15 (for testing only traget can be changed) App Folows MVVM+R pattern where R = router for n

Owner
Khôi Việt
Khôi Việt
TrendingMovies demos some UIKit (& Combine) concepts

TrendingMovies demos some UIKit (& Combine) concepts. The goal is to make a application using some good software engineering concepts from my point of view, and show how I like to code. It'll be updated with new features and tests as soon as possible.

Raphael Oliveira 8 Dec 22, 2022
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
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
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
This is a tiny experimental application using SwiftUI with Flux architecture.

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

Ryo Aoyama 52 Feb 6, 2022
NewsApp-MVVM - News application with MVVM architecture

NewsApp-MVVM News application with MVVM architecture.

Fırat Onurcan POLAT 1 Jan 29, 2022
Screen transition with safe and clean code.

Presenter Screen transition with safe and clean code. With Presenter, you can… Assure that the ViewController's requirements are met, such as a ViewMo

Muukii 14 Aug 25, 2020
Instagram Clone Application Built Using Swift And Firebase

InstagramClone Bu instagram klon uygulamasında CoreLocation, Snapkit, Firebase, KingFisher, IQKeyboardManagerSwift kütüphaneleri kullanılmıştır. Kulla

Barış Can Akkaya 2 Oct 20, 2021
A simple app for displaying weather information

WeatherInfo Test App This is a simple app for displaying weather information. Data for the app is stored in MongoDB Atlas in the cloud and syncronised

null 0 Nov 3, 2021
A beautiful, dark-mode enabled weather app

What I create I have made a beautiful, dark-mode enabled weather app. You'll be able to check the weather for the current location based on the GPS da

Olexsii Levchenko 0 Nov 17, 2021