Latest 1.5.2
Homepage https://github.com/congncif/FIDataFlowArchitectureObjC
License [iF] Solution
Platforms ios 7.0, requires ARC
Dependencies ReactiveCocoa, JSONModel
Frameworks UIKit
Authors

FIDataFlowArchitecture

[![CI Status](http://img.shields.io/travis/NGUYEN CHI CONG/FIDataFlowArchitecture.svg?style=flat)](https://travis-ci.org/NGUYEN CHI CONG/FIDataFlowArchitecture)
Version
License
Platform

FIDataFlow sequence

Getting started

A Flow is a task, it start from fetching data, transforming data & finally refreshing UI if needed.
In FIDataFlow, a IntegrateController will hold processing & start a serial flows.
IntegrateController include LogicController for fetching data, pre-processing data and DataController for transforming data, that is sent from LogicController.

When a flow is started, these blocks of IntegrateController are performed:

  • start:
  • next:
  • end:
  • error:
  • completion:

    (See more in code comments)>

To implement your flow, custom Logic&Data Controller.

  • to fetch data, override method:
    prepareSignalWithParameters:completion:compeltion
  • to transform data, override method:
    tranformDataIfNeed:error:

    By default, base logic controller will pre-process data & data controller will transform data to FIBaseModel (based from JSONModel)
    If your returned data is kind of JSON, you only define return model as FIBaseModel & override this method of DataController like:

    - (NSString*)classNameForReturnData{ return @"YourJSONModelClassName"; }

    Magically, you will receive return data as an object of your model class.

For advanced:

setup runningType for IntegrateController

  • FIFlowRunningTypeDefault: start asynchronous
  • FIFlowRunningTypeOnly: start only flow, wait finish to start new flow
  • FIFlowRunningTypeLastest: start serial flows, lastest flow will be started
  • FIFlowRunningTypeQueue: start serial flows, before started all flows are added to queue & start flow by flow, finish previous flow -> start next flow

More features: multiple logics in FIIntegrateController, transform data, …. -> Contact me!

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

FIDataFlowArchitecture is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "FIDataFlowArchitectureNew"

Author

NGUYEN CHI CONG, [email protected]

License

FIDataFlowArchitecture is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "FIDataFlowArchitectureObjC",
    "version": "1.5.2",
    "summary": "A structure to build a data flow of application.",
    "description": "Easy to create a clear architecture application with FIDataFlowArchitectureNew. I think you will gradually love it.",
    "homepage": "https://github.com/congncif/FIDataFlowArchitectureObjC",
    "license": "[iF] Solution",
    "authors": {
        "NGUYEN CHI CONG": "[email protected]"
    },
    "source": {
        "git": "https://github.com/congncif/FIDataFlowArchitectureObjC.git",
        "tag": "1.5.2"
    },
    "social_media_url": "https://twitter.com/congncif",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "frameworks": "UIKit",
    "dependencies": {
        "ReactiveCocoa": [
            "2.5"
        ],
        "JSONModel": [
            "~> 1.1"
        ]
    },
    "ios": {
        "vendored_frameworks": "Pod/FIDataFlowArchitectureNew.framework"
    }
}

Pin It on Pinterest

Share This