Thank you. I've done MVVM in C# and was looking for how to do swift MVVM. Yours was the first to: - talk about how to do binding in Swift - point out that VIew = View and ViewController - point out that Model = data and business logic Made my day. thanks again!
This guy gives me vibe of Jessy Pinkman from Breaking Bad. This video had best explaination about MVVM architecture and difference between weak and unowned was precisely correct
It makes all sense following up how other programmers use the MVVM design pattern. But in reality, it doesn't cover most of the problems we face and if you ain't sure on how to use it you might end up with unnecessary boilerplate code that solves a minor issue.
This makes so much sense. It's surprisingly difficult to find tutorials and lessons surrounding this stuff. Why is that? I wish I could see some more examples in practice to really get a good understanding of this design pattern and its use with swift. Any suggestions?
You can find bunch of tutorials on MVVM. Cocoacasts has some, Pluralsight or Udemy. Even RUclips has tutorials. There might be little information on MVVM Swift, but there is a lot of tutorials on MVVM in general, fundamentals. So, just learn the fundamentals and apply it in Swift
Cause everybody doing thos mvc/mvp/mvvm differently. Try to google mvc design images on google, even such a simple concept have different implementation.
20:30 at last someone asks this question! I'm 24 hours into learning MVVM from an MVP background, and I can't see any differences...yet (except for terminology).
Awesome stuff. It's a little too advanced for me at the moment, but I'm picking things up here and there. This 'boxing' stuff seems incredibly powerful and you don't even need a framework.
Great presentation! Although I expected a little more examples of setting up the architecture (screen presentation, binding controllers with viewModels and so on), I still learned a lot of useful technics from it.
This boxing method is incredible! So much easier than any other reactive framework I've used. However, I've reworked the Box class to have `listeners:[Listener?]` rather than `listener:Listener?`, to be able to observe the value from multiple places - and it's working! But now I'm struggling with removing the listeners, because - even though I want the ability to have multiple observers, I still need a way to remove a specific observer (not all at once). I need the `bind()`-function to return a `Disposable` object which I later can use to remove that specific binding (e.g in a reusable cell). How can I do this?
Stian Flatby May I ask you how to do that? I want to observe the same property from multiple places. I don’t understand about this listener:[Listener?] value’s didSet and bind func how to replace and make it’s work? Please help me ,thanks a lot
Sure! Instead of "var listener:Listener?" change it to "var listeners:[Listener?]", and in the "didSet" change from "listener?(value)" to "listeners.foreach({$0?(value)})", and in "bind", change from "self.listener = listener; listener?(value)" to "self.listeners.append(listener); listener?(value)". But be careful, since you now store all listeners and never remove them - the listeners will stay alive as long as the observed object is alive. For tableViewCells, which gets reused, this is really really bad, so you need a way to remove the listeners when you don't want them anymore (e.g if the view you're listening from is removed or reused). That's what I needed help with, but I asked on stackOverflow and got an answer. You should take a look! stackoverflow.com/a/50136414/1203228
What about using Dictionary instead of array, where key is your class object that creates listener and just create function to unbind listener for specific owner object passing
The way you used binding to bind view model's access code with label, should we also use binding to bind model's properties with view model properties right ? I mean how a model is going to notify view model that it has changed ?
Nice tut my friend...:) I am still new to Swift world and my question my sound a bit naive but can you help me understand once the login is successful how it is taking us to a new viewcontroller as i hvn't found any piece of code assigned to loginSuccess closure type variable
But all your logic isn't quite in the viewmodel yet :D. It still decides whether to display an error message, or login. You could move that to the vm too.
Thank you. I've done MVVM in C# and was looking for how to do swift MVVM.
Yours was the first to:
- talk about how to do binding in Swift
- point out that VIew = View and ViewController
- point out that Model = data and business logic
Made my day. thanks again!
Bill Scanlon Imagine making a framework like PRISM for Swift
Almost 2022 and still the best MVVM implementation video.
One of the best MVVM tutorials I have seen so far...👍🏽
This guy gives me vibe of Jessy Pinkman from Breaking Bad. This video had best explaination about MVVM architecture and difference between weak and unowned was precisely correct
One of the best MVVM tutorial. Thanks 👍
the best mvvm tutorial i have ever seen
It makes all sense following up how other programmers use the MVVM design pattern. But in reality, it doesn't cover most of the problems we face and if you ain't sure on how to use it you might end up with unnecessary boilerplate code that solves a minor issue.
This is one of the best videos ever. The explanation is very simple and yet in depth :)
This makes so much sense. It's surprisingly difficult to find tutorials and lessons surrounding this stuff. Why is that? I wish I could see some more examples in practice to really get a good understanding of this design pattern and its use with swift. Any suggestions?
You can find bunch of tutorials on MVVM. Cocoacasts has some, Pluralsight or Udemy. Even RUclips has tutorials. There might be little information on MVVM Swift, but there is a lot of tutorials on MVVM in general, fundamentals. So, just learn the fundamentals and apply it in Swift
He doesn’t do enough explaining of why he does every little thing he’s doing imo
about67turtles he’s cool though. He’s pretty good
Cause everybody doing thos mvc/mvp/mvvm differently. Try to google mvc design images on google, even such a simple concept have different implementation.
20:30 at last someone asks this question! I'm 24 hours into learning MVVM from an MVP background, and I can't see any differences...yet (except for terminology).
Hey I was there!!!
Awesome stuff. It's a little too advanced for me at the moment, but I'm picking things up here and there. This 'boxing' stuff seems incredibly powerful and you don't even need a framework.
Great presentation! Although I expected a little more examples of setting up the architecture (screen presentation, binding controllers with viewModels and so on), I still learned a lot of useful technics from it.
Nice, there are not many examples of MVVM, that don't include adding some reactive framework
Great talk. I find it amazing that Nicholas Cage was there asking a question at 49:56
Erick Christgau Lol Yup
This boxing method is incredible! So much easier than any other reactive framework I've used. However, I've reworked the Box class to have `listeners:[Listener?]` rather than `listener:Listener?`, to be able to observe the value from multiple places - and it's working! But now I'm struggling with removing the listeners, because - even though I want the ability to have multiple observers, I still need a way to remove a specific observer (not all at once). I need the `bind()`-function to return a `Disposable` object which I later can use to remove that specific binding (e.g in a reusable cell). How can I do this?
Stian Flatby May I ask you how to do that? I want to observe the same property from multiple places.
I don’t understand about this
listener:[Listener?]
value’s didSet and bind func how to replace and make it’s work?
Please help me ,thanks a lot
Sure! Instead of "var listener:Listener?" change it to "var listeners:[Listener?]", and in the "didSet" change from "listener?(value)" to "listeners.foreach({$0?(value)})", and in "bind", change from "self.listener = listener; listener?(value)" to "self.listeners.append(listener); listener?(value)". But be careful, since you now store all listeners and never remove them - the listeners will stay alive as long as the observed object is alive. For tableViewCells, which gets reused, this is really really bad, so you need a way to remove the listeners when you don't want them anymore (e.g if the view you're listening from is removed or reused). That's what I needed help with, but I asked on stackOverflow and got an answer. You should take a look! stackoverflow.com/a/50136414/1203228
Have you tried adding an identifier to your Listener object? That way you can remove a specific one.
Thank you for your teaching, it helped me a lot.
What about using Dictionary instead of array, where key is your class object that creates listener and just create function to unbind listener for specific owner object passing
Why is delegation a better approach than box/bind for table views?
For those who wanted to download the project, I put the link here! ;)
github.com/ragotrebor/mvvm-RWDevCon
Awesome, thank you 🙏
I took a sleeper car from New York to the conference. First time I ever took a shower on a train! With robes handed to me!
Is there a general principle that tell you which part of your code should be put into the ViewModel?
The way you used binding to bind view model's access code with label, should we also use binding to bind model's properties with view model properties right ?
I mean how a model is going to notify view model that it has changed ?
Great tutorial! Thanks.
Very good tutorial, thanks.
Thanks for this video
I can't belive I watched a 57 minute tutorial.
Did you like it?
Yes, sure, thanks!@@KodecoDev
Same here! Amazing talk, this has been the best explanation I've come across surrounding this topic. Yayyy!
Nice tut my friend...:) I am still new to Swift world and my question my sound a bit naive but can you help me understand once the login is successful how it is taking us to a new viewcontroller as i hvn't found any piece of code assigned to loginSuccess closure type variable
Excellent Talk !
Is there some place to find the code? Great tutorial! :)
Why do you put getters and setters into extension and not directly into class?
Great Tuto, is there a way to get a copy of the unit test ?
Great tutorial !
Nice tutorial..But how can i download this demo project?
I'm not sure we still host it on the site. I'll dig around and see if I can find it.
what cases doesn't mvvm cover?
Awesome tutorial..can u please tell where can I download the starter and finished project..
github.com/ragotrebor/mvvm-RWDevCon
But all your logic isn't quite in the viewmodel yet :D. It still decides whether to display an error message, or login. You could move that to the vm too.
awesome!!!
can I download this project from somewhere?
did you able to find it?
github.com/ragotrebor/mvvm-RWDevCon
github.com/ragotrebor/mvvm-RWDevCon
@@christophebugnon5155 thank you, kind man
top stuff
can i see source code of LoginService?
is there similar video in objective-c
Very useful~
Since when Jesse Pinkman started to teaching people how to code instead of how to cook?
He is replicode no ?
48:49 unowned vs. weak
github.com/ragotrebor/mvvm-RWDevCon here you can find the project files
❤️🇧🇷
Data Binding 26:15
Yeah!.. that's my Key take away from this video.
boxing is not two-way binding!!!!!
Good one, but he was toooo fast.
then slow down the playback to .5x speed ??????????????????????????????????
not so fast. normal speed