Git Product home page Git Product logo

coordinator-example's Introduction

Coordinator Example

This is the project to accompany my blog post on the Coordinator Pattern.

๐Ÿ“ Getting Started

As of 11th November 2016, this project requires Xcode 8.0 (Swift 3.0)

The following commands will download the repository, and open the desired Xcode project.

git clone [email protected]:wtsnz/Coordinator-Example.git
cd Coordinator-Example
open CoordinatorExample.xcodeproj

coordinator-example's People

Contributors

wtsnz 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

coordinator-example's Issues

Memory Leaks

Hi!

What about memory leaks? I just launched the app and moved from orders to add order screen and back to orders screen about 7-10 times, and memory consumption is growed up from 22.8 MB to 24.8 MB (see screenshot).

2017-03-03 15 53 37

Thanks.

SplashVC not updating when new order is created

Due to the default modal presentation style on iOS 13 being .sheetStyle, the viewWillAppear() of the underlaying SplashViewController is not called when the NewOrderCoordinator is dismissed and as a result the label is not updated after you've gone through the flow of creating a new order

Coordinator - some questions only

I am basically just asking here as the blog didn't have a commenting area.

Looking around at Coordinator patterns, I struggle a bit with knowing where to place the actual business logic. In your example, at least I can see that you put it in the Coordinator itself. However this makes me wonder about a few things.

  1. Extensions makes it nice in Swift to separate the logic, but what about Objective C, it feels like using categories would be the equivalent?

  2. If a view controller always needs to be setup with data X from a service. That means the (as in your blog post) logic for errors and actual api calls need to be duplicated in multiple coordinator classes?

  3. Just an observation, there will be a lot of business logic in the coordinator the more steps it have. Which is maybe annoying, I'm considering that maybe these steps would be able to be moved into a "business logic" class (maybe ViewModel type of thing). Wondering if you came across this in the final application. This also ties into the 2nd questions, with duplication.

  4. If you have e.g. a menu and one "flow" consists of only one view controller, would it still have a specific flow class for that one? (not exactly sure about this questions but I'll add it anyway)

Swift 3.0 is no longer supported

If you try to open the project as-is you'll run into a number of warnings as method signatures and constants have changed. If you try to run it you'll run into errors saying that Swift 3.0 is no longer supported, with no easy way to automatically upgrade to Swift 4 or 5 which are the only major versions supported by Xcode 11.

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.