GithubHelp home page GithubHelp logo

ios-coordinator-pattern-example's Introduction

Simple iOS Coordinator Pattern Example

This code represent an example to help me to deliver my talk regarding to Coordinator Pattern.

Why using coordinator pattern? (according to my own experience)

  • Separation of concern, because VC doing many things
  • Hard to change the flow because navigation flows are handled on VC
  • Hard to test the flow correctness
  • VC tend to hold unneccessary dependency during passing data in certain flow

So, the purpose of coordinator is...

  • Handle the navigation flows
  • Manage the view controllers in one flow
  • Manage data that can be used on other controllers in one flow

How VC and coordinator communicates

  • Using delegate
  • Using closure / blocks

There's still available for improvements, such as

  • Isolating UINavigationController specific things into one another layer for better testability
  • View Controllers & Coordinator creation using factory & also abstracting them to adhere Open/Closed principle

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.