17:41 - Ok, I'll leave a comment :) Anyways good tutorial. A few critique points: In the first video you start doing a lot og sighing and complaining. While it may be understandable and a bit tounge in cheek, it's not particular motivating for the student if the tutor seems bored with the material. My main concern, and you are far from the only one doing this, it always saddens me when people teach a subject and then say: "btw. this is not the way you really should do it, but we'll do it this way for now since you are learning". I would much prefer it if people just started by teaching the proper ways from the beginning. Then they can talk/show shortcuts and lazy programming at some later time where the students already know the proper way. Why teach the bad way first and then try and correct people later on? In your case it is about using commands. I know you've put out some videos about it, and I'm going to look at them next and try and see if I can implement it into this code, but I think it would have been more beneficial to just do it from the start. Maybe you could do a follow-up video where you revisit this project and change it to use commands? But still, great work and I learned a lot from it so thanks.
I completely understand, and have felt the same following tutorials for myself in the past. The reason I don't always show the "right" way is because sometimes the focus of the tutorial is not about "that", but about other things. I try to break my videos up in to specific parts while maintaining a decent video length. One difference I like to believe is I actually plan on making tutorials for the bits and parts that I skim over. Often it's hard to keep a video at a decent length, while showing everything, while also covering specifics. The intention of the tutorial was to be a simple "ice-breaker" for those moving to WPF. Commonly this move is from people transitioning to WinForms. I left out commands to ease that transition and show the familiarity. I actually think that it is a great idea to revisit this. Perhaps a refactoring series on it. Good idea!
I like the idea of a refactoring tutorial focused on using RelayCommand and condensing the InsertChange"xx" methods into a one common command. I watched your 2 part session on commands, but I'm still not 100% clear on how to use RelayCommands with parameters, which this project has a few of. Maybe even showing how you use your simpleWPF library? Love the tutorials.
Here you set `DataContext = "{Binding}"` in the ListView.ItemView. Does that point to the actual item of the collection, what gets stored in DataContext? In the code-behind later I see it's accepted as an object and downcasted to a Button. I'm curious what is actually passed there as an object. Onward, button.datacontext is passed as an object to the purchase method, what is it's datacontext there, of what type? Later on that datacontext is converted to an actual type of item from the collection, ProductViewModel.
The 'Out of stock' message implementation goes against MVVM practice. You don't add UI dependencies to a view model. You could have simply done the following if you don't want to do value converters: public string OutOfStockMessage { get { return (Quantity == 0 ? "Out of stock!" : "") } }
RealBadCharlie I like to slowly progress my videos and series. So yes, there are many things that deprive it of purity. You could see the progression on my notepad series, as well as future ones. I do this intentionally, and so far it seems to really help people learn by taking small bites at a time. Thank you for the response, and indeed you are correct.
As a beginner it was a good tutorial for me..Thanks for it..and i would like to know is there any points that i need to learn so that i can build an application which will be having login page or window and few other page.
Great series of videos… don’t stress the mistakes… solving them in the video is a valuable teaching opportunity
Your WPF/MVVM videos have been such a great help. Thank you!
Thank you, cool tutorial!
thank you so much for this series of videos
I would love to watch a video on commands @23:40
Great video again btw.
Oh, and please cover ICommand & DelegateCommand and all that as well. thx :)
Just uploaded 2 parts for WPF commands. Hope you find it useful.
Thanks mate, excellent playlist.
Watched two times. Awesome video! Thank you.
Great! After watching your other vids as well I'm about to implement commands to this
17:41 - Ok, I'll leave a comment :)
Anyways good tutorial.
A few critique points:
In the first video you start doing a lot og sighing and complaining. While it may be understandable and a bit tounge in cheek, it's not particular motivating for the student if the tutor seems bored with the material.
My main concern, and you are far from the only one doing this, it always saddens me when people teach a subject and then say: "btw. this is not the way you really should do it, but we'll do it this way for now since you are learning". I would much prefer it if people just started by teaching the proper ways from the beginning. Then they can talk/show shortcuts and lazy programming at some later time where the students already know the proper way. Why teach the bad way first and then try and correct people later on? In your case it is about using commands. I know you've put out some videos about it, and I'm going to look at them next and try and see if I can implement it into this code, but I think it would have been more beneficial to just do it from the start. Maybe you could do a follow-up video where you revisit this project and change it to use commands?
But still, great work and I learned a lot from it so thanks.
I completely understand, and have felt the same following tutorials for myself in the past. The reason I don't always show the "right" way is because sometimes the focus of the tutorial is not about "that", but about other things. I try to break my videos up in to specific parts while maintaining a decent video length. One difference I like to believe is I actually plan on making tutorials for the bits and parts that I skim over. Often it's hard to keep a video at a decent length, while showing everything, while also covering specifics. The intention of the tutorial was to be a simple "ice-breaker" for those moving to WPF. Commonly this move is from people transitioning to WinForms. I left out commands to ease that transition and show the familiarity.
I actually think that it is a great idea to revisit this. Perhaps a refactoring series on it. Good idea!
I like the idea of a refactoring tutorial focused on using RelayCommand and condensing the InsertChange"xx" methods into a one common command. I watched your 2 part session on commands, but I'm still not 100% clear on how to use RelayCommands with parameters, which this project has a few of. Maybe even showing how you use your simpleWPF library? Love the tutorials.
Great, man! Keep it up!
Here you set `DataContext = "{Binding}"` in the ListView.ItemView. Does that point to the actual item of the collection, what gets stored in DataContext? In the code-behind later I see it's accepted as an object and downcasted to a Button. I'm curious what is actually passed there as an object. Onward, button.datacontext is passed as an object to the purchase method, what is it's datacontext there, of what type? Later on that datacontext is converted to an actual type of item from the collection, ProductViewModel.
The 'Out of stock' message implementation goes against MVVM practice. You don't add UI dependencies to a view model. You could have simply done the following if you don't want to do value converters:
public string OutOfStockMessage
{
get
{
return (Quantity == 0 ? "Out of stock!" : "")
}
}
RealBadCharlie I like to slowly progress my videos and series. So yes, there are many things that deprive it of purity. You could see the progression on my notepad series, as well as future ones. I do this intentionally, and so far it seems to really help people learn by taking small bites at a time. Thank you for the response, and indeed you are correct.
As a beginner it was a good tutorial for me..Thanks for it..and i would like to know is there any points that i need to learn so that i can build an application which will be having login page or window and few other page.
For login, you want to look into using MSSQL and setting up data services. For multiple pages, I also have a video for multiple views in WPF!