Latest 0.1.1
Homepage https://github.com/dsay/Repository
License MIT
Platforms ios 10.0
Dependencies RealmSwift, PromiseKit/CorePromise, AlamofireImage, ObjectMapper, AlamofireObjectMapper, ObjectMapper+Realm, ObjectMapperAdditions/Realm
Frameworks UIKit
Authors

Repository

Description

The simplest approach, especially with an existing system, is to create a new Repository implementation for each business object you need to store to or retrieve from your persistence layer. Further, you should only implement the specific methods you are calling in your application. Avoid the trap of creating a “standard” repository class, base class, or default interface that you must implement for all repositories. Yes, if you need to have an Update or a Delete method, you should strive to make its interface consistent (does Delete take an ID, or does it take the object itself?), but don’t implement a Delete method on your LookupTableRepository that you’re only ever going to be calling List() on. The biggest benefit of this approach is YAGNI – you won’t waste any time implementing methods that never get called.

Requirements

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.1.0+ is required to build.

To integrate Repository into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
pod 'Repository', :git => 'https://github.com/dsay/Repository.git', :tag => '0.1.1'
end

Then, run the following command:

$ pod install

Demo App

Author

Dima Sai , [email protected]

License

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

Latest podspec

{
    "name": "SwiftRepository",
    "version": "0.1.1",
    "summary": "Essentially, provides an abstraction of data access",
    "description": "The simplest approach, especially with an existing system, is to create a new Repository implementation for each business object you need to store to or retrieve from your persistence layer. Further, you should only implement the specific methods you are calling in your application. Avoid the trap of creating a u201cstandardu201d repository class, base class, or default interface that you must implement for all repositories. Yes, if you need to have an Update or a Delete method, you should strive to make its interface consistent (does Delete take an ID, or does it take the object itself?), but donu2019t implement a Delete method on your LookupTableRepository that youu2019re only ever going to be calling List() on. The biggest benefit of this approach is YAGNI u2013 you wonu2019t waste any time implementing methods that never get called.",
    "homepage": "https://github.com/dsay/Repository",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dima Sai": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dsay/Repository.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "Repository/**/*",
    "swift_version": "4.2",
    "frameworks": "UIKit",
    "dependencies": {
        "RealmSwift": [],
        "PromiseKit/CorePromise": [],
        "AlamofireImage": [],
        "ObjectMapper": [],
        "AlamofireObjectMapper": [],
        "ObjectMapper+Realm": [],
        "ObjectMapperAdditions/Realm": []
    }
}

Pin It on Pinterest

Share This