SherifKamalSalem / MTMsTask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetYourGuideTask

GetYourGuideTask is an iOS application built as take-home assessment at GetYourGuide. Built Using MVVM and Clean Architecture concepts

Run Requirements

  • Xcode 10
  • Swift 4.2

Installation

Dependencies in this project are provided via Cocoapods. Please install all dependecies with

pod install

High Level Layers

  • Domain Layer = Entities + Use Cases + Repositories Interfaces
  • Data Repositories Layer = Repositories Implementations + API (Network) + Persistence DB
  • Presentation Layer (MVVM) = ViewModels + Views

Architecture concepts used here

func fill(with viewModel: ReviewsListItemViewModel) {
        authorImage.kf.indicatorType = .activity
        authorImage.makeRounded()
        authorImage.kf.indicator?.startAnimatingView()
        authorImage.kf.setImage(with: viewModel.authorImageUrl,
                                placeholder: UIImage(systemName: "person.crop.circle"),
                                options: nil, progressBlock: nil) { [weak self] _ in
            guard let self = self else { return }
            self.authorImage.kf.indicator?.stopAnimatingView()
        }
    }

Includes

  • Unit Tests for Use Cases(Domain Layer) (Tested implicitly), ViewModels(Presentation Layer), NetworkService(Infrastructure Layer)
  • UIStackView in Detail view
  • Code styling standards
  • Pagination

Optimisations/Additions

Optimisations Why I didn't prioritise it.
Support offline mode by caching Reviews pages return from API using Core Data. Excellent optimization but lower priority relative to other requirements.
Using RxSwift as binding machanism While RxSwift is perfect compatibility with MVVM I prefered to use simple combination of Closure and didSet to avoid third-party dependencies especially for the scale of this assessement whoever I am used to implement MVVM with RxSwift.
Modularity Modularity is high priority especially for large scale projects but it's hard to be implemented from the beginning when the big picture isn't fully completed, for more details about modular architecture watch this https://www.youtube.com/watch?v=QzM3lsFewN4
Setup CI/CD using Fastlane Lower priority relative to other requirements.
Add UI Testing Lower priority relative to other requirements.
Add Sorting feature Optional requirement and no time to implement.
Add custom transition animations Lower priority relative to other requirements.
Improve UI design Lower priority relative to other requirements.

Tools

  • Kingfisher powerful, pure-Swift library for downloading and caching images from the web.
  • SwiftLint tool to enforce Swift style and conventions.
  • Cosmos tool for shows a star rating and takes rating input from the user.

Any questions?

About


Languages

Language:Swift 98.8%Language:Ruby 1.2%