VIPER Module Template alternatives and similar libraries
Based on the "Other Xcode" category.
Alternatively, view VIPER Module Template alternatives based on common mentions on social networks and blogs.
Synx9.4 0.0 L5 VIPER Module Template VS SynxA command-line tool that reorganizes your Xcode project folder to match your Xcode groups
SBShortcutMenuSimulator3D Touch shortcuts in the Simulator
FinderGo7.0 0.0 L5 VIPER Module Template VS FinderGo🐢 Open terminal quickly from Finder
Swift-VIPER-ModuleXcode template for VIPER Architecture written in Swift 4
Xcode Developer Disk ImagesQuick fix your Xcode with the missing developer disk images. iOS, tvOS, watchOS files available.
ViperC2.6 0.0 VIPER Module Template VS ViperCXcode template for VIPER Architecture for both Objective-C and Swift.
awesome-xcode-scriptsA curated list of useful xcode scripts 📝 .
swift-project-template🍪 Easily generate Swift projects with Cookiecutter
Sample ProjectA starter project for Sample Project in Objective C. Objective C version of https://github.com/xeieshan/SwiftySampleProject
XcodeCodeSnippetsCode snippets for Xcode.
awesome-gitignore-templatesA curated collection of useful gitignore templates for different programming languages while pushing your code to git. 😊 📝
dsnip0.7 0.0 L2 VIPER Module Template VS dsnipTool to generate (native) Xcode code snippets from all protocols/delegate methods of UIKit (UITableView, ...)
Xcode Template ManagerXcode Template Manager is a Swift command line tool that helps you manage your Xcode project templates.
MicrofeaturesArchitectural approach to structure your Xcode projects.
Xcode Keymap for Visual Studio CodeThis extension ports popular Xcode keyboard shortcuts to Visual Studio Code.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of VIPER Module Template or a related project?
Once you've decided to use a VIPER architecture in your app, you should know about the routine. For each screen/module you should create at least 6 files. Imagine that you need to create 10 modules. To avoid this boring work you can use this template which helps you to generate a compete module. It's very useful for me, and I hope it can be useful for you too.
The template generates all the files that you need to create a new VIPER module. All generated code is Swift 4 compatible.
|File Name||Acts As||Description|
||View||UIViewController of your module.|
||Interactor||It's for communication with the Data Layer.|
||Presenter||It's for communication with the View and the Interactor.|
||Router||It's for routing to other modules.|
||ViewControllerXib||If you use xibs, you can use it for layout.|
||Assembly||It's an assembly, to build a module.|
||API||It's an API, a file with all protocols of your module|
How to install
Using script (easy)
Execute this command in the terminal:
sudo swift install.swift
You should see this output message:
✅ VIPER Template successfully installed.
If it's ok, you could see your template in the Xcode.
Go to the Application folder, browse to the Xcode application icon. Right-click on it and choose 'Show Package Contents'. Then, browse to:
Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Architecture and add "VIPER Module.xctemplate" file. Now you can see your template in the Xcode.
Easy to use
VIPER Diagram overview
To get started easier, we’ve prepared a checklist to make sure that everything follows the VIPER’s design principle. We hope, this list will be useful for you as it is for us.
- [ ] Views and view controllers receive user interactions and pass them to presenters for decision making.
- [ ] Presenters contain the view's logic and prepare content for display and reacting to user inputs.
- [ ] Presenters should not know about the existence of all UIViewControllers.
- [ ] Interactors contain business' logic and they should be independent of UI.
What is VIPER?
VIPER is not a framework, but an approach to iOS application architecture, which stands for:
View controller. It is responsible to receive user interactions and pass them to presenters for decision making. To keep the view simple, it shouldn’t contain any view's logic. This is where to define how the view looks like, and nothing beyond this.
The presenter defines the view's logic, e.g. when to show a warning message or highlight a button. It is responsible to prepare content for the view to display. Whenever data is required, the presenter requests data from interactors (but not directly from the model).
The interactor mainly contains business logic, e.g. logging in the user / processing a purchase / sending a friend request. It should be independent of the UI. It only handles requests from the presenter and prepares corresponding data regardless of how the view looks like.
Router defines the routes from one screen to another. In VIPER, the responsibility for Routing is shared between the presenter and the wireframe. When the presenter receives user interactions and decided to navigate to another screen, it will use the wireframe to perform the desired navigation (to which screen and how to navigate). The wireframe can also contain transition animations.
Assembly builds the modules with input params and links all layers. Should connect Presenter with View, Router and Interactor, Interactor with Presenter, View with Presenter. Should setup input data of module and can return module Input if needed.
After using VIPER, I've found it to be very beneficial in many ways. Let’s get back to the list of things we set out to accomplish when architecting our app to see if VIPER addresses them.
- Single responsibility principles applied.
- Easy to iterate on.
- Collaboration friendly.
- Separated out concerns.
Would you like to decide what the next feature will be?
- [ ] Storyboard support
- [ ] Separated iPhone & iPad UIs
- iOS Architecture Patterns
- #8 VIPER to be or not to be?
This is an open source project, so feel free to contribute.
- Open an issue.
*Note that all licence references and agreements mentioned in the VIPER Module Template README section above are relevant to that project's source code only.