Latest 0.1.0
Homepage https://github.com/thepost/FUMVC
License MIT
Platforms ios 11.0
Frameworks CoreData
Authors

iOS Fundamentals of MVC.

Pod
Swift: 4.1.x
Platform
License: MIT

Description

The purpose of FUMVC is to provide common architectural abstractions in a very lean way, based on a clean and minimal MVC pattern.

Its implementation is embedded in the Fundamentals of MVC, and is intended to demonstrate how elegant MVC can be despite the FU animosity towards it, hence FUMVC :wink:

Related references on FUMVC inclue the Lotus MVC pattern.

The initial implementation focuses on a Core Data abstraction, specifically a Model Controller using generics to reduce boilerplate code in Core Data CRUD operations.

Requirements

iOS 11.0 or later, for NSPersistentContainer support.

How to Install

FUMVC is available through CocoaPods. Install by adding the following to the Podfile:

target "MyApp" do
  pod "FUMVC", "~> 0.1.0"
end

How to Use

FUMVC currently has a ModelController to be used as an initial abstraction over Core Data.

You can use the ModelController‘s convenience initalizer to reference the data model name like the following:

let modelController = ModelController(modelName: "Model")

Then say for example you have an NSManagedObject subclass called Recipe, create a new object like the following:

let newRecipe = modelController.add(Recipe.self)        
newRecipe?.name = "Pizza"

There are other methods for:

add(type:)
total(type:)
fetch(type: predicate: sort:)
save()
delete(by objectID:)
delete(type: predicate:)

Example

There is a small example with some unit tests. To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Mike Post

License

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

Latest podspec

{
    "name": "FUMVC",
    "version": "0.1.0",
    "summary": "iOS Fundamentals of MVC",
    "swift_version": "4.2",
    "description": "A library to demonstrate and provide common architectural abstractions in a very lean way. Initially focuses on Core Data, specifically a Model Controller using generics to reduce boilerplate code in Core Data CRUD operations.",
    "homepage": "https://github.com/thepost/FUMVC",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Mike Post": "[email protected]"
    },
    "source": {
        "git": "https://github.com/thepost/FUMVC.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "11.0"
    },
    "source_files": "FUMVC/Classes/**/*",
    "frameworks": "CoreData"
}

Pin It on Pinterest

Share This