How to implement the Coordinator pattern in Swift!

  Рет қаралды 8,789

Vincent Pradeilles

Vincent Pradeilles

Күн бұрын

Пікірлер: 30
@v_pradeilles
@v_pradeilles 2 жыл бұрын
Did you find this explanation useful? Are you planning on using the Coordinator pattern in your apps? Let me know in the comments 🚀
@problem.solver
@problem.solver 2 жыл бұрын
Any reason for calling it coordinator not a router?
@v_pradeilles
@v_pradeilles 2 жыл бұрын
@@problem.solver it got its name mostly thanks to this blog article: khanlou.com/2015/01/the-coordinator/ But indeed you’re right that the idea here is very similar to a router!
@problem.solver
@problem.solver 2 жыл бұрын
Amazing. Thanks.
@PacificAtitude
@PacificAtitude 2 жыл бұрын
Thanks for the thorough explanation, purhaps a futur video making use of childCoordinator array ? It would be intersting to see how coordinators interact with each other.
@aguzman11189
@aguzman11189 2 жыл бұрын
Wow this video came at a great time! I just learned about the Coordinator pattern yesterday from a video Paul Hudson had made :)
@illyakrit7494
@illyakrit7494 8 ай бұрын
Thank you for explanation! Honestly, I don't see any reason to add navigationController to the Coordinator protocol. So, on my opinion, it can be under the hood in the MainCoordinator class. Consumer of the Coordinator protocol don't need to know how the navigation happens and don't need any access to the navigationController
@draganmarkovic7221
@draganmarkovic7221 2 жыл бұрын
Once again you covered great topic in a great way. Keep up the good work! 💪
@sk4tec
@sk4tec 2 жыл бұрын
Hey Vincent, I saw you at SwiftLeeds and I've started watching your videos. I like them because they are small and bite sized. Keep up the good work!
@v_pradeilles
@v_pradeilles 2 жыл бұрын
Awesome to hear that the QR code to the YT channel at the end of my slides was useful 😀
@fernandomarins1596
@fernandomarins1596 2 жыл бұрын
What an excellent explanation, super easy to understand and really helpful! Thank you!
@v_pradeilles
@v_pradeilles 2 жыл бұрын
Thank you, glad to hear you enjoyed the video ☺️
@indiekiduk
@indiekiduk 2 жыл бұрын
check out the responder chain, it's a built in coordinator!
@sami790311
@sami790311 Жыл бұрын
The Coordinator pattern is an okay solution but still tightly couples the viewcontroller with the presentation. For instance, show detail is coupled with always presenting it with push navigation. What if I want to present it modally, with certain animations that could be different for each screen. I think Composition is a better way to approach the navigation problem. Each case can decide how to present the next screen and still not coupled.
@narjesabbaspour4695
@narjesabbaspour4695 2 жыл бұрын
Thank you very much , please add coordinator child and routers too , cuz I found it challenging and has memory leaks some times
@ganeshpawartrekker
@ganeshpawartrekker 2 жыл бұрын
Thanks for this video. I learnt a new thing today. I have one query that what if our project gets bigger? Isn’t coordinator too going to be too big?
@roman3249
@roman3249 2 жыл бұрын
Hi Vincent. I'm a big fan of CleanSwift architecture. Can the Coordinator pattern be applied along with CleanSwift? Or does the Router of CleanSwift play role of the Coordinator?
@ivan180593
@ivan180593 2 жыл бұрын
Could be a good idea to assign the coordinator variable in the view model instead of the view controller? Maybe you can avoid retain cycles if you miss 'weak'
@xVinoz
@xVinoz Жыл бұрын
No cause you are coupling the viewModel to a Navigation Module so theres no relation
@GabrielBrodersen
@GabrielBrodersen 2 жыл бұрын
Will you creative a SwiftUI version?
@v_pradeilles
@v_pradeilles 2 жыл бұрын
I'm taking good note of your suggestion! On SwiftUI the pattern requires a bit more work, so maybe a livestream would be a better format!
@sk4tec
@sk4tec 2 жыл бұрын
Vincent, how can this be (easily) be done in SwiftUI - would love this as a video!
@v_pradeilles
@v_pradeilles 2 жыл бұрын
Great suggestion! The topic is a bit long for a video, however I could do livestream on it in the future 👀
@alexl2512
@alexl2512 9 ай бұрын
Hi Vincent. Can you share the code so I can play with it?
@v_pradeilles
@v_pradeilles 9 ай бұрын
You have the link in the description: gist.github.com/vincent-pradeilles/6ab3720827698712c138059542b0f2ba
@nameless6990
@nameless6990 2 жыл бұрын
Thanks for video awesome 🙏 can we also inject coordinator to movies vc on init method and set it as nil in deinit? what do you think about this approach😕 Also, what if we had a one more page/vc should we have defined a different coordinator for it?
@xVinoz
@xVinoz Жыл бұрын
Everything. can be done if you want but in this case you cant cause you are coupling the viewModel to a Navigation Module so theres no relation
@4_lyrics
@4_lyrics 2 жыл бұрын
The promo code does not work ? I must be doing something not right
@v_pradeilles
@v_pradeilles 2 жыл бұрын
So sorry for this. I’ve let the people at Realm know about the issue, hopefully it should be fixed soon 🙌
@v_pradeilles
@v_pradeilles 2 жыл бұрын
Can you send me a DM on Twitter? (twitter.com/v_pradeilles)
How to implement a Feature Flag in Swift!
9:59
Vincent Pradeilles
Рет қаралды 2,9 М.
How to implement the MVVM architecture in Swift!
8:33
Vincent Pradeilles
Рет қаралды 10 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 22 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 12 МЛН
LIVEWire The Future of Business Messaging - Why RCS
52:58
SignalWire
Рет қаралды 11
How to implement a Mock in Swift!
8:19
Vincent Pradeilles
Рет қаралды 6 М.
Why You Should Use The SwiftUI Coordinator Pattern
18:45
Rebeloper - Rebel Developer
Рет қаралды 16 М.
Build a Harry Potter App in Swift with MVVM + Coordinator! (part 1)
12:25
How to implement Dependency Injection in Swift!
12:56
Vincent Pradeilles
Рет қаралды 13 М.
Here's the ULTIMATE tip to find memory leaks in Xcode!
5:41
Vincent Pradeilles
Рет қаралды 15 М.
MVVM vs MVP: what's the difference? 🤔
9:27
Vincent Pradeilles
Рет қаралды 10 М.