On one of my recent live streams.
I got the question.
What are the benefits of upgrading to dotnet Maui over
Xamarin and Xamarin forms?
So I took a few minutes to break down every little bit about the past present
and the future with Xamarin dinette six and dotnet Maui going forward.
So take a look.
So a little bit different.
Okay.
So there's a few parts and someone can, um, Mayo make this a, a little bite later.
All right.
So let's think about this.
Uh, so Xamarin was a few things.
One, it was a company that got acquired by Microsoft, but Xamarin
has some core pieces of technology that brought iOS and Android and Mac.
Uh, to be able to use.net, um, on those devices inside of apps and
write those apps in C-sharp or F sharp, or basically dotnet languages.
Now, what that meant in the beginning with Xamarin is that you would build your
native UIs with like iOS storyboards or Android XML, uh, or Macko S storyboards
or zip files, or there used to be okay.
And then what you would do is you would, you would create like a, uh,
a shared library and then it could be like a dinette standard library, for
example, or just a shared code base with all of your, you know, models,
view, models, services code in it.
Um, that would be shared.
So I'm making a web request, pulling down data, pulling that all down inside of it.
Boom.
You're good to go.
Um, and what was nice about this is that you could share that code.
With other apps.
So if you have a, a windows application or you had a web application built with the
C sharp and.net, boom, you're good to go.
It's automatically do that now with Xamarin forms, that was a layer on top
of Xamarin, iOS and Xamarin, Android, and Xamarin, uh, Mac and, and windows.
And what it does is it created an abstraction on top of
those code bases for the user.
Uh, so the Xamarin forms brought in that, that core piece of functionality that
enabled you to write cross-platform, uh, apps with cross-platform UI.
So with Xamarin and.net, you could write cross-platform
apps, but it was separate UI.
This is a way to share shared UI across all the different platforms.
So a lot of times Xamarin and Xamarin forms get, um, can
kind of gets mixed up, right.
Uh, in it, uh, but really that's the two things is there's the base level.
And then there's, um, Xamarin forms.
So two things are happening.
One Xamarin iOS Amarin, Android Zimmer Mac are just turning into iOS for.net,
Android for.net, uh, Mac for.net.
And they, they have the base level requirements.
So anything that you could do before you can still do, but with dotnet
six, um, how it's being built up and that's cool because it uses the.
Uh, project systems, packaging systems, um, command line tools, uh,
hot reload to work every everywhere.
So with Don at six, all of that mobile goodness@xamarinbroughtintothe.net
world is using the same exact, um, bits and pieces and functionality.
So there's a lot of advantages now, um, on top of that, like, as things
were happening, Xamarin essentials came out and that's another lie.
That's um, basically did what xamarinforms did, but for our platform, API APIs.
So something like Xamarin, iOS, and Android, you could access those native
API APIs in C sharp, um, which was cool.
Whereas something like react native or flutter, you have to go write swift or a
Kotlin code or Java code, uh, for those platforms when you want to go access
them, unless someone writes a plugin or something like that, but they have to
write, somebody has to write the code.
So the cool part about Xamarin was that you had all the APS in C-sharp.
So a Xamarin essentials is it created this, um, abstraction of platform API.
So, um, connectivity, um, sensors geolocation into one API.
So Donna at six is going to unify the runtimes and then what's happening
here is, um, Xamarin forms itself.
Oh, mostly really targeted.
Mobile really for phone and, uh, for iOS and Android, it did have windows
support and it had a preview of Mac S support, which I ship I ship products
with with Xamarin forms on desktop.
But with dotnet Maui, a few things are happening.
Um, first and foremost is that it's going to be using the dotnet
six unit unified, um, tooling and runtime and all that stuff.
And then.
It's going to be, um, sort of rearchitected from the ground up.
So that's why I went through the handlers and the new architecture and
that stuff basically removes all the Cruyff of the past Croft of the past.
Um, as Xamarin forms is now six years old, um, and Donna is sort of a complete
refresh built for speed and optimization and performance out of the box, um, with
all the latest and modern bits and pieces.
And then what it does is it adds in that new architecture.
So it's easier to extend.
It's easier to write new controls.
Um, it's easier to bring new pieces of functionality in, and what it's
doing is it's, it is, um, streamlining development, uh, for developers.
Uh, if you will.
So for example, if I toggle over here, you noticed that I have just one project.
For iOS, Android, and Macko so first-class support for mobile and desktop.
And here's a win UI project for windows, but I have Android iOS in here and I
can actually toggle between iOS, Android and my different devices and simulators.
And for iOS.
I'm an Android and windows and Mac.
You can, um, use all of the hot reload and XAML hot reload.
So you can just start writing code, debugging it locally, or on your
device from a windows or a Mac machine with visual studio, 2022.
Um, get everything there, but also it adds an all sorts of cross-platform things
like images, splash, screens, phones.
I mean, actually, if you look at this code, what's set up
here is a hundred percent.
Cross-platform all of my images, um, which this is going to be my app
icon, splash screen, all my images, all my fonts, SVGs PNGs doesn't
matter, handles everything for me.
And I can still get into the platform specific code, which is cool.
All of it's open source a hundred percent and it brings it in.
Um, dot-net Maui essentials, which is the evolution of Xamarin central.
So it's all in the box.
You get access to all that stuff that's there.
And because it's rearchitected from the ground up, these controls, it also means
that the teams are working super hard on app size and app performance to get like
sub one second startup times for your app.
So they're super duper fast with a head of time compilation.
So to me what's nice about is you get all of this great Bennett.
Of the years of experience of the Xamarin Xamarin forms team and the
essentials team all comes forward.
The community toolkits come forward and additionally, all
of your code comes forward.
So if you're building a Xamarin forms app, um, you can easily
port it over to Donna and Maui.
There's going to be a command line tool that brings it over.
Um, there's a back compatibility story there too.
Add sort of shim back compat layers into it.
Um, and your apps will continue to work, but use the latest and greatest
code, um, and architecture to make it even faster and more performance there.
Um, and of course you get to use the worlds, uh, my favorite and best
ID, visual studio, um, to, to build all your apps or command line or
code editors or things like that.
Because it's built with the same tooling.
So you can go to a command line and say, Don at run and it'll run on an
Android emulator iOS device, for example.
So you get all of that.
And on top of that, for example, you will also get integration with blazer, which
is how to build interactive web UIs with C-sharp I'm a hundred percent C-sharp.
So what's cool.
Is that Don M Allie blazer as a blazer web.
That you can bring in blazer code.
So your razor code from your blazer web apps into a dotnet Maui application.
So if you're a web developer, you can now build native applications with
Don and Maui and blazer together.
And what's great is that that blazer code is running super fast because Danette Maui
applications ship with add-on and run.
So there's no web assembly.
There's no server, there's no anything like that.
Everything is rendered locally.
You can stylize it to be independent platform, independent
or platform, um, there.
So it's all there.
It's all a hundred percent there and you can use, like I said, visual
studio, 20, 22 and windows visual.
So visual studio, 2022 on Mac, um, or you can use command line and you can
use code editors, however you want.
Yeah.
And of course, like I said, the, the community toolkit
is also a great community.
Uh, Uh, open source repo that has all sorts of great controls and
helpers and extensions for, um, Xamarin forms and now Don and Maui.
And it's a unifying with the windows community toolkit
too, which is super awesome.
There are going to be some performance analysis coming out in the future.
Um, so definitely keep track of the blog.
Um, and yeah, good.
It's on there.
I think there's actually been a really good video.
I'm going to snip this.
I'm gonna.
I'd say on some of my YouTube too, I'm from this video, which is
cool that bump, bump, bump, let's see, blah, blah, blah, blah, blah.
Do you understand that?
Correct?
That, um, that another difference is that how Microsoft itself
designing and maintaining it?
Uh, I mean, Xamarin was acquired by Microsoft, the company itself and
all the products as part of.net.
Um, I would say that more things are unified more than ever with Donna six.
So there's like a big product roadmap and things that are
worked on, um, across the board.
Um, you can go to this website, um, themes of.net.
I'll put it over here.
There you go.
Um, there you go.
All right there.
You have it.
I hope that you enjoy this kind of highlight from my Twitter stream.
You can find me nearly every single week, usually on Fridays,
over at twitch.tv/james Monza mag.
Now hope you enjoy this highlight.
If you did like them.
Let me know in the comments below, if you want to see sort of more
clips from my live streams and some of my live coding, so they don't
have to watch the entire video.
Go ahead and leave comments below.
And if you did like this video smash that like button.
Hit that subscribe button over there.
And during that notification bell, it's super like it.
That light goes into that YouTube algorithm of goodness.
Super recommend it.
Anyways.
Thanks for watching.
Have a go.