[go: nahoru, domu]

Skip to content

ilyapuchka/Quandoo

Repository files navigation

Installation

After clonning repository run carthage bootstrap --platform iOS in its root directory to install dependencies. The only dependency used is R.swift. It's used to generate various resource identifiers, i.e. for table view cell's reuse identifiers and xib files, to make working with them compile-time type-safe and free of stringly-typing.

Code structure

Code is broken into 3 high level layers:

  • domain layer, contains domain models and services for data queries
  • data access layer, contains concrete implementations of interfaces, used by services for data access i.e. via network or using in-memory cache
  • application, contains all UI related components, broken by user stories

Similar structure is used to organise unit tests suite. Code is written with dependency injection in mind to allow easy unit testing. Constructor injection is used for plain objects and property injection is mostly used for view controllers as the app is also using storyboards.

Application layer components

Application layer is broken by user stories each of which contains of set of similar components:

  • UI components: cells and lists view controller
  • view models: cell view models map domain objects to their presentation models, lists view controller models store the state of the lists and map data (arrays of domain objects) to arrays of cells view models
  • data providers: access services and constructs updated view models for lists
  • flow controller: manages navigation and data flow inside user story, making individual screens decoupled from each other

Additional features

Dynamic fonts support

Support for dynamic fonts is implemented using approach that I've described in this article. This approach allows automatic updates of labels' fonts on trait collections and content size category changes.

Segue manager

Simple helper is used to provide context-aware segue-execution, similar to SegueManager. This allows to simplify passing data between screens when segues are used.

In-memory cache

Naive implementation of in-memory cache is provided, based on decorators for API repositories.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages