How to use Dependency Injection in SwiftUI | Advanced Learning #16

preview_player
Показать описание
In the last video, we learned how to use Protocols. In this video, we will now take what we learned and implement Dependency Injection into our project using Protocols. By the end of this video you will now only understand what DI is, but also know how to do it.

Once you begin using Dependency Injection in your apps, there is no going back! It becomes extremely important when creating scalable and testable apps.

We will also talk about the downfalls of Singleton's and how Dependency Injection can solve them!

🤙 WELCOME BACK 🤙

Рекомендации по теме
Комментарии
Автор

I found this channel as the best for iOS developers

TechnoBog-ovmp
Автор

After each of your tutorials, I feel like rewriting my entire app! 😭😂

AkbarshahJumanazarov
Автор

Blown Away ! Your tutorials are so rich with information. I have adapted my own logic based on your practices. Very succinct ! TY !

allisondelta
Автор

Amazing! You never fail to teach a hard concept and make it easy. Thank you so much, you make a huge impact with your work :)

candylover
Автор

So awesome! I really appreciate the way you explain things. Been looking for a while for videos that go in depth and really explain things instead of just showing one example. Keep up the good work!

bbongrip
Автор

Brilliant, I had to watch it multiple times but now it make more sense.
Thank you Nick

spradohak
Автор

Great post! About two thirds through the video I am on the edge of my seat thinking what about testing? Please don't wait to talk about that. You came through in the clutch. I realize you are going to expand on that in the future. Don't change a thing.

priceringo
Автор

Thank you very much, the entire last week I tried to learn how to replace my singleton Storageprovider (for Core Data) in an appropriate way with dependency injection for easier testing .... I struggled especially regarding initialization of the ViewModel (as StateObject)... everything I needed to know was in this video! 👍

TheMadG
Автор

The best video out there to understand about Dependency Injection. Thanks!

pranavbellamprasad
Автор

What a minute how to inject a view model to a view, that's why I started watching the whole video. Good stuff BTW.

Денис-жфр
Автор

Excellence tutorials, you are the best teacher.

BSharing
Автор

Wonderful tutorial about dependency injection. Thanks you for your efforts and clear demonstrations. :)

jimmyhuang
Автор

Great video. Are you effectively coupling service to the view model by making the view model responsible for sinking? I think it would be cleaner if the DataService just returned the data and was not part of the combined system.

tomlester
Автор

It's great video!!! amazing~~~
thank you for sharing this topic!!

光莒
Автор

Hi Nick, great content! -- it would be great to see an app from you with Clean Architecture from Uncle Bob using SwiftUI - it would be great to see the ways we can create dependency injection containers to manage them in our apps. Looking forwards to your new content

aybarsacar
Автор

Unrelated to the topic but I'm also learning great explanation skills and methods by watching your videos. I'm gonna steal it for my interviews lol.

kerryferguson
Автор

Hi man, your videos have been very helpful to me.

mylaluna
Автор

You are truly amazing!!!! Now I understand your crypto app code!!!

woozoobro
Автор

So easy to understand explanation. But the main reason im using singeleton is to using it from any class (ie. Network Manager, Socket Manager, Coredata manager). So, how can i share dataService class to other class? Thank you

AdjieSatryo
Автор

Hey Nick! You should do a project using Firebase & Dependency Injections

ashleym