Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Literoute | 90 | 3 years ago | 1 | April 15, 2020 | 7 | mit | Swift | |||
LiteRoute is easy transition for your app. Written on Swift 4 | ||||||||||
Vmc2 | 17 | 6 years ago | mit | Swift | ||||||
Evolution of MVC on iOS with examples. MVC, VIPER, MVVM, MVP | ||||||||||
Cobra | 10 | 2 | 5 years ago | 5 | October 22, 2018 | apache-2.0 | Swift | |||
Cobra is a lightweight application routing framework written in Swift | ||||||||||
Wireframes | 6 | 5 years ago | 3 | mit | Swift | |||||
Routing in an iOS app abstracted | ||||||||||
Vipers Wireframe Protocol | 3 | 7 years ago | mit | Swift | ||||||
The wireframe is the powerful thing that wires the view controllers in your app together. It takes an NSURL and some parameters, talks to the components that create your view controllers (the ControllerProvider) which create the view controller connected to this URL, and gives it to those components which are responsible for presenting your controller (the ControllerRoutingPresenter). | ||||||||||
Todo | 3 | 8 months ago | Swift | |||||||
This Todo app is a full reference implementation for VIPER. It demonstrates many of the tasks you would do on a daily basis. |
Cobra is a lightweight application routing framework written in Swift that provides modular abstractions to your code base. Cobra is built on top of Swinject, a lightweight dependency injection framework.
Cobra works best when used with Gorgon, an application event distribution framework written in Swift, and Moccasin, Xcode templates that provides VIPER-based scaffolding.
See Boa, a sample app written in Swift, for details.
Cobra is available through CocoaPods or Carthage.
To install Cobra with CocoaPods, add the following lines to your Podfile
.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Cobra', '~> 3.0'
Then run pod install
command. For details of the installation and usage of CocoaPods, visit its official website.
To install Cobra with Carthage, add the following line to your Cartfile
.
github "locationlabs/Cobra" ~> 3.0
Then run carthage update
. For details of the installation and usage of Carthage, visit its project page.
Cobra is a VIPER-based application routing framework for building modular iOS applications. Using Cobra, an application is broken up into VIPER modules, each module consisting of the following types: View, Interactor, Presenter, Router, Data Manager, Styler, Assembler, Storyboard and Feature. Each of these types own a single responsibility, i.e. the View is responsible for view logic, the Interactor is responsible for business logic, etc. Dividing application logic into distinct layers of responsibility this way enables developers to isolate dependencies, test interactions, and generally write clear and consistent code.
Cobra works best when used with Moccasin, which leverages Xcode templates to generate VIPER-based scaffolding.
Component frameworks and VIPER modules are bootstrapped like so:
// Create a Cobra configuration for assembling the components and properties for the application
let config = Config(components: [
Component<DaemonAssembly>(),
Component<ServiceAssembly>()
], properties: [
JsonProperty(name: "properties")
])
// Provide the configuration to the Cobra application
try! App.sharedInstance.config(config)
// Register Feature to Module proxies for the Cobra application routes
App.sharedInstance.registerProxies([
Proxy<AddCityFeatureType>(modules: Module<AddCityAssembly>()),
Proxy<WeatherFeatureType>(modules: Module<WeatherAssembly>()),
Proxy<WeatherDetailFeatureType>(modules: Module<WeatherDetailAssembly>())
])
// Route to our first feature in our application window
try! App.sharedInstance.feature(WeatherFeatureType.self).showInWindow(window!)
return true
}