Giter Site home page Giter Site logo

hueinspired's Introduction

HueInspired

Application Description

An application that helps artists discover inspiration from their photo collection. It picks a series of dominant colors from a photo to form a color palette. Users can see the currently trending photos on Flickr transformed as palettes as well as their own photo collection. Under the hood we use leverage Vanilla NSURLSessions with PromiseKit for networking and Core Data for our persistence.

System Overview

The app is designed to be cleanly separated into two parts: Core and Features.

Core defines components of the app which others can rely on. Its consists of the main data model and lower level services like networking and persistence. These are both presented behind protocols to decouple consuming code from concrete implementations. Through abstract factories we provide data layer objects without having client code specify explicit classes.

Features are components designed together to fulfil a user facing requirement. We aim for clean vertical slicing between them with the goal that a change to one feature should NEVER effect another. The components that make up a feature can only depend on each other and core. They have no knowledge of any class or struct created within another feature.

The benefits of this approach:

  • Strong modularity between features, everything can be put behind a feature flag allowing you to turn on and off features as required - great for testing and feature roll out.
  • An explicit understanding of a change's scope. Features can generally be freely refactored, where as changes to core require caution.

Features can interact with each other, but its through core protocols i.e.. view controllers from Feature A will interact with services in feature B via a delegate protocol exposed in core.

Feature Architecture

Individual features are best described as following a passive MVP architecture.

The View Controller is responsible for setting up the views and updating based on model notifications. It delegates user actions to the presenter object via its delegate protocol. The presenter will implement the business logic required and is the place where we can start to depend on other application services. This keeps the ViewControllers clean and as reusable as possible.

NOTE: There isn't always a seperate protocol between the view controller and its presenter as subviews are kept private so that in test it's possible to easily provide mock subclasses that don't rely on loading any UIKit views.

Building

HueInspired depends on PromiseKit and Swinject which can be handled by Carthage

Steps:

  1. Install Carthage ( see https://github.com/Carthage/Carthage )
  2. Clone repository
  3. Run Carthage Bootstrap in repo root

And thats it, open in xcode and run.

hueinspired's People

Contributors

ash30 avatar

Stargazers

Tran Minh Tien avatar JonyJ avatar Daniel Li avatar  avatar

Watchers

 avatar

Forkers

own2pwn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.