A technical assignment for Coolblue

CoolblueApp

This repository contains a technical assignment that is a part of the interviewing process for the position of iOS Developer at Coolblue.

I followed the principles of SOLID to keep the project well organized, testable, and easy to maintain. As the Clean architecture suggests, I abstracted the entire project and divided it into layers:

This is how it looks when the diagram shown above is translated into a project structure. All those layers are created as a framework project and then added to the main target.

CoreUI

  • Responsible for containing all UI components (modified to meet design requirements)

Core

  • All core extensions, methods are defined here. This layer can easily be used for another project just by adding it as a framework.

Data

  • Responsible for containing base api constants, endpoint definitions with MoyaProvider and pure response objects

Domain

  • Here the Data/response models are adapted to the business logic. Requests are facilitated thanks to repository classes.

Design pattern:
Since this is a single-screen application, I preferred the MVVM design pattern.


Technologies used:

  1. RxSwift used for:
  • managing requests in Data layer
  • handling UI events etc. UISearchBar
  • handling base view states (success, error, loading)
  1. Moya library used for api requests. Although there was no need for aysnc network calls for this project, Moya, with its TargetType protocol, provides cleaner and well-structured code to store endpoint data.

Tests:

  • Even though I haven’t written enough tests, the whole project is completely testable, since all layers are being isolated by interfaces, as suggested by the SOLID principles.

Prerequisites:

  • iOS 13
  • Swift 5

Installing:

  • The project uses Cocoapods for dependency management. After pod install, just open CoolblueApp.xcworkspace, select the App target and hopefully run it ?

GitHub

View Github