What's New and Next for .NET MAUI Developers?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I think we're still at a magical moment when it comes to client development I think even this morning Becky and I are texting each other in teams I'm centering my location we're getting real-time updates we're sitting here we're responding to email and yet we're still moving forward and there's so much more that we can be doing every single day for the last 13 years people have been telling me well you know that mobile thing's cute that you've been doing and you know there's going to probably be something next and and you know what about that other thing what are these goggles what about this AI thing what about this other thing in fact last night just at the the mixer I was talking with some folks and we're talking about that what's next I said for me what's exciting is what else I can put into my mobile application how do I transform what I've been doing for the last 13 years into creating new exciting experiences for my customers and users around the globe and for myself I love to build applications for myself that's what got me into Mobile development actually coming on campus for the first time about 16 years ago 15 years ago for one of the last professional developer conferences PDC before their relaunched its build it was a magical moment because I was a winforms developer and I was handed for the first time a smartphone that I could develop for as a.net developer and my mind was blown away all I wanted to do was go home and start developing and I did that's what I've been doing up until this point and I think now is really exciting because as the platforms evolve not only iOS Android windows and the Mac platforms also are these amazing platforms that we get to develop for I can't tell you how easy it is to get into Mobile development and still yet those fun challenges along the way of trying to publish your application to the app store which is why I James montemagne is here to talk about the development part and why I have the expert for DOT and Maui Becky here who leads the following experience for Donna Maui and we're going to be talking about what's new in next for automatic developers and many of you were here for our Workshop yesterday so I appreciate you coming back for a lot more so we're going to cover a lot of things not only what's in the product what's new what's about to be released and what's far into the future I'm James montemagno a program manager here at Microsoft over senior developer Community I've been building mobile applications with.net for like 13 18 billion years at this point and I love every single moment with it yeah hi I'm Becky buckler um it's good to see you guys back today um and I'm a PM on the.net Maui team so yeah not quite as many years as you but we're working on it we're working I'll catch up right that's how that's how time works everybody starts somewhere yes yes now with us at Microsoft and the community we want to ensure that.net is a platform that you can build absolutely anything for like I said I was a winforms developer I built some Silverlight apps I built some WPF apps I built some asp.net core apps I built some Blazer applications I built some Azure functions I built some web apis I've done some logic and logic apps I've done some Unity games I've done some I've done it all I mean look at all you got to do them all because they're that really truly empowers developers to build for absolutely anything that's what I love about it whether you're building on Mac windows or Linux we have amazing Ides and code editors for you and a great ecosystem out there to absolutely develop for anything and what I love here is that while we want to continue to build amazing experiences in these core platforms and Frameworks on top of it there's an amazing Community out there they're building unique experiences for their use case so what I like is that while we at Microsoft build some astonishing Frameworks there's probably also someone out in the community building something that might fit your needs right there's no one perfect framework out there but we try to do our best to build that foundation and build something amazing for developers to do when it comes to mobile and desktop that's why we are building dot and Maui yeah so in order to reach all these devices with beautiful app experiences we built.net Maui to be the most productive way to develop native apps with a single code base that perform great on any device and I think what's great about.net is the choice that we have right when you think about the full reach especially when you think of the web and the billions of people using the web every single day either on their phone or on their desktop or anywhere else and with that we have asp.net core and Blazer whether you're building websites or Progressive web apps you get that full reach on the flip side we have Don and Maui and like Becky just said giving you that real depth inside of those mobile clients and desktop clients to build those Rich applications and we'll also touch on The Day The Best of Both Worlds based on your needs which is hybrid development combining both laser and Maui together to build Rich applications across every single platform humanly possible so instead of learning different stacks and languages for each device you can use one language one set of libraries and one UI stack for all of them apis are available directly from c-sharp to access over 60 device platform features including things like isolated storage sensors geolocation camera and more use one programming language one code base and one project system for all device targets with support for cross-platform resources including images icons Splash screens and more dot net Maui on Windows supports win UI allowing these apps to use all the newest native features on supported versions of Windows 10 and 11. and I love this slide because it really shows what the team is building not only the base layers of iOS Android Mac and windows but building dot Maui on top of it and building Rich tooling there and Dot Maui has been generally available now for over a year and was shipped with.net6 now down at seven and we'll progress it on an eight and a lot has happened since then yeah um Donna Maui is growing and active with this unique offering and flexibility not only has.net Maui been extremely active open source project on GitHub but we have also seen an ever increasing demand from Developers it has been just one year one year and some change since the team launched the first version of.net Maui and the adoption rates for new projects and project migration from xamarin and xamarin forms has been fantastic now you may be asking yourself who are these developers and what are they building besides you obviously you're you're like build naps on The Daily who are they who are they is it just a slide which my face on it well if you want a slide with a lot of things on it you're about to experience that so behold all the logos there are companies large and small from all verticals building with and four.net Maui today some of these names may look familiar such as several products from Microsoft such as the Office 365 admin app or Fidelity one of the largest investment firms in the world no matter what you're building dotnet Maui is there for you it's great to have a wall of logos but I want to share a story of one of the companies building with.net Maui all right there so this is Earth Solutions um Earth Solutions is a company that provides solutions that are used all over the nation for damage prevention and risk management to asset protection and a lot more an example of what Earth builds is the 811 ticket management system that is used to handle all digs Across the Nation and their meter inspections platform for managing electronic and gas meter inspections these are things that are essential for our day-to-day life I don't know if you're doing any Home Improvement but I did recently call 8-1-1 because we were putting in some power in the backyard yeah yeah you have to do it oh yeah before you dig yeah eight one one we we just bought a house we don't have any money to do the Home Improvements well you'll be digging yourself so yeah can I skip that a11 or now it's free oh okay not as free it's free to tell you to able to come on out and they'll they'll spray they'll do them okay but the work part's not free no you got to do that yourself you gotta pay for that um but it's your time okay um but Earth uh they've been building this modern app across platforms um with.net Maui for handling all of this um ah there we go uh so as you can see uh it is a large complex application with hundreds of controls and Views that people in the field will use um so let's take a look at it in action all right we've got our uh nice little screen cap of the video here in fast mode we did put it in fast mode my goodness yes um so 3x it is 3x so all of you are taking notes on this right now there's going to be a quiz later um but uh Earth um as you can see they have to navigate with a ton of different features we've got the camera feature we've got geolocation with maps um even just those alone I I don't want to program this how long would this take you to make uh too long yeah yeah as a solo developer yeah and I think what I think is great here is that sound just on you know phones that they're carrying around but they have these big tablets as well that they're carrying around and Donna Maui is flexible to not only the mobile devices tablet devices and desktop experiences as well and they're using obviously built-in controls and also third-party controls from companies that we'll talk about a little bit later in the session too that's a really cool example you know especially the types of apps that I built for a long time and the types of applications that we see in the real world which are Advanced right you know we show a lot of Hello World applications especially in demos but it's great to see real live applications from our amazing developers around the globe building with Donna Maui also it looks really nice it looks very nice yeah yeah it's a good looking out now to build these applications we want to ensure the developers have world-class tools Visual Studio 2022 on Windows is world class infused with intelligent code editing AI assistant co-pilot enabling you to to really get in and build some awesome applications full line completion we were just in a workshop yesterday here and literally the IDE writes the code for you which I absolutely love but also some great iteration features like hot reload xaml hot reload previewing as well and being able to deploy anywhere easily from just a single drop down and of course on the Mac we have Visual Studio 2022 for Mac which has been rebuilt from the ground up on.net itself is rebuilt on.net6 rebuilt UI experiences and great integrated tooling for developers when they're want to quickly iterate especially on iOS applications so I'm gonna do a quick demo uh here if somebody were here yesterday is probably you'll see some of this but I just want to kind of walk a little bit through this in general as we go through so when you're inside a visual studio over here I've created a brand new.net Maui project and to do that all you got to do is open up visual studio in any flavor I'm always on the preview because I like to run risky over here and when you go in you will see that there is a drop down here and you'll see Maui and there's going to be a few different templates actually have the amazing third-party template engine called the Maui app accelerator this is an awesome extension from one of our MVPs here at Microsoft that enables you to like scaffold applications Pages choose your Frameworks extensions and stuff like that and I don't know why it's a goat but it's pretty cute so I like that I love that yeah if you don't have that extension installed but I highly recommend you check out you'll see these three templates which is a Maui app a Blazer hybrid app and a glass library and I chose the Maui application and you will get a brand new project that looks a little bit like this when I zoom in here what we're going to see is that it's one project one solution like Becky was talking about here I have all my dependencies so I can see Android iOS Mac Catalyst and windows and then we get these uh specific folders where I can put platform specific code and resources under platforms we have specifically the Android iOS Mac tizen support from Samsung and Windows Experience here and this is any code that is specific to that platform so if it's in an Android folder it'll only get compiled against Android itself so if I open up the ad main activity it means that it's using Android namespaces because as a Maui developer you have access to the underlying platform of iOS Android Mac and windows in c-sharp so a lot of this code you won't have to touch but if you did need to come in for example and access something in the Android namespace you have access to all of the different Android spaces that are there all in C sharp which is quite delightful now over here we'll also see resources and these are the things that Becky was talking about cross-platform app icons fonts images raw assets Splash screens and styles the team is gone above and beyond to stylize every single control inside of net Maui that's built in so you get great light theme and dark theme support out of the box and you can completely customize it just go into the color xaml change your colors and your whole application will adjust accordingly which is really nice you can also drop in fonts like I said including font icons and app icons and splash screens are generated for you automatically one of my favorite features is the images where you can put in not only PNG and jpegs but also you can put in svgs these will all be automatically resized for you 100 so no matter what device your application is running on it's going to look awesome if I double tap on the Maui app we're going to see that inside the Cs proj we're going to see all the different build targets and if I want to publish on Samsung tizen devices I can also add that support in too inside the Cs project has been cleaned up with the latest format which means that it is very trim and slim which is great but it also adds unique features for dotnet Maui developers such as the application title app IDs application version numbers and backwards support attributes so this is going to say that this application supports all the way back to iOS 11 for example or Android API 21. what's great here is that all of these information is just in the Cs proj and when you compile up your application it's basically swizzled and compiled into the main application platform so you have to worry about it here you can also specify additional folders and and and splash screens and images and you can override the defaults as well if you're using svgs and base sizes and of course you can use as many packages from nuget as you would like here in the drop down all you need to do is simply go in and select your target you have a Windows machine Android emulators local devices for iOS and you can connect to a Mac to do iOS devices as well we'll talk a little bit about that more here in a bit the default and easiest since I'm here on Windows is just to click on Windows this is going to compile up my application and then I'll deploy it directly into my Windows machine deploying it directly to your Windows machine or from your Mac from visual studio for Mac by far is the fastest way to develop because there's no additional layers or emulators or simulators that you have to worry about it's all right there on your machine and here it is this is our hello world welcome to.net Maui and as you can see over on the right hand side I'm getting a nice xaml live preview this is a real snapshot of my running application let me go ahead and resize it there we go that's a little bit better and this is cool because I'm on a single monitor now some of you might have 8 000 monitors at home I got one big one um too big it doesn't make it I think one bit it doesn't doesn't make any sense I do use power toys which is my my favorite to put things in different spaces but there's nothing like having a ginormous Visual Studio that's you know 48 inches wide it's just right there so what's great here is that this is actually showing my real live running application and I can click and tap on this here I can change this from Hello World to hello vs live and it will update in real time not only in the xaml live preview but also directly in my running application I don't even have to save to do that I can also come in and take a look at the code behind so let me open up that file here and right now we're seeing that the incrementer is by one so I could say plus equals 10. I'm going to hit this hot reload button right here which is going to hot reload my code and now whenever I increase we can see that it's increasing by 10 every single time you can only modify your xaml but using C sharp and Dot net how reload reload your c-sharp code without even having to stop debugging now what's great here is that you can modify your xaml add remove things and if you have a large application you'll also see a live visual tree this is one of my favorite features too so you get a full outline of the application the scroll view the the images the icons and you can simply tap on one and it'll navigate to your code it's a really delightful experience inside of Visual Studio to get up and running now of course I can deploy it on Windows but I'm going to go ahead and select one of my Android emulators that I have here you can deploy to an Android device to an Android emulator that works on any of your machines or if you're on Windows 11 you can also enable the Windows subsystem for Android which enables you to deploy your application directly to your Windows machine but running it as an Android application on windows with the windows subsystem for Android now what this is going to do at this point is it's going to sit there and it's going to compile up my application for Android and then it's going to deploy it to my Android emulator and this goes to a little bit of a different process because what it's doing is it's take all of the source code that we had inside of our application and then it is compiling it into a native Android package at the end of the day and deploying it to the emulator and it has to go through a few different layers to do that to actually get it up and running so we'll see it go ahead and deploy here in a few seconds and when you're building the package for the first time it usually takes a little bit longer because it's doing a full package and recompile and then after that it's more of an iterative release and while we're waiting for that to build and compile I'll also show off really quick as I zoom in that inside of here we're seeing a bunch of normalc sharp.nety things right so we have our code analyzers we have our source generators for like Json for example our regular expressions and of course our packages too so there's going to be some pre-built packages that come with on a Maui specifically for the different runtimes so we have things that are from Maui like Maui graphics for 2D Graphics but also the Android specific libraries that are required to actually build and compile up Android applications so the.net Maui team has an iOS and an Android team inside of them that are specifically building those platforms for Developers so what you would have saw is the same thing basically but now working over on on uh on Windows now a lot of developers also ask us about Visual Studio code true in fact when I started working uh for net Mally I was like oh yeah I work with BS and all my classmates because I just graduated um they're like oh I love Visual Studio code I'm like oh not quite the same thing but we have some exciting developments in that department so last month in June we released the first preview of the c-sharp dev kit it's a lightweight editor first experience that augments your c-sharp development and visual studio code um with a solution Explorer native test Explorer and AI powered code authoring and more okay Visual Studio code and then last Tuesday we shipped the first preview of the.net Maui extension which paired with the c-sharp delicate gives you the tools you need to develop your cross platform.net mobile and desktop apps with vs code on Windows Mac OS and Linux the.net Mallet extension lets you develop and debug your app on devices emulators and simulators from vs code.net Maui and the c-sharp dev kit borrow some familiar features from Visual Studio to enhance your productivity making your mobile and desktop development delightful with c-sharp in Visual Studio code and let's take a look at this it's a preview currently which means it's not going to be 100 fully featured but it's a pretty nice experience and is available across Windows Mac and PC as well so let's go ahead and give that a look so I'm going to go ahead and boot up vs code over here and the few things that I have installed if I go to the extensions not that extension is that we have the c-sharp extension the c-sharp dev kit intellicode for c-sharp and net Maui the c-sharp base package has been rebuilt from the ground up with a new LSP language server support that supports Roslyn and that you use Omni sharp under the hood and that's just being completely just updated and is open source under MIT licensing the c-sharp dev kit and the.net Maui the extensions are under the visual studio subscriptions we'll talk about that here but I've installed those and when I do that I get this little nice crate.net project here it's going to ask me what type of application I want I'm going to say.net Maui app you can ask where do I want to put that I'm going to go ahead and put that into my GitHub direct directory and then what it's going to do is it's going to basically run the same commands that Visual Studio or the command line would run it's going to ask me what my project name would be and I'll say Maui app too and now we're going to see is that Visual Studio code lights up and we have our normal on the left hand side just kind of file browser right there's an obj there's Resources app there's no nesting anything fancy happening on here we can see these things happening in real time however with the c-sharp dev kit what we're going to see is that we have this new solution Explorer and this is going to give me all my projects so if I had multiple projects it would identify my Solutions and show me all my projects I just have one project because it's a dot ml app so here I can go ahead and collapse everything encode kind of how I normally would want to here I can take a look at my app xaml my app shell my main page and I even have those drop downs for my code files as well I get nice highlight syntax and of course if I'm coding in my c-sharp files I get my intellisense I'm using GitHub copilot that's all going to be there or intellicode which is great I can see all my dependencies just like I saw in visual studio and I even have a test Explorer if you hire running unit tests with end unit X Unit B unit any of those things which is great if I scroll down to the bottom right we're going to see that I have this little C sharp icon which means I've signed in which is cool works with any subscription Community professional Enterprise so free Community Edition and then this little curly braces is going to show me where do I want to debug windows and what startup project here if I tap on the debug Target it's going to pop up this window that shows you where do I want to deploy to my Windows machine my emulators and if I was on a Mac it would deploy to IOS as well over here I'm going to be risky and I'm just going to go ahead and select my Android device come over to debug and hit run and debug and select dot Maui this now is going to do the same thing that Visual Studio would do and it's going to build and compile up this application and deploy it onto my device now of course I did just try about 14 times to deploy to Android so I don't know why I decided to pick it again because oh so sorry is that the emergency is that the engineer this is when I normally wake up everyone we had to get up a little earlier today perfect yeah what's cool is that just like Visual Studio itself went and launched the application and the emulator so will Visual Studio code now it is a lightweight code editor so it's not going to give you all the features like an SDK manager or an Android emulator manager or things like that but it is going to give you the the base that you need to get up and running and deploying your application so that's something that is a nice delightful experience now I mentioned that is running across Windows Mac and Linux which means on winix on Windows you can winix Linux I guess you can run it that's that's the windows subsystem for Linux plus it um when you go ahead and deploy your applications from Windows you'll focus on Windows and Android when you are on Mac you can do Android iOS and mac and of course on Linux you will deploy and debug to Android since Android experiences are available there so that's sort of what we have going on in those spaces perfect awesome I just build the application and now it's going to go ahead and deploy it perfect that should be it or it's a hello world application so it's perfect so it should be click me and we can click it and the application is off running and doing everything there if I want to add break points of course I can do that and then I can go ahead and add a breakpoint hit it there I get my locals my watch Windows everything that I would expect inside of vs code I can also create apparently not uh there all right let's continue on there we go there's all the sender information perfect and I can continue on and then see it up and running I can also now say oh I want to switch this and I want to actually go to my Windows machine so I can select my local machine and hit run again and now at this point it's going to go ahead and rebuild the application for Windows you can actually see the direct command that it's running here so we can see this build debug configuration where it wants to go and how it's going to deploy it so again this is now going to go ahead and spin up this Windows version on my application and get it off and running so there we go builds much faster because it's just doing a local Windows packaging build and it should go ahead and run it on my machine there we go we got threads boom hello world amazing that hit break points and continue on just like we would expect right I click it a lot of times and there we go so it gives you that experience there are some things that are still in the works like hot reload and other intellisense enhancements and those will continue to come as we go now Becky you might be wondering well we did see Android Windows what about iOS what about iOS we don't have a Mac I don't have an iPhone I don't have a Mac I don't have any of that don't have any of it I do have an iPhone Android phone yeah interesting okay I mean live your life all right well I guess I can't send you my location and then see it's real time and what color are my text messages yeah yeah don't worry I was only on it I'm a PM of the people okay I was an Android User for 13 years so I totally understand you saw the light I'm sure no I love them all um they're all magical star shines um so let's say I want to deploy to iOS I just told you that I can't use Visual Studio code to do that because it's not supported uh here however if I jump back over into Visual Studio on uh Windows let's go ahead and scaffold out a new project and deploy that to iOS I'm going to go ahead and show you how we do that when I create the new project of course I can select the version of.net that I want and any project inside of Don Maui will give us the uh examples of going to Windows Android like I talked about earlier and then of course there are a few ways of building up your iOS application from Windows the first thing is if we did have a Mac here or if there's a Mac on the network I can actually just click this little pair to Mac button that's going to enable me to do a remote login session with SSH and actually connect up and do a remote build and compilation and it would show up here there are none because I didn't have mine with me mine's at home so someone asked to borrow yours don't worry yeah that usually does work yes the other thing I can do is use a piece of technology called iOS hop restart so I have my iOS phone here and what I'm going to do is just plug it into my Windows machine now the other thing that I've done is I have specifically logged into my Apple developers account from Windows over here there we go pops up and that is going to enable me to come up into the debug menu and under iOS local device we can see my James work iPhone that's my that's pretty confused with your regular iPhone that is correct and what this enables me to do is come in and set up and use hot restart so this is the first time deploying this new application so I can click next I can go ahead and select a team because I've logged in with and this is going to go off and do a whole bunch of things that's going to configure the application register my device download any certificates that I may need and enable me to package up my application now this is pretty unique it's not actually going to deploy your actual physical application to your phone it's going to take your source code and use our interpreter to interpret your source code inside of a predefined package that we resign so this sort of debug package isn't something that you would ship to the store but it is something specifically that you can take around use and use those features like hot reload and hot restart to be productive so the application is starting up and I actually see the launch screen over here we can see things are happening and hot restart is or hot reload is going to kick in uh here we go and what we're going to see inside of Visual Studio this actually may be more impressive than the Android emulator just showing up inside of it is that we see the same exact experience that we would expect uh over there so we have all of our xaml we have all of our live visual treat and we have our actual running application right here on our phone and my phone's in dark mode so you see the dark mode of it and apparently as you rotate it you also see the rotate in real time it's amazing good job because it's an actual mirroring of the the screen which is really cool so that helps me be super productive on no matter how I want to develop my applications whether I'm using cool visual studio and I want to deploy using hot restart or if I'm inside of vs code which I think is fantastic amazing that's amazing so we just saw how to be super productive in visual studio with Advanced tooling and Bs code in the lightweight code editor now vs code like I mentioned earlier not only um comes with the Don Maui extension which is in preview but the c-sharp dev kit extension which is also in preview 2. this is going to add that solution Explorer native test Explorer and that is licensed under Visual Studio the c-sharp extension is the same c-sharp extension that existed before the C sharp kit was released is a dependency of the c-sharp dev kit extension so you can install just the c-sharp extension and not anything else if you want that's going to give you sort of the next upgraded version of omnisharp with Rich c-sharp code editing experiencing there's no changes to licensing It's all under MIT and open source and completely free so it's all up there whereas the things built on top of it like the c-sharp dev kit and Maui extension are specifically licensed under the visual studio subscription including Community which is free Pro or Enterprise you just log in automatically yeah cool I'm curious have any of you tried the c-sharp extension and visual studio code experience yeah one or two people yeah so yeah last Tuesday is one this one Maui dropped yeah yeah yeah yeah take another laugh around yeah yeah and it's enhancing every single time yeah now we've talked a little bit about what's in the box and last November we launched.net seven and there was a lot of new features and a huge focus on performance yep that's right James okay um our team is amazing and they're super dedicated to making your apps faster in regards to both the startup time um and also just uh taking up less space um so uh we want to decrease the app size as much as possible so that you can deliver the app to your store of choice at the end of the day in.net 7 the team focused on rendering speed and scrolling in list views and collection views you were here yesterday we got to learn about list views and collection views and they were able to give a boost to rendering by nearly 50 percent and smooth out scrolling by optimizing the code of the handlers at the same time the team has been inching closer and closer to their half second startup time goal on Android and iOS that would be cool to see yep and they just continue to decrease the app size bit by bit so smaller and faster and there's great blogs from John and peppers about every single release that comes out that are digestible unlike Stephen tobes which are also digestible just over a long month which is great yeah the SDK itself is not the only place the team is focused on the core of the.net Maui development is inside visual studio and the team knows that this is important to our new and existing developers the team vastly improved build and success rates for all builds in visual studio and decreased hot reload errors making developers more productive and being able to stay in the flow it's very important finally when you need to pair to Mac for iOS builds the entire process was improved and just saw that yeah there were also new features requested by developers specifically around desktop right yes we're done in Maui obviously there's a large Focus coming from the xamarin xamarin forms background for mobile but desktop is a world-class experience.net Maui not only enables like multi window support with desktop but also the things that Dot's top users will know and love such as tool tips tool tips enable developers to easily add little right-click tooltips on top of it you can add pointer hover effects inside of your visual estate as you hover over and even add context menus as well so these are all now built into every single control in dot Maui they also added other tap gesture recognizers such as right-click events which is something that was also added in the most recent release so a real advancement when it comes to the world of actually going in and building desktop experiences across Mac and windows and we're going to see that theme as we go into net 8. now additionally there was a big large focus on migration we had a lot of developers coming from the xamarin and xamarin forms space we wanted to ensure that it was easy for developers to move forward into Don imalley now xamarin xamarin forms are continued to be supported until May of 2024 but there's no better time to start moving especially with the release of done at seven and the upcoming release of.net 8. now I'll show you how easy it is not only from the.net Upgrade Assistant CLI but also from Visual Studio 2022 itself so what I'm going to do over here is I'm going to go ahead and look in my extensions and under installed we're going to see the let me see Upgrade Assistant perfect and inside of here you can install the.net update Upgrade Assistant the.net Upgrade Assistant itself is specifically built not only for xamarin and xamarin forms but it's also built for upgrading.net framework from dot net Core to.net 5 6 and 7 and a lot more so we're doing this live because I did it on my other machine at work and then I forgot to install it here for the actual demo so we're doing this real live you've never that's it live today lots of live if you've never installed an extension in Visual Studio it's very very fast look at how fast this is installing and getting up and running inside of my visual studio Community Edition 2022 which is pretty cool now the Upgrade Assistant the best way to find information about it is to go to dot.net and when you go there under features you're going to see the Upgrade Assistant in the top right this is going to show you everything you need including a great video here from Olia and it's available not only inside of Visual Studio but also as a CLI tool that works on Windows and Mac and the Mac support was just added here you can see all the different project targets that you can go ahead and use including uwp to window when UI xamarinforms.maui and more let's see if it did it it's finishing up amazing now we use this not only internally at Microsoft but also there's amazing customers around the globe that are using the.net Upgrade Assistant to do it we'll see if it's going to go ahead and finish in time and actually get it up and running that's the one thing apparently I forgot to do but that's okay and we also have great ebooks that'll help you in your migration along the way too so if that doesn't work in time we'll see we'll give it literally oh my gosh there we go perfect so let's say I'm a xamarin forms developer inside of visual studio so I'm coming in to visual studio and I have a project so let's go ahead and create a project with xamarin forms so I'm going to go under mobile and I'm going to go ahead and select a xamarin forms application I'm just going to call it app one which is a great name and we're just going to go ahead and say fly out so any xamarin forms applications in the upgrade uh migration steps the few things that have changed not only just the targeting we can see here that we have an Android and iOS project and a.net standard project and then additionally all the namespaces have been updated and several of the different properties may have changed as well so inside this project I can actually go in and now say upgrade now this is an upgrade assistant right it's not actually going to fully take you 100 percent and I'm not going to be able to just right click go I did do this the other day and it took me maybe about 10-15 minutes from a file new to actually get it migrated over to Donna Maui but the upgrade assistant's really cool I can come in and I can say do I want to do it in place or side-by-side project let's do that I'm going to create a new project and say next and I'm going to say that I want to use the Maui application template and this is going to be called app One Core whatever it is I can select the version that I want so let's dot net 7. and now it's going to take a look at all of the different sets of files and project settings and I'm going to say upgrade this is going to run through the entire application and it's going to go ahead and not only use the new template but it's going to bring over all of my views all my view models and all of my services here so here now I can go into my login view model and I can see that it's using and upgraded all of the.net Maui different controls base view models and everything I'm using in here whereas if I go into the old one and I go into the login we can see that we're using xamarin forms and things like that so it takes all that code upgrades it naturally and now I can bring this into a Maui application so this is just sort of a library that's here and I can add on other support so literally just a few clicks and totally ready to go which is Super Rad yeah and it's an Upgrade Assistant not an upgrade magician yes not you know magic wants it's doing its best yeah that's correct um but you know at the heart of dot net Maui is you guys our developers and your productivity whether this is your first maybe like me you know or your 5 millionth like James time opening up a project you will benefit from the robust Suite of tooling made to get you building your beautiful apps faster all right so in addition to the nuget packages built and maintained by community members there's a vast set of component vendors building out Suites of controls that are both free and paint like free I like free too yep yeah see previous we just bought a house so we have Dev Express Dev Express recently released a lovely set of controls that are completely free yeah for developers data grids enhanced collection views tabs pop-ups shimmers and so much more are included even have a great Visual Studio template to get you started okay we also have guile UI they have been a staple for xamarin form developers and the team has been hard at work on the uikit for net Maui with pre-built templates Pages a vast amount of controls there's a lot to choose from they are also working on developer workflow improvements and recently shared growl Studios for Developers it gives you an add-in for visual studio to easily integrate controls icons and so much more it's really cool to see the community build such great products on top of.net Maui and it doesn't stop there we have our friend at telerick they have a vast vast amount of controls ready to roll uh Sam from telrick is here at Visual Studio live so be sure to find him for a demo so here right now he is he's somewhere yeah not here here though syncfusion uh they were our roommates during uh build yeah they were really awesome to share a room with and they gave out a great mug too but they brought their entire uh control suite and office processing to.net Maui for developers as well and then finally exceed has been working on new controls in a suite that is completely free for developers to use yeah it's really awesome to see not only amazing things from the community like Becky said but also there's a rich ecosystem evolved and that's nice because while Dynamite was built from the ground up there's a lot of Legacy in xamarin forms that could be brought over and these companies and the community are hard at work doing that it's really exciting to see it progress in just one year and we're moving forward with Don Maui we're actually on our what sixth preview of.net eight that sounds right yeah uh and it's been part of netsense.net shipped with net six and Maui together and Dot net 8 is the next major release LTS support uh ford.net uh itself and there's several improvements right yeah Maui specifically yeah let's talk about what's coming in.net eight um so we have the workload so.net access across the board having multiple versions installed is going to be easier um oh shoot I skipped the stability we have stability too yeah um so we have a quality effort report uh for top feedback and memory management and performance improvements there but yep we have the workloads too so workload clean and you get packages for previews we got desktop and you're talking about desktop earlier and so form navigation with the keyboard and keyboard listeners actually I had a friend who made a Maui app and he was asking for keyboard listening oh nice ax he was only focused on desktop so I'll be giving him the good news nice for sure and then uh for hybrid we have deep linking for Blazer hybrid and hybrid webview and then for Native smaller and faster apps with Native aot and sharing.net libraries to objectives oh and then we I know these grids uh not quite as flashy as our huge page of icons earlier um but if you look at the numbers the numbers are very exciting um so in dot netany preview six the first preview for the native aot for iOS was released this is an evolution of the mono aot that is found in iOS apps builtwith.net today that bring it in line with aot support and.net itself um so we're seeing vast improvements for the size on desk and what we see here is for a traditional iOS application just without dot ml itself we're seeing 40 size reduction between the mono aot and the.net Native aot and then also for a.m Maui application we're seeing very similar size reduction as well 30 in size without sacrificing performance as well and iOS applications are fully ahead of time compile and of course our Android applications with and without data Maui also have aot as well but the first focus is on Native aot for iOS since iOS applications do have to be ahead of time compiled and bring that in line this is going to be a preview feature on.net8 and the team hopes to roll it out fully in.net9 gonna say this was a perfect time for you to use your laser yeah because I wanted to go all the way out there yeah there's a lot more like Becky said talking specifically around desktop support and some of the common features we saw those being built on with Don S7 and enhancingin.net 8. so things like accelerator so control F going into the file menus which are a big addition as well there's several other desktop enhancements I'm not going to go into specifically but we do get a lot of questions about using native libraries and the team is specifically focused on making that better today the team or developers have to go through a workflow of binding these libraries for Java and objective-c into c-sharp bindings when often what they want to do is just invoke a simple method or put in a view so that means that there's a lot of work when you're only making one or two calls because you have to go through this process of creating huge bindings the idea is to come in line with how other platforms and Frameworks are working with these native libraries by creating channels and the idea here is being able to introduce methods into those native libraries where you can cross talk between both.net and the native platforms so here for example this channel service we're able to call in from c-sharp into Java or it could be kotlin and actually be able to get and create a channel to this label View and then send something to the platform you'd be able to not only send but also receive cross-platform along the way which is really great to see so this will be really great when you just need access to a few methods in a Java library for Android or an objective-c or Swift library for iOS you don't need to buy in the entire world the team sees this as a Way Forward because it will not only make it faster more productive for developers but also means the team will be able to support more of the packages faster and longer so you have to wait around for new updates to be released now we also mentioned that there were great enhancements for desktop but there's been a big Improvement for keyboard in general now what we're seeing here are a few different versions of original Maui xamarin forms and also the new Maui demos there's a lot of forms over data that occur in mobile applications and the keyboard is always just the vein of like every ones exist and it's terrible and especially on iOS even myself today in using iMessage struggle with how even Apple introduces it so there were a lot of enhancements in xamarin forums and the team did its best to bring over those into Donna Maui here in the far right series we're seeing um great improve scrolling and enhancements so we don't see any overlapping keyboard tabbing and next defaults automatically for accessibility features which is really great and of course just everything working as one would expect when creating these which I think is the light bulb not something you'll just get for free out of the box now let's talk a little bit about hybrid development one of my favorite things and actually the next session is going to be Dan talking about Blazer which is our full stack for building web apps and doing this enables developers to build apps directly in c-sharp without having to use JavaScript and it's really takenable by storm we're seeing large customers around the globe adopt Blazer since it's part of asp.net into their workflow in fact the.net website itself is a beautiful blend of asp.net core razor pages and Blazer Razer components as well which is delightful and I got to work on the Blazer components on the live TV section and it's something I actually understand because I'm not a user of JavaScript often so writing everything in c-sharp is absolutely delightful not only if you want the power of the server but also directly in the browser with webassembly now Blazer is a great platform because it enables you to build on the web and go absolutely anywhere whether it's Progressive web apps or it is in the browser or on the server and down there Maui is a great platform for building these different client applications but if we combine them in a fancy PowerPoint when transition we get Blazer hybrid which enables us to build world-class applications for anything and blend both native and web Technologies together now the benefits of hybrid are that these devices are super duper fast and it also means if you're in a development environment where you have web developers and you have client developers you're able to blend these worlds together and build your web apps and your desktop apps and mobile apps faster or if you are a web developer now you can take your existing technology nodes and bring them directly into Mobile and desktop with Maui so you have a lot of advantages here the great part about how hybrid development with DOT Maui and Blazer works is that there is no server there is no web assembly because Don Maui has a.net runtime it means that you can just use that.net runtime to execute your c-sharp code from your razer components in Blazer which is great so it means you can ship to the App Store you can do internal distribution everything that you want and you still have access directly to the native apis of iOS Android Mac and windows because it's built inside of.maui so now now our application architecture looks a little bit like this we have all the platforms on top including web with blazer we have shared Blazer components across all the different platforms and then we have our shared business logic such as our models our view models and things like that across the different platforms and of course you can blend as much as little as you want you can have an application that's 100 Blazer and just bundled into a Maui app or just a little bit of Blazer 2. let me show you what that looks like okay I'm going to go into visual studio and I'm going to now say file new project and instead of creating a Maui app just a Maui app I'm going to select this.net Maui Blazer app I call it Maui app 7. that seems correct and I'm going to hit.net 7. all right so here when I open this project the Cs project looks nearly identical to the Cs project I showed you before in fact it basically is exactly the same the difference over here is going to be inside of the dependencies that we have our Android iOS Mac and windows but we can see a dub dub root with some CSS we can see some data we can see some pages which are razor pages and still the platforms that are here inside of the Maui program file which is also there in normal dot Maui applications we have normal Builder setup including adding fonts but we're adding the Maui Blazer webview and Blazer web developer tools in any Maui application with or without Blazer we have full dependency injection and Constructor injection support but here we're adding this weather forecast service now inside the main page we still have this ammo page but instead of using the native controls for iOS Android Mac and windows with on a Maui like those labels and buttons we have a blazer webview this goes ahead and specifies as the roots component that we want to use and in this case main which is specifying to use an index page a fetch Data Page and a counter page as well so we can get those Razer components here now when I run this application the application is going to be compiled up into a native Windows iOS or Android application but the Blazer webview component that we have see here is going to use specifically the native web control on the platform so that's webview 2 on Windows and the native web components on iOS Android or Mac all right so here's our application and if you've ever created a Blazer application this looks like a Blazer application and here I can go to counter I can click I can go see fetch data and this is all coming in I still get all my previews but this is using this fetch data so here for example I could go in and add a breakpoint I could go back and forth and navigate over here and we get our breakpoints inside of the code that I would expect to be executing on so here we're using that type of control now if I go into the counter it's going to be the same thing and we get that nice functionality now one thing that is really cool is that I can come into my counter and still access native controls so for example if I wanted to add another button here I'm going to say check internet there we go and I'm going to go ahead and say check internet here we go and then I'm going to make this uh there we go and all I got to do is now say VAR has internet and if I want to check the internet I'm checking the internet of a Windows Android or a Mac machine because that's what I'm running on now built into dot Maui are a bunch of cross-platform apis that Becky talked about earlier so I say microsoft.maui dot we can see things in here such as devices we can see there's all these fonts that are in here we have file system helpers we have font managers we have just tons of different controls that are in here if I type in networking I have access to that if I say um um we'll say x activity or application model I can see that I have an activity State I have app information so I've wanted to see my build version package number we have access to those geolocation and a lot more I'm going to go into networking specifically and I can see that I have the connectivity API here here this is going to give me access to my network state so I can go ahead and say does my network have access to the internet for example and that'll be if I have internet so now what I can do is say app dot main application dot current dot main page and I'm going to use a dynamawi API to display an alert and says has internet question mark and then I will output as Internet and say OK here we go and I will say I guess I'm going to stop hot reload because I broke Hot Wheel that's okay to string there we go perfect and we're going to run this again okay so we have another button on our click me page and here this is going to do one click to check the network access and then go ahead and run this here okay we have our app perfect one more time I have this also happen yesterday there we go go into counter and then say click me and it says has Internet true which is pretty awesome if I go in and I go ahead and put this into uh airplane mode one my mouth stops working but I guess I'll say click me and now my has internet is false and this is a native pop-up from uh Windows that's going on here so that's really cool now I'm going to go ahead and turn uh Windows mode off and I'm gonna get back to my mouse or else I don't know how to use it yeah yeah now if I hit F12 here I want to show you that the dev tools are here so this is a you know web I have my elements I have my console everything coming in here that I can select and go into right because this is a web view that's on here now I can blend different controls so if I wanted to I could come into this main page I could add you know a button inside of here so if I put a a grid and I did you know row definitions and I said Auto star and I wrap this in a grid like this and then I did a grid dot Row one and I added a button that says text click me here I can go ahead and get this Blended so here I would see basically a button that says click me in the first row and then I'll see a Blazer webview below it so there we go we have click me up top which is a native button that just spanning the whole view but I'm getting the web view below you can put these in tabs you can do a bunch of things and of course this is going to resize so if I'm on a mobile device I'm going to get the drop down here and you can say do I want to use this type of experience or do I want to use native tabs for example and embed the controls somewhere else which is really cool and of course you can deploy that to iOS Android anywhere else that you want now a lot of developers though are interested in what about if I have existing just web assets without dot net itself what if I'm not using asp.net core what if I am using asp.net core but I'm using angular or react for example well the team is working on some several experiments to take this hybrid approach even further along on the team who's a lead engineer on this actually has gone ahead and created an experiment called the hybrid webview so we have the Blazer webview but also a hybrid webview this enables you to bring in your angular react.js and view applications directly into a Maui application and still actually use those native controls and blend and blend the native and web components as well you can communicate back and forth between JavaScript and net which is really powerful and of course you can reuse these Investments you may have so let's take a look really quick I'm going to go ahead and I'm just going to go ahead and close this solution really quick awesome and the first thing I'm going to do is open up the world's simplest sample hybrid application so this here is using a standard.net Maui project but if I go into the main page we're going to see that this is using a hybrid webview the hybrid assets are in this hybrid root and it's going to load this index HTML under the raw assets or just HTML and JavaScript so here in the HTML file we can see that I have a simple div that says your message with some input and then here this is going to send the message to C sharp using JavaScript now here we have the document that's going to grab the element so that's standard JavaScript look at its beautifulness and here there is an extension called hybrid webview to send a raw message to.net now in the code behind for my main page I'm able to come in and add this on hybrid webview raw message received event and in fact you see that here inside of my control what this will do is it will take it it'll make sure it runs it on the main thread and it'll display an alert just like we saw earlier so let me go ahead and run this on Windows and the same exactly same true thing would run on Android or iOS in the same experience this is going to use the same controls that the Blazer web you did but of course this is just simple CSS and HTML and JavaScript so I could say hey vs live I'm gonna go ahead and add a breakpoint in here this is going to invoke that method from JavaScript call into my c-sharp and here I can see the message of hey vs live and it's going to go ahead and do a pop-up there it is which is pretty cool and you can send messages back and forth we take a look at a more complex sample which is what you'll see on the GitHub repo I can go ahead and open that you'll see all the source code for the hybrid webview which is all here and a few other examples some more in involved one which shows the interop back and forth back and forth with more code and then additionally a react.js application this is the out of the box react to do application that has a lot of static resources CSS and JavaScript all chunked up that that was just pulled down and tons of logos and manifest files even the robot's text file inside of here if I go ahead and run this application we're going to see that this is the full 100 react application that is being run directly inside of a.net Maui application now in this example it's not really using a lot of nativeness but you could easily integrate those other properties like I showed you so here for example we have all of our to-do lists I can go ahead and check these items we can say present at vs live add that in and we can go ahead and check that off nailed it nailed it now one thing that is pretty cool about this is if we go into this application and we look at the main page notice that actually it's using a blend of native controls and the uh the hybrid controls as well this actually has a data binding here back and forth to the to-do items up top so it actually shows how to not only reuse your react.js application but also blend in some native controls and data binding as well so that's really really neat let's see if I'm going to be real risky and actually run this also on Android and we'll see how that works we're gonna think it's going to work I mean it's too late to start playing it safe so too late now to say sorry we'll see if this works well we do have a dll so that's really good and I like that now I said that last time when I was excited that a dll had occurred how that ended so we all know how that ended yes but ideally this will actually building a pile up the Android application and take all that there now like I said this won't be using webv2 like it was on Windows this will be using the Android webviews and again those are the same web views that the Blazer hybrid control also uses so let's go ahead and compile this up and see that oh we'll see fingers crossed yeah the visuals oh that's happening I see your stuff on the screen what's happening this is what I expected it to do before yes and there's an APK so perfect amazing love it and it found an emulator very cool yeah all right now the nice thing too is that since it's a dona Maui application we're going to see the same launch screens that we saw earlier so here's the launch screens it gets an icon so all that nice scaffolding works the same so you don't have to worry about that that should work and here we go here's our same exact react application we're now running inside of it present add totally good to go and we can see here we have the same exact react application and it's responsive since it's using CSS and responsive styling over there which is really cool and you can filter and do a bunch of stuff so being able to have that flexibility is really really powerful and something that the team is focused on so enabling all developers to build these types of experiences okay now really to summarize not only is Don Maui available today but it's growing in flexibility and ensuring that the framework itself is performant and has the controls that developers need and a vibrant ecosystem around it we have that full offering between Blazer down and Maui and the hybrid stack and that is evolving as well everything is available today inside of Visual Studio visual studio for mac and the brand new vs code preview extension for Donna Maui that gets you up and running and so definitely check it out and give us feedback you can go to dot dot net forward slash Maui to learn more and install visual studio and with that I want to thank everyone for coming out learning about what's new and next with.m Maui and I appreciate it and hope you have a great vs live yeah [Applause] we do have a few minutes for questions so if anyone has questions feel free to raise your hand and I will repeat that as we go question was around additional platform support specifically Linux so right now there's no plans on the books specifically to add more platforms for down in Maui the team is focused on the stability and quality of the product that's there today and then going and adding more platforms from there right the work that you see for a web has been part of the core platform since launch and also is in collaboration with the Blazer team and the web teams there so with the core there for the handlers are focused Javier from the engineering team does have an open source repo where he's been experimenting with Linux from a community fun side project side I'd also recommend taking a look though if your application needs are specifically to deploy on Linux then I would definitely take a look at some of the amazing projects for net that are out there like avalonia or Uno both of those platforms are built on top of the IOS and Android stacks and other Stacks from Microsoft and build a layer that they are going to those other platforms and just like any other platform that's built on it you know there's great Community around it in the world of.net so what I like to say is while we may not support a specific platform that you need to go to there's probably something out there in the world of.net that may work for you I'm actually about to do some awesome videos with Wilderness Labs I have a meadow which is an iot platform for.net and they have all sorts of cool support and avalonia supports that so like put graphics on this little iot board and things like that so in the world of.net there's a lot happening so while we may not support it today um you know there's something out there question here oh great question so the question was with.net8 is the installation process or anything with.net Maui changing um because recently in one of the blogs a team talked about nuget package support for testing out in different versions of Dot and Maui so from my understanding how that's going to work is that I don't think the core of it was going to change as far as the distribution of.net Maui itself with.net it will be optional if you want to install like nightly builds for example of Don Maui you can go into your CS proj file and you can change the version of Maui and it will then go to nuget to download those optionally so out of the box it'll just use what's installed on your machine but if you want to like do nightly builds for example or you need a hotfix you'll be able to pull those in yep good question any other questions awesome cool we have stickers up here feel free to grab as many as you would like for your entire team we don't want to take any back they're just going to stay here forever thanks again and up next I know is Dan in here and Amanda Skinner after that yeah so thank you all so much thank you okay another round
Info
Channel: dotnet
Views: 18,502
Rating: undefined out of 5
Keywords: .NET
Id: aVA7jpIZsNs
Channel Id: undefined
Length: 68min 17sec (4097 seconds)
Published: Thu Aug 03 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.