/Trax

A Sample Project to demo the fetch of data from API Source

Primary LanguageSwift

Trax

A Sample Project to demo the fetch of data from API Source

This is a simple app that only fetch the information from the API and display the list and the details using collectionView

Architecture Used

MVC + Coordinator Pattern + Programmatic UI

The Choice of using Coordinator is actually based on my experience on how to architecture the app with minimal used of boilerplate and to solve the navigation flow of the app for the developer to be clear on what will be the next screen to show.

The Main app is actually dissected with these parts

  • Coordinator
    • The flow navigation of the app
  • VC
    • logic controller of the app
  • View
    • The class of the app on where the UI is being designed programmatically

Programmatic UI Rocks!

A Storyboard full of vcs is really slow to load and use, thats why I use it with the creation of UI in my project, the traditional programmatic UI creation is actually confusing and tends to bloat the class file thats why Im using SnapKit for the DSL

Pods Used

SnapKit

  • DSL for Programmatic UI

King Fisher

  • Swift library for downloading and caching images from the web.

Moya

  • Networking abstraction layer that sufficiently encapsulates actually calling Alamofire directly. It should be simple enough that common things are easy, but comprehensive enough that complicated things are also easy.

RealmSwift

  • I used Realm in this project because of the ease of use and I think it is suitable for a small project that doesn't really rely heavily on a complex threading

  • Data Persistence(local storage)

How To Install

  1. Cocoapods needs to be installed first on your machine

  2. Clone the project

  3. run in the terminal

    pod install 
    
  4. go inside the directory and

    open Trax.xcworkspace
    
  5. Build and Run