Episode 5: MVVM & Data Binding with Xamarin.Forms

  Рет қаралды 90,193

Microsoft Developer

Microsoft Developer

Күн бұрын

Out of all architectural patterns Model-View-ViewModel, or MVVM, has to be my favorite. MVVM enables developers to separate their business logic from their user interface code no matter if you are developing with iOS Storyboards, Android XML, or Xamarin.Forms XAML. In this episode I cover the basic building blocks of the MVVM pattern and then introduce you to the build in data binding framework built right into Xamarin.Forms so there is no need to ever manually set a text property, register for a click handler, and automatically enable and disable controls with Commands.
Show Links:
XAML for Xamarin.Forms: developer.xamarin.com/guides/...
Source Code on GitHub: github.com/jamesmontemagno/Th...
Xamarin.Forms Binding Tips & Tricks: Converters and Control to Control Binding: blog.xamarin.com/advanced-dat...
Find James on:
Twitter: / jamesmontemagno
GitHub: github.com/jamesmontemagno
Blog: motzcod.es/
His weekly podcast Merge Conflict: www.mergeconflict.fm/
Useful Links:
Xamarin Developer Center: developer.xamarin.com/
Xamarin Blog: blog.xamarin.com/
Xamarin and Azure: www.xamarin.com/azure
Mobile DevOps: www.xamarin.com/mobile-devops
Xamarin University Self-Guided: university.xamarin.com/self-g...
Create a Free Account (Azure): aka.ms/c9-azurefree

Пікірлер: 63
@baiqing3370
@baiqing3370 6 жыл бұрын
I am so happy that Xamarin has Motz. Very useful video as always.
@Gmaniacuk1
@Gmaniacuk1 5 жыл бұрын
Short, simple, sweet and to the point - fantastic mvvm starter guide
@tuck582
@tuck582 5 жыл бұрын
This was superb. Best MVVM intro vid on youtube.
@neoblackcyptron
@neoblackcyptron 4 жыл бұрын
James's videos have always been useful. It is one of the best, especially for me who is getting back to Xamarin after a 2 year break from programming commercial real world Xamarin apps.
@prityb4697
@prityb4697 3 жыл бұрын
This is explained so well, I think anyone with little knowledge can understand and write code using Data Binding right away. Thanks James
@Flotsam7jetsam
@Flotsam7jetsam 4 жыл бұрын
Very useful and explained well for the time allotted! I've seen too many cut and paste examples that don't explain the basics of Xamarin and XAML. Thanks Motz.
@zaza2010full
@zaza2010full 5 жыл бұрын
Thank you Mr. Montemagno, you enlightened me on some aspect of the subject.
@Dinesh_Solanki
@Dinesh_Solanki 4 жыл бұрын
After reading and watching everywhere else, only this helped me easily understand it, thank you
@florentinoriana1518
@florentinoriana1518 3 жыл бұрын
This is exactly what I wanted to know. Short, simple, sweet and to the point - fantastic mvvm starter guide. From: Future CEO of my own IT Firm
@terencebeshara7993
@terencebeshara7993 6 жыл бұрын
Very good presentation and examples. Easy to follow and understand. This cleared up so much for me, thanks...
@corwynofamber
@corwynofamber 4 жыл бұрын
Thank you for the AHA! moment re: bindingcontext and the code behind.
@christiantricarico
@christiantricarico 4 жыл бұрын
Well explained. Thank you James.
@loam
@loam 5 жыл бұрын
Very nicely explained, thank you!
@milosh996
@milosh996 5 жыл бұрын
This is great! I already knew how to bind data and that stuff but this video really clarified some things for me. One suggestion: you could run an UWP app, I'm sure it would build and deploy faster. Anyway, great video. Thanks.
@captainsman
@captainsman 5 жыл бұрын
That's pretty cool, great tutorial.
@sbouribilel2772
@sbouribilel2772 4 жыл бұрын
Thank you so much men , this video helped me a lot
@jsimsons
@jsimsons 5 жыл бұрын
Thanks, this was actually useful
@jochenhansen1385
@jochenhansen1385 3 жыл бұрын
Your Tutorial's explained very well Thanks James
@deepakkmr4301
@deepakkmr4301 5 жыл бұрын
Thank You, I learned one New thing!
@nehaingale9609
@nehaingale9609 4 жыл бұрын
Thank you for the video, nice explanation..
@singhanuruddha
@singhanuruddha 4 жыл бұрын
Wonderful video. Thanks
@Sam-yb9ut
@Sam-yb9ut 4 жыл бұрын
Woow thank you so much, super helpful
@MXDMND_
@MXDMND_ 4 жыл бұрын
Very useful video. Thank you
@Ed17151
@Ed17151 3 жыл бұрын
Great stuff, thanks!
@slntom9892
@slntom9892 6 жыл бұрын
Awesome!
@sinikiwenangokujumba394
@sinikiwenangokujumba394 4 жыл бұрын
Thanks for the great video, you have explained everything well, I would like to know why did you have that Model folder and Class Contact when you were not going to use it ? Its confusing ... seems like you forgot to explain something
@kdenisinfo
@kdenisinfo 3 жыл бұрын
great job mvvm lover
@pinpost8984
@pinpost8984 3 жыл бұрын
Can you please expand on how the Model part fits into this? You seem to have just covered the VVM and missed the first M. What was the Model folder and Class for?
@aaa4363
@aaa4363 3 жыл бұрын
fully agree here wtf. I think you could expand it to have all the logic in the model part and then call it from the view part but not clear here.
@alessandro6017
@alessandro6017 4 жыл бұрын
maybe i lost where you specify it, but what is the meaning of model file "Contact.cs" if you define properties in view model file?
@hiromijorge400
@hiromijorge400 4 жыл бұрын
hello sir thankyou for the great tutorial!, but i have my own problems about data binding and i still can't solve it , so It is possible to add multiple binding to a Label using XAML that where is the binding source is inside the list and the parameter is a Models?
@stewmuskie1729
@stewmuskie1729 3 жыл бұрын
Is there an example of Xamarin.Forms data binding to platform specific functions via interfaces to UWP and Android for example?
@fraenkiboii
@fraenkiboii 5 жыл бұрын
You explained VVM very well, thank you, but what about actual models and the interactions between Model and ModelView? Are there any resources on that?
@antoniojohnson7693
@antoniojohnson7693 5 жыл бұрын
For updating your data, you want to have a service / business layer that interacts with the stored data. You want to keep your viewmodel free of logic, and use it to just control the flow of the business logic. By business layer, I mean something like a separate class library that has the bulk of the logic. You keep that logic separate, so that you can test it, and if your view changes (which could change the view model), your logic doesn't have to.
@antoniojohnson7693
@antoniojohnson7693 5 жыл бұрын
@KosTEasH my bad, I'm just seeing this. I suppose I could throw something together.
@milanpitagora1870
@milanpitagora1870 3 жыл бұрын
How you create folders view and viewmodel, automatically by aplication or manualy created?
@batozhabbudaev7423
@batozhabbudaev7423 4 жыл бұрын
thank you
@matteoc7084
@matteoc7084 3 жыл бұрын
How do i update data thats on another page?
@jojoduke1702
@jojoduke1702 5 жыл бұрын
So are Relay Commands used in Xamarin?
@rehannawaz5477
@rehannawaz5477 4 жыл бұрын
why i am not able to add references in xamarin.forms.. its working fine with 2017 version, but why it is not present in 2019. and how I can add web service in xamrin form?? please help me anyone.
@andrewmanyore9913
@andrewmanyore9913 2 жыл бұрын
So what is the purpose of the view class when we are using MVVM pattern?
@0025439
@0025439 3 жыл бұрын
With a checkbox work instead of a switch?
@techwithrafsun8355
@techwithrafsun8355 4 жыл бұрын
@Franjrc1
@Franjrc1 4 жыл бұрын
Hi, Why the Contact model is empty?
@kaistech7865
@kaistech7865 6 жыл бұрын
What is the name of the font u r using in visual studio. Nice lecture by the way thanks a lot.
@jmoralesv03
@jmoralesv03 6 жыл бұрын
The default font in Visual Studio is Consolas. I think the font James is using in this video is "Lucida Console".
@ankushmehndiratta692
@ankushmehndiratta692 4 жыл бұрын
please make video on obserable collection xamrin
@stewmuskie1729
@stewmuskie1729 3 жыл бұрын
May I ask why 'docs.microsoft.com/en-gb/xamarin/' doesn't include Microsoft UWP? The reason I ask is that I developed an application for collecting data from a farmer's field and UWP on Windows 10 is still relevant for Laptops in this context. Is MS giving up on mobile?
@UnknownMoses
@UnknownMoses 2 жыл бұрын
I really do not like binding event handlers. It more difficult to maintain, the compiler does not see problems consistently. I think testing is easier when the method/event is public since less test code is needed to simulate. But most of all I’ve been coding for 40 years and 20 in c#. XML is fast but it feels messy and convoluted
@homrana7454
@homrana7454 4 жыл бұрын
hello, help me to solve this error System.Net.Http.HttpRequestException: 400 (Bad Request)
@SaurabhKumar-ys1rk
@SaurabhKumar-ys1rk 5 жыл бұрын
Hi I want to know how compress a video in xamarin forms I tried blog.xamarians.com/Blog/2017/6/26/video-compression but it got so many errors please help me out
@XamarinDevelopers
@XamarinDevelopers 4 жыл бұрын
I would suggest posting comments or reaching out to the author or posting in our forums: forums.xamarin.com
@UnknownMoses
@UnknownMoses 2 жыл бұрын
I will say it is impressive though
@tngjason1204
@tngjason1204 3 жыл бұрын
Jason tng Happy
@jmigsan
@jmigsan 5 жыл бұрын
ʰᵉʰᵉ ᵗʰᵃᵗˢ ᵐᵉ
@icLllliIIIIlILLilLlIjigel
@icLllliIIIIlILLilLlIjigel 4 жыл бұрын
That audio cropping...
@marcosapoggi3797
@marcosapoggi3797 4 жыл бұрын
How can 15 persons can dislike?
@NoToPCBS
@NoToPCBS 4 жыл бұрын
just opened a new xamarin mobile app and as far as I can see MVVM / MVM spreads your code all over the place and to get it to work is a b!tch. bring back the drag drop and punch in the code behind the event.
@neoblackcyptron
@neoblackcyptron 4 жыл бұрын
come now that is not as elegant as keeping the view and it's code-behind minimalistic. I get where you are coming from, probably asp.net/webforms programmer am I right?. I used to hate MVVM too, but it is more elegant as it almost completely removes the view model from the view, only thing connecting them being the BindingContext.
@kinetic1259
@kinetic1259 4 жыл бұрын
@@neoblackcyptron So now microsoft are /kinda/ dropping xamarin.forms, the only reason you'd have an abstraction layer is because you had something else coming in the future. Now there's nothing coming, so what was the point of going to all that extra effort? I say play to your audience and I'm also going to say 95% of us aren't going to port our app to a new imaginary future state view that doesn't exist yet. In object pascal (Delphi) and a bunch of other languages we can directly address the object properties - I mention that because the architect was the same person for both languages, Delphi and C#. I feel like I'm making a form and a button with 200 lines of code like I did writing OWL in C++. So I get it, but it seems like over-abstraction to me and a lot of additional code I needn't write.
@LanDiEvil
@LanDiEvil 6 жыл бұрын
This is exactly what I wanted to know. Too bad it's the deep fake Montemango boy version and not the genuine original bearded man that used to host this show. With a beard on. Oh well. It's a good thing the beard I painted on my screen is still there from last time they tried tricking me with this beardless imposter. I Prey for the wellbeing of the OG bearded Montecarlo and hope this imposter thinks long and hard about the confusion he is creating.
@-NME
@-NME 4 жыл бұрын
Your life must be really boring...
@timothyleelong6295
@timothyleelong6295 3 жыл бұрын
Distorted Audio is awful
The Xamarin Show | Episode 13: MVVM Helpers
29:18
Microsoft Developer
Рет қаралды 14 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 121 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 7 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 22 МЛН
The Xamarin Show | Episode 3: Xamarin.Forms Performance Tips and Tricks
35:27
Xamarin.Forms 101: Data Binding | The Xamarin Show
10:13
Microsoft Developer
Рет қаралды 70 М.
UI Design with Xamarin.Forms - Adam J Wolf - Xamarin University Guest Lecture
1:07:09
Stop, Intel’s Already Dead!
13:47
Linus Tech Tips
Рет қаралды 278 М.
ALL PERFORMANCES | Season 1 Episode 5 | Little Big Shots
34:54
Little Big Shots
Рет қаралды 3,1 МЛН
Better MVVM with MVVM Helpers
21:17
James Montemagno
Рет қаралды 45 М.
Xamarin.Forms 101: Commands | The Xamarin Show
8:18
Microsoft Developer
Рет қаралды 26 М.
How to Add a Database to Xamarin & .NET MAUI apps with SQLite-net
23:13
James Montemagno
Рет қаралды 76 М.
Это iPhone 16
0:52
Wylsacom
Рет қаралды 1,2 МЛН
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 4,7 МЛН
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 7 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 64 МЛН