Impressed by your concise and clear-cut codes as well as your step-by-step teaching style which in all make your tutorial easy to follow and understand even on advanced topics for beginners. Thanks for your another awesome tutorial.
You really deserve more followers! I'm following a good handful of channels like yours and this is one of the absolute best. Honestly🙏 Please keep doing what you're doing. The intermediate level is great. Just, thanks again 🙌🏻
Video was invaluable to getting me started. I think I speak for a lot of newer developers that being more descriptive of methods will help us understand better. Also being more descriptive of the logic flow. Otherwise thanks
This tutorial is just what i needed to get over the learner hump and up to the next level. it is still a bit advanced for me however it goes a lot further than most other tutorials I've seen and I feel it won't be long now before I start get the hang of this. Looking forward to see what other tutorials you have. Thanks a lot.
Thank you for all your hard work on this! Hope you would make second part of this video. Add image in studyCard. User can choose image from gallery. Thanks again 👍🏿
You’re welcome! I‘m currently planning on creating a video on the general concept of using UIKit elements such as the UIImagePicker in SwiftUI and will then extend this video with it. Thanks again for your feedback :)
U awesome! Thanks for your work.)) The only thing that I personally am missing is links to your repository with this project. As a junior, I would like to be able to once again examine everything from all sides)))
First, I want to thank you for this wonderful set of tutorials. For the question, it looks like the SnapShotListener in CardRepository always returns all documents on the studyCards collection, and the data remains in memory for all cards, even if the ViewCard is not visible (e.g already passed or scrolled out). In the "vanilla" MVVM pattern, when CardViews are not visible, they get destroyed and thus release their corresponding CardViewModel(s). In this MVVM + Repository pattern, it seems like the CardViewModel(s) are owned by CardListViewModel. How do you scale MVVM+Repository pattern to large sets and take advantage of View lifecycle and lazy loading?
This source code seems to fail in Xcode 12.5 Beta 3 - in the CardRespository,swift, in the @Published line, it says it can't find StudyCard in scope. Reverting to 11.5 makes Xcode happy. Any idea what 12.5 might be cranky about?
Thanks Sean! You can have both in your project. You will often notice that the repository only knows how to write, read and update stuff from/to a data store (firebase etc.). But the Service can contain coordination and business logic too such as get the studycards from the repository and sort them alphabetically before returning them to the caller of the service. Services can also communicate with multiple repositories to provide its data. In general it is always a good idea to abstract the data access layer out of the service layer and put into a repository.
Great video! What’s your opinion on AWS Amplify? Seems like they have shipped a lot of features recently. I know it’s possible to write an essay on this, but any response is cool :)
Thanks Drayton, good to hear from you btw. :) Regarding your question, I'm a bit biased here because I've been using firebase for a long time now haha! But nevertheless they have both their pros and cons. Firebase is for sure the easier one for developers to get started. I use it quite often for my smaller app projects. However, once you start defining your app backend requirements you will see which one fits better to your project. For example if your app backend has to store complex relationships between your models in your database, a NoSQL solution (Firestore) would probably reach its limitations at some point and Amazon DynamoDB would be a better choice. There are also many other factors to consider such as authentication, cloud functions, pricing etc.. But its definitely a huge topic which I will try to cover in a separate video.
Hey there! Thank you so much for your videos. They are easy to follow and extremely helpful. Is there a chance you have worked with the Firebase Emulators Suite? I couldn’t find any video tutorials showing the proper way to set it up. It would be great if you can show this procedure step-by-step in one of your tutorials. Thank you one more time!
Wish I could have access to your source - I have 2 Swift errors and trying to find differences b/t my and your code is more than challenging on a video. So I can not compile & run the demo. Would be wonderful if you would share it!
Pleaseee make video about composable architecture. Everyone says that it's the best architecture for SwiftUI. I'd be really happy to listen it from you
This came right on time. Thanks! Though, how would you talk to another ObservableObject class like AuthManager where it contains your current user and retrieve a document whose ID is the uid. Reading the document is fine but I'm trying to figure out how classes such as Auth and Subscription can communicate with each other easily. Singleton maybe? Based on some people, singleton is not recommended.
Hi Dara, you're welcome! Regarding your question, I'm not sure what you mean by subscription in this context, so maybe you can elaborate that :) but in general singletons are not bad, they are just easy to misuse. Apple uses them a lot in places where they want to make sure that there is always only one instance of it available: "URLSession.shared", "UserDefaults.standard" etc. In your case I assume there will be only one instance of the AuthManager at any time, so it should be fine.
Hi man, awesome, but how you manage when you have a map of object for example: struct Product: Identifiable, Codable { @DocumentID var id: String? = UUID().uuidString var name: String = "" var price: Double = 0 var family: String = "" var image: String = "" var color: String? = "" var amount: Int = 0 var options: [Option]? = [] } struct Option: Identifiable, Codable, Hashable { var id: UUID? = UUID() var title: String = "" var required: Bool = false var options: [String] = [] var selected: String = "" } When I try to modify my the product options I get error 'Cannot assign to property: 'option' is a 'let' constant' How I can manage that?
Impressed by your concise and clear-cut codes as well as your step-by-step teaching style which in all make your tutorial easy to follow and understand even on advanced topics for beginners. Thanks for your another awesome tutorial.
Wow, thanks for your feedback! Always good to hear that beginners can also follow along on the advanced topics 👍
You really deserve more followers! I'm following a good handful of channels like yours and this is one of the absolute best. Honestly🙏 Please keep doing what you're doing. The intermediate level is great. Just, thanks again 🙌🏻
Thanks Michael, glad you find these videos useful! Appreciate the support and there will be definitely more videos coming soon 👍
Video was invaluable to getting me started. I think I speak for a lot of newer developers that being more descriptive of methods will help us understand better. Also being more descriptive of the logic flow. Otherwise thanks
This tutorial is just what i needed to get over the learner hump and up to the next level. it is still a bit advanced for me however it goes a lot further than most other tutorials I've seen and I feel it won't be long now before I start get the hang of this. Looking forward to see what other tutorials you have. Thanks a lot.
Thank you for all your hard work on this! Hope you would make second part of this video. Add image in studyCard. User can choose image from gallery. Thanks again 👍🏿
You’re welcome! I‘m currently planning on creating a video on the general concept of using UIKit elements such as the UIImagePicker in SwiftUI and will then extend this video with it. Thanks again for your feedback :)
U awesome! Thanks for your work.))
The only thing that I personally am missing is links to your repository with this project. As a junior, I would like to be able to once again examine everything from all sides)))
A really clean and powerful work. Thank you!
Thank you, abdou er! Appreciate the support.
Thank you. Already subscribed! :D
What's the use of FirebaseFirestoreSwift, I'm getting many issues trying to install it
one of the best explanation
Can you explain, why did you add the remove func to the View? Isn't that "logic" that should be in the ViewModel?
Eagerly waiting for this. Thanks for the efforts 🙏🏻🙏🏻🙏🏻
Is there a Github Repo for this tutorial?
First, I want to thank you for this wonderful set of tutorials. For the question, it looks like the SnapShotListener in CardRepository always returns all documents on the studyCards collection, and the data remains in memory for all cards, even if the ViewCard is not visible (e.g already passed or scrolled out). In the "vanilla" MVVM pattern, when CardViews are not visible, they get destroyed and thus release their corresponding CardViewModel(s). In this MVVM + Repository pattern, it seems like the CardViewModel(s) are owned by CardListViewModel. How do you scale MVVM+Repository pattern to large sets and take advantage of View lifecycle and lazy loading?
figure it out yet?
This source code seems to fail in Xcode 12.5 Beta 3 - in the CardRespository,swift, in the @Published line, it says it can't find StudyCard in scope. Reverting to 11.5 makes Xcode happy. Any idea what 12.5 might be cranky about?
Excellent tutorial!
Thanks. Great if you do a video on 'Repository vs Service!'
Thanks Sean! You can have both in your project. You will often notice that the repository only knows how to write, read and update stuff from/to a data store (firebase etc.). But the Service can contain coordination and business logic too such as get the studycards from the repository and sort them alphabetically before returning them to the caller of the service. Services can also communicate with multiple repositories to provide its data. In general it is always a good idea to abstract the data access layer out of the service layer and put into a repository.
Great video! What’s your opinion on AWS Amplify? Seems like they have shipped a lot of features recently. I know it’s possible to write an essay on this, but any response is cool :)
Thanks Drayton, good to hear from you btw. :) Regarding your question, I'm a bit biased here because I've been using firebase for a long time now haha! But nevertheless they have both their pros and cons. Firebase is for sure the easier one for developers to get started. I use it quite often for my smaller app projects. However, once you start defining your app backend requirements you will see which one fits better to your project. For example if your app backend has to store complex relationships between your models in your database, a NoSQL solution (Firestore) would probably reach its limitations at some point and Amazon DynamoDB would be a better choice. There are also many other factors to consider such as authentication, cloud functions, pricing etc.. But its definitely a huge topic which I will try to cover in a separate video.
Hey there! Thank you so much for your videos. They are easy to follow and extremely helpful. Is there a chance you have worked with the Firebase Emulators Suite? I couldn’t find any video tutorials showing the proper way to set it up. It would be great if you can show this procedure step-by-step in one of your tutorials. Thank you one more time!
Wish I could have access to your source - I have 2 Swift errors and trying to find differences b/t my and your code is more than challenging on a video. So I can not compile & run the demo. Would be wonderful if you would share it!
Спасибо! Очень здорово!
Thank You!
"Models > CardViewModel.swift" is Model? or ViewModel?
Hi Hyunsung, good catch! It should belong to the the "ViewModels" group :)
Pleaseee make video about composable architecture. Everyone says that it's the best architecture for SwiftUI. I'd be really happy to listen it from you
Thanks for your suggestion, I will consider it for a future video :)
Why does cardRepository have the @Published property wrapper in the CardListViewModel ?
that is not necessary since he is not using the cardRepository in any SwiftUI view. It works but makes it harder to understand with the @Published.
Can you share link to tutorial project?
This came right on time. Thanks! Though, how would you talk to another ObservableObject class like AuthManager where it contains your current user and retrieve a document whose ID is the uid. Reading the document is fine but I'm trying to figure out how classes such as Auth and Subscription can communicate with each other easily. Singleton maybe? Based on some people, singleton is not recommended.
Hi Dara, you're welcome! Regarding your question, I'm not sure what you mean by subscription in this context, so maybe you can elaborate that :) but in general singletons are not bad, they are just easy to misuse. Apple uses them a lot in places where they want to make sure that there is always only one instance of it available: "URLSession.shared", "UserDefaults.standard" etc. In your case I assume there will be only one instance of the AuthManager at any time, so it should be fine.
@@BeyondOnesAndZeros I meant SubscriptionManager where I fetch the subscription status from the server. Thanks for easing my singleton concern!
The video suddenly drops some teaching at 33:27!
What is the @ on the DocumentID var in the VM?
Firebase variable.
Hi man, awesome, but how you manage when you have a map of object for example:
struct Product: Identifiable, Codable {
@DocumentID var id: String? = UUID().uuidString
var name: String = ""
var price: Double = 0
var family: String = ""
var image: String = ""
var color: String? = ""
var amount: Int = 0
var options: [Option]? = []
}
struct Option: Identifiable, Codable, Hashable {
var id: UUID? = UUID()
var title: String = ""
var required: Bool = false
var options: [String] = []
var selected: String = ""
}
When I try to modify my the product options I get error 'Cannot assign to property: 'option' is a 'let' constant'
How I can manage that?
have you figured it out?
yess!!! 😍😍😍
Я от Нины Алексеевны кста)0)
Oops - seems 11.5 fails also but for other reasons. But 12.0 seems to be happy. Just a curiosity ...
Not very professional however it is good for the fish programmers.
Great tutorial!