Giter Club home page Giter Club logo

vipertemplate's Introduction

ViperTemplate

Viper Template makes the process of generation of the Viper's modules easier and faster.

About Viper

VIPER

In looking for a better way to architect an iOS app I ran across the Clean Architecture, as described by Uncle Bob. Clean Architecture divides an app’s logical structure into distinct layers of responsibility. This makes it easier to isolate dependencies (e.g. your database) and to test the interactions at the boundaries between layers.

VIPER is our application of Clean Architecture to iOS apps. The word VIPER is a backronym for View, Interactor, Presenter, Entity and Routing.

VIPER

  • View — responsible for the presentation layer (GUI), for iOS environment think of everything starting with ‘UI’ prefix.

  • Interactor — contains business logic related to the data (Entities) or networking, like creating new instances of entities or fetching them from the server. For those purposes you’ll use some Services and Managers which are not considered as a part of VIPER module but rather an external dependency.

  • Presenter — contains the UI related (but UIKit independent) business logic, invokes methods on the Interactor.

  • Entities — your plain data objects, not the data access layer, because that is a responsibility of the Interactor. Router — responsible for the segues between the VIPER modules.

##Viper files structute

+-- Data
| - {{ModuleName}}Model.swift
+-- Logic
| - {{ModuleName}}Interactor.swift
| - {{ModuleName}}DataManager.swift
+-- Module
| - {{ModuleName}}Module.swift
+-- UI
| +-- Presenter
| | - {{ModuleName}}Presenter.swift
| +-- Routing
| | - {{ModuleName}}Wireframe.swift
| +-- View
| | # Storyboard file
| | +-- Controllers
| | | - {{ModuleName}}ViewController.swift  

How to install

Clone the repository https://github.com/gui-assis/ViperTemplate.git and run installation script make install_templates

How to use

New File -> Viper -> Module alt tag

TODO

  • Generate viper modules templates
  • Create sample application using ViperTemplate
  • Generate viper modules testes templates
  • Generate viper templates using RxSwift

References

vipertemplate's People

Contributors

alanmlira avatar gui-assis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.