title: Protocol Oriented Programming in swift iOS
body: <p>Here is the <code>Protocols</code>:</p>
  <pre><code>protocol WireFrameProtocol{
      // router for all normal cases
      // like showing login page
      
  }
  
  protocol InteractorProtocol{
      var wireFrame: WireFrameProtocol? { get set }
  }
  
  protocol HomeWireFrameProtocol: WireFrameProtocol{
      // home specific routers
  }
  
  protocol HomeInteractorProtocol: InteractorProtocol{
      var wireFrame: HomeWireFrameProtocol? { get set }
  }
  
  class Test: HomeInteractorProtocol{
      var wireFrame: HomeWireFrameProtocol?
  }
  
  extension Test: InteractorProtocol{
      
  }
  </code></pre>
  <p><code>WireFrameProtocol</code> will have all the routing functions. <code>HomeWireFrameProtocol</code> will extend and have some home relating routing only. The test class inherits from <code>HomeInteractorProtocol</code>, which has a var wireFrame: <code>HomeWireFrameProtocol</code>, again <code>HomeWireFrameProtocol</code> is extending <code>WireFrameProtocol</code>.</p>
  <p>Is <code>var wireFrame: HomeWireFrameProtocol</code> also represent <code>var wireFrame: WireFrameProtocol</code>?</p>