Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ilyapuchka/asana


https://github.com/ilyapuchka/asana

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

## Installation

After clonning repository run `carthage bootstrap --platform iOS` in its root directory to install dependencies. The only dependency used
is [R.swift](https://github.com/mac-cain13/R.swift). `R.swift` is 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

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

#### Segue manager

Simple helper is used to provide context-aware segue-execution, similar to [SegueManager](https://github.com/tomlokhorst/SegueManager). This allows to simplify passing data between screens when segues are used.

#### Keyboard observer

Keyboard observation is implemented with a simple protocol with default implementations which allows to add this behaviour with 3 lines of code.

#### Generic list view models

Generic protocols are used to facilitate list of messages which ensures more type-safe way of working with table view cells and their view models (also with a help of R.swift autogenerated code).

#### Pagination

Pagination is implemented based on Web Linking standard.