Тёмный

Episode 5: MVVM & Data Binding with Xamarin.Forms 

Microsoft Developer
Подписаться 537 тыс.
Просмотров 90 тыс.
50% 1

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

Наука

Опубликовано:

 

3 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@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.
@baiqing3370
@baiqing3370 5 лет назад
I am so happy that Xamarin has Motz. Very useful video as always.
@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 2 года назад
This is explained so well, I think anyone with little knowledge can understand and write code using Data Binding right away. Thanks James
@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
@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.
@christiantricarico
@christiantricarico 4 года назад
Well explained. Thank you James.
@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.
@jochenhansen1385
@jochenhansen1385 2 года назад
Your Tutorial's explained very well Thanks James
@loam
@loam 4 года назад
Very nicely explained, thank you!
@singhanuruddha
@singhanuruddha 4 года назад
Wonderful video. Thanks
@MXDMND_
@MXDMND_ 3 года назад
Very useful video. Thank you
@captainsman
@captainsman 5 лет назад
That's pretty cool, great tutorial.
@jsimsons
@jsimsons 5 лет назад
Thanks, this was actually useful
@sbouribilel2772
@sbouribilel2772 4 года назад
Thank you so much men , this video helped me a lot
@nehaingale9609
@nehaingale9609 4 года назад
Thank you for the video, nice explanation..
@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.
@deepakkmr4301
@deepakkmr4301 5 лет назад
Thank You, I learned one New thing!
@Ed17151
@Ed17151 3 года назад
Great stuff, thanks!
@Sam-yb9ut
@Sam-yb9ut 4 года назад
Woow thank you so much, super helpful
@kdenisinfo
@kdenisinfo 3 года назад
great job mvvm lover
@slntom9892
@slntom9892 5 лет назад
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
@batozhabbudaev7423
@batozhabbudaev7423 4 года назад
thank you
@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?
@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.
@techwithrafsun8355
@techwithrafsun8355 4 года назад
@ankushmehndiratta692
@ankushmehndiratta692 4 года назад
please make video on obserable collection xamrin
@jojoduke1702
@jojoduke1702 4 года назад
So are Relay Commands used in Xamarin?
@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?
@milanpitagora1870
@milanpitagora1870 3 года назад
How you create folders view and viewmodel, automatically by aplication or manualy created?
@stewmuskie1729
@stewmuskie1729 3 года назад
Is there an example of Xamarin.Forms data binding to platform specific functions via interfaces to UWP and Android for example?
@Franjrc1
@Franjrc1 4 года назад
Hi, Why the Contact model is empty?
@0025439
@0025439 3 года назад
With a checkbox work instead of a switch?
@matteoc7084
@matteoc7084 3 года назад
How do i update data thats on another page?
@andrewmanyore9913
@andrewmanyore9913 2 года назад
So what is the purpose of the view class when we are using MVVM pattern?
@kaistech7865
@kaistech7865 5 лет назад
What is the name of the font u r using in visual studio. Nice lecture by the way thanks a lot.
@jmoralesv03
@jmoralesv03 5 лет назад
The default font in Visual Studio is Consolas. I think the font James is using in this video is "Lucida Console".
@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.
@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
@UnknownMoses
@UnknownMoses 2 года назад
I will say it is impressive though
@homrana7454
@homrana7454 3 года назад
hello, help me to solve this error System.Net.Http.HttpRequestException: 400 (Bad Request)
@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?
@tngjason1204
@tngjason1204 3 года назад
Jason tng Happy
@jmigsan
@jmigsan 5 лет назад
ʰᵉʰᵉ ᵗʰᵃᵗˢ ᵐᵉ
@SaurabhKumar-ys1rk
@SaurabhKumar-ys1rk 4 года назад
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
@marcosapoggi3797
@marcosapoggi3797 4 года назад
How can 15 persons can dislike?
@icLllliIIIIlILLilLlIjigel
@icLllliIIIIlILLilLlIjigel 4 года назад
That audio cropping...
@LanDiEvil
@LanDiEvil 5 лет назад
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...
@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.
@timothyleelong6295
@timothyleelong6295 3 года назад
Distorted Audio is awful
Далее
Xamarin.Forms 101: Data Binding | The Xamarin Show
10:13
I Built a SECRET Soccer Field in My Room!
24:15
Просмотров 15 млн
What sound does an asterisk make?
1:30
Просмотров 811
Xamarin.Forms 101: Command Parameters
5:26
Просмотров 20 тыс.
Кто производит iPhone?
0:59
Просмотров 463 тыс.
Улучшил свои Apple Watch!
0:25
Просмотров 37 тыс.