Coder Social home page Coder Social logo

swift-viper-module's People

Contributors

bleedsy avatar grzegorzkrukowski avatar juanpe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swift-viper-module's Issues

Error Swift 4

install.swift:58:16: error: subscripts returning String were obsoleted in Swift 4; explicitly construct a String from subscripted result
return output[output.startIndex ..< lastIndex]

Controller is held by Router?

In my understanding, the Router should hold Presenter only, not Controller.

But in your VIPER framework, the controller is held by Router.

class LoginRouter: LoginWireframeProtocol {
    
    weak var viewController: UIViewController?
    
    static func createModule() -> UIViewController {
        // Change to get view from storyboard if not using progammatic UI
        let view = LoginViewController(nibName: nil, bundle: nil)
        let interactor = LoginInteractor()
        let router = LoginRouter()
        let presenter = LoginPresenter(interface: view, interactor: interactor, router: router)
        
        view.presenter = presenter
        interactor.presenter = presenter
        router.viewController = view
        
        return view
    }
}

error installing with Swift 4

sudo swift install.swift
Password:
install.swift:58:16: error: subscripts returning String were obsoleted in Swift 4; explicitly construct a String from subscripted result
return output[output.startIndex ..< lastIndex]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
String( )

About Xocde9

In Xcode8 ModuleAProtocols.swift file will creat code
“protocol ModuleAWireframeProtocol: class {
}”
but in Xcode9 it will be
“protocol ModuleAProtocolsWireframeProtocol: class {
}”
How do you modify this?

Process and Pipe

Hi Juanpe, this is not an issue. I just came across this repo and wanted to study your code and understand how you decided to come up the code for installation and other files.
I also tried reading about process and pipe on apple documentation on swift but found it to be an abridged version hence couldn't understand your logic.

Please mail me on [email protected].
Thanks :)

Simple example

Hi it would be very nice to have a very simple example using it. i.e. just 2 modules that do nothing but show how to load the root one from the app delegate and load another one from it. I'm new to viper and every source have a way to do it so I'd like to know your way because i'm gonna use your template :)

Can't install ViperModule

Hi i tried to install the viper module with the below line of code in Terminal , but it is throwing an error, can you tell me the process how to install
screen shot 2017-07-30 at 1 10 11 am

Simple thoughts on naming

Hi, I've been testing others viper generator and some use __moduleName__Contracts for the protocol file. I think that nice as this file represent how to interact with the module. Also the protocols name is kinda too generic and could have other uses into projects like the delegate of the module.

Clean folder Structure

it would be nice to create a folder Structure when add files

  • Protocols
    -viewControllers
    -Interactors
    -Presenter
    also add xibs to Base.lproj

Coupling in domain layer

I tested this template some weeks ago and I found the Interactor has a reference to the presenter. Conceptually, I find it wrong. The domain layer should be as decoupled as possible from the presentation and data layer.

The most common approach is making the presentation and domain layers communicate trough callbacks, so the interactor doesn't know to wich presenter is related.

Probably you already know this but just in case I tell you: think in the interactor like a lego piece. You should be able to change the piece you have over it (presenter in this case) without touching a single line.

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.