synesthesia-it / Boomerang

Swift micro-framework for MVVM (Model-View-ViewModel) native applications.
MIT License
36 stars 10 forks source link
mvvm pattern rxswift viewmodel

Boomerang

Boomerang is a library for MVVM in Swift applications

Due to the lack of ViewModel concepts in UIKit, Boomerang defines a set of scenarios through protocols and shares a common, reusable way to build screens in the app.

On top of that, it provides a set of extensions for common components like UICollectionView, UITableView, UIViewController so that they can become compatible with a ViewModel.

Used with RxSwift (and RxDataSources) bindings (not required, but highly recommended), Boomerang can really improve project workflow and help keeping things simple and light.

Key Features / TLDR

Installation

Boomerang is available through Cocoapods.

Add this to your Podfile

pod 'Boomerang'

To use RxSwift integration, use

pod 'RxBoomerang`

We used to integrate Rx extensions with pod Boomerang/RxSwift This is still available at the moment but differs in how Rx extensions needs to be integrated in your project files: in this old scenario, import RxBoomerang is not needed in every file with Boomerang extensions because import is handled by cocoapods; however, we believe that package managers should be interchangeable as much as possible; therefore, we suggest to use the new separated pod as it's more "futureproof".

Contributing

To integrate new features in the library, you can open the Package.swift file and edit the source folder.

Examples

You can find some integration examples in the Examples folder.

We use XcodeGen to easily maintain xcodeproj files.

To install XcodeGen it, run brew install xcodegen

To setup each example project, run xcodegen in each folder.

Table of contents (WIP)