TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2015 |
Maintained by Unclaimed.
ErnKit is a framework with a set of helper classes / protocols and a sample project showing how an iOS project can be broken down into isolated and unit testable components. The framework contains protocols for defining a model layer, as well as a set of helpers using these protocols to show data in table views, map views, as well as getting the data from a RESTful service using RestKit.
The framework can be used as a CocoaPod by adding the following in your Podfile:
pod 'ErnKit'
After updating your pods all protocols and helpers can be imported like this:
#import <ErnKit/ERNAction.h>
Clone the project and run the following commands:
brew update
brew install xctool
bundle install
pod install
open ErnKit.xcworkspace
Xcode will now open and the demo app can be executed from here. To start the demo server run the following command:
rake server:start
To stop it:
rake server:stop
Run the unit tests using the following command:
rake test
or simply just:
rake
ErnKit defines a set of protocols that defines the overall structure of an iOS application. By adhering to these protocols a lot of the helper classes in ErnKit can be used to achieve a lot writing very little code. ErnKit itself is not a "stack" but a set of components thus exposes all its abstractions in order to be able to choose a level appropriate for the application.
The model of ErnKit consists of two "parts":
The basic idea is to let the repositories hold the model "state" by holding the data objects. The repositories can be updated at any time, and will notify any interested observer when this happens.
A simple example repository could contain a simple object in memory. More complex repositories represents the state of data from a data base or a RESTful server. Either way, the client of the repositores will look the same.
ErnKit defines a set of repository protocols
For example, a repository client can get an object from an ERNAsyncItemsRepository like this:
id<NSObject> object = [repository itemAtIndex:0];
TBD...
TBD...
TBD...