Starting .NET MAUI Development in 2024 - What You Need To Know

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
it has never been a better time to start your journey to become a developer and it has never been a better time to start becoming a multiplatform developer enabling you to develop across a wide range of mobile and desktop devices and share code with your web apps and services and so much more doet enables all of those scenarios andet Maui the multiplatform app UI foret enables you to build across's mobile and desktop devices so if you're starting to look at becoming a net Maui developer in 2024 I want to give you a full breakdown of everything that you need to know to start your journey so tune [Music] iny everyone I'm James and I've been a longtime net developer for almost 20 years if not longer at this point and I've been a Don Maui and zamon forums and zamon developer beyond that for the last 13 years building iow Android Mac and windows applications with C withn Net and leveraging all the Knowledge and Skills that I have known for years as a c developer and if you're starting to look at building IOS and Android Mac and windows applications you want to do it all in C and.net well I'm going to break down everything that you need to know to get started and the first thing here is that donet Maui is part ofet and by being part ofn net it means that you can build iOS Android Mac and windows applications all inside of c and with all of your favorite net libraries that are out there today C is used by millions of developers across the globe and net power is some of the most powerful applications that you use every single day from Microsoft and from companies around the globe now donet Maui is the multi-platform appui and what it includes is several components there's sort of base layers that net Maui includes which is sort of the fundamental core platform support for iOS Android and mac and then net Maui Builds on top of that a crossplatform layer for you now in addition to iOS Android and Mac there's also windows with wi ui3 which is the latest Windows technology to build a Windows applications so you can think of like this you have those four building blocks and all of those building blocks you could go ahead and develop apps independently whether you're building with.net Maui for just iOS with Native iOS UI storyboard and Android XML files and um Mac storyboards as well um or over with wi UI and zaml so you can do all that and with Don Maui you get those iOS Android Mac bits for.net and you can go ahead and access those native apis and build those native UI controls you get all the packaging all the bundling all the support that you would expect as just as if you were developing in Swift or in cotlin or Java objective or anything like that now foret Maui though the most important part part is that it takes those base layers that are included and it builds on top of them and it gives you crossplatform UI app infrastructure project support image support icon support splash screen support and it additionally gives you crossplatform access to tons of apis directly in those native platforms so what that means is that as a developer you don't have to go learn the individual components Al that is very helpful to like actually dive through the documentation when you're trying to do something specific for iOS or Android but you can learn a single API build out your user interface directly in C or in zaml an XML markup language which you'll often see you can build everything in C 100% as well never touch Amo if you don't want to and there's great helper libraries out there and then what happens is when it is running your application it runs youri application in that that sort of native host that has already been exposed so that UI is just rendering native UI components on the different platforms which is really really great which means you get just a native IOS app which can run iOS on iPad on same thing on Android on Android tablets anywhere you want and then additionally on Mac that is a Mac Catalyst application that enables you to run your applications directly on a Mac and then on Windows you get a wiu I3 application so once you bundle up that application you can deploy and debug anywhere that you want whether you're on Mac windows or Linux I'll talk about the development environment here in a little bit but on top of that you get that UI layer so you have a button which would then create a UI button or an Android button or a Windows button or a Mac button uh and you get one API that you develop against with properties and actions and events that are on it and then you get to build out your entire user interface for your application with pages and tabs and carousels and Collections and lists and tons of controls that are built directly in to net Maui now I said also though if we take a look at the project system you get a bunch of other things in there as well like crossplatform images and you get crossplatform resources for styling your application icons Splash screens assets and so much more that doet Maui handles all together now in addition to that donet Maui also includes something that we often call Maui Essentials um but the essential kind of toolkit is built directly into D Maui and what it does is it gives you access to tons of native apis that are inside of the platform such as geolocation uh sensors um Compass support um you also have connectivity support email SMS things that often every application needs and this is great because theet Maui team has taken those apis that are available individually that you could write inside of C remember those iOS Android and Mac sort of uh bindings if you will that are enabled there give you access to those apis in C but the dama Maui team has already abstracted tons of common things that most applications want to do so you can take advantage of that right away in your application so you get one API to access geolocation and of course if you need special functionality that only iOS or Android uh exposes you can still access those apis natively now finally here what's really cool is that there is a single project support built in so if you're building often multiplatform apps you think you have like a platform and a project for every single one right just with donet Maui everything is included in a single project inside of Visual Studio or Visual Studio code that enables you to automatically just toggle between your deployment targets everything is scaffolded out for you so if you add an image that image is added to all platforms which is really nice and it means you can additionally conditionally compile code so you can just write Android code in the Android folder or you can write iOS iOS code in the iOS folder and that is super duper nice so at a high level that is what net Maui is it enables you to build multiplatform applications and it's also interface based which means other platforms can adopt net Maui so for example Samsung adopted net Maui for their Tien platform so when you actually create a new net Maui project you get tyen support built in if you want to deploy to tyen devices you can do that so that at a high level is what donet Maui is but let's talk about what's new inet Maui that you need to know inet 8 all right let's talk about what's new in net 8 for net Maui developers now there is tons that were built in this is a big stability release a long-term support release or LTS you often hear it called and there was tons of performance improvements now remember net Maui is integral in integrated into net itself which means that when you're getting new features of C you're getting improvements in net itself you are bringing those into your net Maui applications automatically now on top of that the D Maui team spent a lot of time specifically focusing on a bunch of different quality improvements um going ahead ensuring that things just lay out and perform better and optimize on the latest releases and there are tons of quality improvements here and tons of new support for things like keyboard accelerator uh Point Gest recognizers um drag and drop recognizers for desktop and mobile devices and you can see it here running directly on to the IOS as well so you get these nice beautiful Dragon drops and you get tons of performance and memory optimizations too so here for example we can actually scroll through Jonathan Pepper's beautiful blog post of all of the different support that has been built in not only new features such as native aot uh for iOS um stripping after aing on Android and marshalling methods you also get all of these amazing performance and app siize improvements handling and fixing a bunch of memory leak issues and so much more this is really cool because you can see in detail exactly before an after app size um um of enabling these different features and he goes deeper into a lot of the intricacies of how all this works under the hood so if you're interested in all of that give it a look what you can see the team is driving for is specifically Bringing Down the app size while improving and speeding up the startup time so here for example we see the older aot and the new native aot features of iOS dramatically dropping down those different startup times so that's something to take a look at and there's great blog post I'll link to all of this today what's really great is that it's super easy with the donet installer just a simple workload and one of my favorite features that I talked about in a previous video was that now with net 8 and net Maui you can more easily pin the version number that you want to use of net Maui previously it was just whatever net 678 that you had installed and that's still the default but you can go in and override that and you can configure a nougat feed that theam Maui team uses so you can use the default one or you can opt into nightly builds which is super duper cool so that means if you're looking to get started with net 8 and net Maui now is the perfect time to jump all in and get ready now one thing that you may um be wondering is what if I'm an existing zamon zamon forms developer what do I need to know well there are a few subtleties between obviously dm with a single project and some of the new defaults that are in the box and then additionally kind of some bundling and optimizations that the teams have but a lot of your existing knowledge of course of all C and that zaml or C Zam forms knowledge will come over there are some tweaks and tunes to the properties and the events but in general you'll feel very comfortable now if you are coming from an existing zamon or zamon forms project you might be saying well how do I upgrade well there's the Upgrade Assistant I have a video right here on my YouTube that walks you through the process of taking an existing zamer forms app and migrating it over to n Maui I'm doing that for my production applications I've been doing live streams here actually showing how I am taking my real live production applications with all the dependencies not just file new and walking you through it now on top of that though the team has a great guide over here we can see what project type did you have and how do you bring it forward so if you have an Android iOS Mac or tvos application it'll show you how to bring it forward and upgrade it to net 8 additionally here it will show you how to bring over a zamer and forms project and you can use a multi project or that sing single project now here this will walk you through the process of everything that you need to know and how to upgrade it there is manual kind of process that you can use or you can use the Upgrade Assistant which is a tool via the command line or built directly into Visual Studio 2022 now in addition here there are many other projects you might have like app extensions Android Weare applications binding projects and so much more and you can easily bring them over so this is really easy to do and take advantage of it um and get up and running um if you have an existing app now let's talk about where you will be developing when you're actually naturally getting started with n hour you're like hey I need to install something to get started and that is correct now I mentioned earlier you can develop on Windows Mac or on Linux and there are different flavors of what you can develop on those different platforms let's first talk about the IDE support there is specifically multiple idees that support dynami both from Microsoft and additionally from other companies as well so first off the IDE that I use the most or the integrated development environment um is Visual Studio 2022 there's a free Community Edition that you can use to build net Maui applications and uh there's other Pro and Enterprise versions as well if your company has that and visual studio 2022 basally enables you to develop all sorts of different applications whether it's net applications C++ python applications uh Unity games anything like that there's amazing support built in for building these applications bringing them to the cloud and doing so much more it's my favorite IDE I've been using it for decades at this point I absolutely love it and there's worldclass support for donet Maui inside of Visual Studio 2022 including hot reload support live visual trees live previews um template support intellisense support so much more that you could imagine when building your application and and it's a premier experience when you're doing so now when you're building on windows with Visual Studio 2022 the scenarios are that you'll be able to easily deploy obviously to your Windows device to an Android uh emulator or physical device and then additionally there's a piece of technology called iOS hot restart there is I like to call it iOS local deployment this enables you to plug an iPhone directly into to your Windows machine and as long as you have an apple developer account you can automatically deploy and debug that debug developer build on your iOS device I have a whole video here showing you how to do that and then additionally if you do have a Mac machine you can actually remotely connect your Windows machine to your Mac machine and that will enable you to debug on an iOS simulator there also remoted iOS simulator so an iOS simulator can pop up onto your Windows machine or you can have it pop up on your Mac machine or you can plug in an iOS device into your Mac machine lots and lots of options it's very very flexible in that regard now beyond that there is Mac support and Linux support as well with Visual Studio code now previously we had visual studio for Mac but that has been um retired um based on when you're watching this it still may be active or coming up for retirement so going forward looking in 2024 the place that I would start would be Visual Studio code now this of course has net Maui support for Windows Mac and Linux and if you look at the in station guide here will see the visual studio code now at TI of recording this the extension is still in preview but the team is actively working on this and I expect it to GA hopefully soon here but once you install Visual Studio code you get the net Maui extension which includes the C dev kit and the C extension so you get all those goodies built right in now what this means is that if you're on Windows you'll be able to deploy to Windows and Android devices it doesn't have that hot restart or local deployment option repair compared to Mac but you can still debug locally to your Windows and Android devices now if you're over on Mac you have a little bit of flexibility because you'll be able to deploy to Android to iOS and to Mac which is really nice because you're on a Mac machine you have IOS you'll need to install xcode over there of course to get the iOS simulators and you'll have some additional setup for Android like installing Android studio and that uh different um emulators and sdks and things and then on Linux there is support for developing Android applications because Google has the Android sdks and emulators available what's great here is that this walks you through everything that you need to know to actually install Visual Studio code and all of net 8 and the net Maui workload here's on Mac OS everything that you'll need including xcode the jdk and installing net Maui over here as well and on Linux same thing all of the different pieces that you will need to get up and running now Visual Studio code because it's a lightweight code editor does doesn't give you like a oneclick install everything Visual Studio 2022 does there's literally a button that says give me. and it installs everything for you automatically if you're coming from VSS C there's a little bit more setup however the extension does handle walking you through the process very very nice so definitely check that out there now I mentioned there's also additional idees that you can use of course visual studio for Mac is still supported up until a time frame based on when you're watching this video but also Jeet Rin has Rider which is a multiplatform IDE as well that haset Maui support built in so no matter where you want to develop or what you want to develop on there are options for you and there's going to be a great experience to build those multiplatform apps hey if you're enjoying this at all and you're excited for more net Maui and net content make sure you thumbs up this video it really helps the channel and helps this video and more people find it and if you're interested in more like I said jam on that subscribe button so you get updated every time I put out a video right here in my YouTube one thing that has come a long way just given time is The Amazing ecosystem that has built up around D Maui that means if you're starting development right now in 2024 you have an amazing collection of different UI components and 2D and 3D Graphics engines that you can just pull directly into your daui application from different control vendors or from the community additionally there's a vast amount of different plug ins that you can take that access native capabilities in addition to Maui Essentials one great place to start is the awesome net Maui repo from Javier who's an engineer on theet Maui team this gives you all great resources like contents and books and workshops gives you all these great samples if you just want to see like hey what does a podcast app look like or a planet application look like or a YouTube player look like there's full workshops there's different tools that you can go ahead and pull down and there's different components as well for the UI so here we have like you community tool kit we have these acrylics we have a loha kit we have Carousel views Maps um color Pickers um different control types uh UI testing different panes that are in here uh virtual lists my favorite might be this live chart uh which is absolutely fantastic that gives you all these beautiful charts and graphs that are all built in just absolutely stunning and there's all sorts of different ones built in right here and you can just browse through find some add your own if you're building some as well so there's something that you're looking to add to your app it's probably around additionally here there's plugins so here's things like camera and some um um um inapp billing and bindings and Shake detectors and data forms and page resolvers and audio and Recorders and local notifications all these are all built-in so you can just grab them some are really small doing one specific thing or some are really large for example shiny is one of my favorite libraries that gives you access to Bluetooth um gives you to um access to local push notifications uh Beacon support Geo fencing background jobs and so much more so there's tons built in there now in addition to that I mentioned the net Maui Community toolkit this is uh an official uh Community toolkit from Microsoft and from the community combined up under the Community toolkit brand now you can also Leverage The Net Community toolkit and the nvvm community toolet which is one of my favorites as well this gives you all sorts of things such as alerts like toasts and snack bars animations behaviors that are built in here you have different uh Pickers like folder and file picker and speech DET Texs you have extensions like keyboard extensions image sources layouts like Doc layouts views that are in here like a lazy view an expander drawing views and of course you have the amazing C markup which really simplifies going in and writing csharp first user interface so all sorts of amazing things inside the D Mai Community tool I absolutely love it it's essential to every application but I mentioned great components from vendors as well so terer for example has an amazing toolkit foret Maui giving you just about everything that you could possibly want inside here just so many controls charts Pickers uh slide views borders everything that you can imagine accordion sync Fusion also has a beautiful array of net Maui controls that you can just plug directly into your net Maui application they're continue to build that out we have component one as well enabling you to drop in tons of amazing components directly into your application you have Grail kit which enables you to have a fully themed application this is one of the Premier ways of building zamon forms apps and now for Mai as well they have Grill Studio have all sorts of amazing stuff just absolutely stunning to pull into your applications there's so much more uh Dev Express for example is a free toolkit as well just so much great stuff built in there's great stuff from the community I mentioned earlier we took a look at the live charts Aloha kit from Javier again is amazing uh uh different layout here he even has like a figma to lwh Hawk kit conversion UI kit which is cool there's template Maui which gives you templated controls so you can easily um build out uh your own templ controls Library here with all sorts of different things built in he has an animation library for it as well to do things such as like bounc in flip rotate scale all sorts of things really easily directly from zaml or from C and not to mention there's a full 2D Graphics Library built directly into net Maui with Maui Graphics this gives you all sorts of different 2D Graphics built in the Box you have a full canvas that natively renders out so you have all the different shapes that you can build over here so if you want to do um um you know Different Strokes ellipses geometries lines paths polygons those are all available so you can pretty much build out anything now in addition I to Maui Graphics there's also support for skia Sharp and there's of course skia sharp for net Maui controls there's tons of amazing things that can be built with both Maui graphics and skia sharp that have been out there today so so much tons of great stuff and this really supports just about anything so no matter where you want to develop and deploy you can go ahead and do that there now in addition to that I said there's also 3D game engines a Jorge over here um from the uh plain Concepts team built something called everen which gives 3D Graphics that you can just plug directly in to your application it works pretty much everywhere so it has um PBR rendering it's component based it gives you a full physics engine for simulations postprocessing uh particle effects and so much more and he walks you through how to add just a single line of code to get that up and running and then as you walk through you'll see that you'll be able to now only create a new everen project but you can bring in your 3D assets your things directly into yournet Maui application with that single deployment here and here we go you're able to bring in those assets automatically and there's great samples as well such as the uh ever sneaks which is a beautiful 3D Graphics application now on top of that um Javier again um has been working on RVE which is a uh runtime to do 3D and 2D animations as well you can take a look at R over here for net Maui which is really cool just enable you to go ah and bring those in to your application now finally I want to mention that there's tons of great places to get started I told you the awesome net Maui but Javier also has theet Maui Showcase of different UI examples built from Microsoft from the community and from different companies as well so you can just browse through here and take a look and you can find all of the different source code directly on GitHub for these different projects so you might be looking to start something off and you're like hey this is kind of interesting may I want to build something like that you can go ahead and get inspired and see how these applications were built so there's tons of different applications that are stunning with great animations that are ready to go as an example of great beautiful donet Maui applications all ready to go and I just love scrolling through these and seeing them all the time so there is an amazing ecosystem in and around. for you to take advantage of today and I just mentioned some of these things I'll try to add links to every single thing in the show notes below so you can tap on them and explore them more now you might be saying James I'm a web developer I don't want to learn a bunch of zaml or building uis in C I'm a Blazer developer I want to leverage my blazer knowledge and build hybrid applications and the answer is with donet Maui there's amazing hybrid support built in it has full support for Blazer hybrid which enables you to reuse your Blazer components directly into a net Maui application that means that you can then build your Blazer web application and share those components and host them inside of a native D application deploy to iOS Android Mac and windows so you can share a vast amount of your UI and your logic and still access native capabilities of those devices what's great is that when you bring in those components it's going to use the native web controls on the different platforms but you have the ability to mix and match native UI and web uui directly in this hybrid application I have a video here walking you through everything you need to know to get started with blazer hybrid today and additionally there's lots of experiments that the team are doing to bring in other types of web uh Technologies into Damu itself there's an experiment called the hybrid web view which I also have a video here on my channel that walks you through everything that you need to know to bring in things just like just normal HTML and CSS and JavaScript or bring an angular react directly into your application so if you're looking to build build hybrid applications with d Maui it's built directly right in and you're totally good to go now you're saying James I'm ready to dive in let's do this I want to start learning D Maui where do I go well there are amazing resources available one that I get to work on at work at Microsoft uh is Microsoft learn which I love which are in free interactive self-guided modules so this enables you to go through and learn about creating UI layouts in zaml building shared resources multi-page applications consuming rest working with SQL databases this gives you a full walkthrough an exercise base so you learn about it and then you do it you learn about it then you do it and the first activity you built an entire phone number translator application it walks you through everything that you need to know from adding the logic to adding the UI and how to get everything set up on your machine and by the end you have a full application that can run on any of the different platforms which is really really neat now if you're more of a visual learner and you like to follow along the videos well there's tons of great content theet team has tons of beginner video series for all ofet so if you're looking to just learnet or C want to mix in a little AI you have it over there here we also can see that we have full Blazer hybrid that's me right there full walkthrough and other things like C and visual studio or vs code and we also have my D map Maui beginner Series 2 these are amazing resources to get you up and started building AET Maui application and learning mvvm and data binding and navigation and everything that you could imagine I also mentioned here that we have Blazer hybrid so if you are coming in there's full Blazer hybrid getting started beginner videos that'll walk you through everything so there's a nice and bite size you got eight minutes 15 minutes it's going to get through this in an hour or so and you're going to be off and running have some general knowledge now I will say on my YouTube one of my most popular videos here with over 600,000 views is my full beginners course to learn.net Maui this is a 4our long beginner Workshop that will take you from start to finish and buildingi applications you learn just about everything that you need to know from the basics of 100 and 200 and then you can go off and learn more now there are great resources here of course on my YouTube so if you want to go a little bit further you want to learn more about just really really Basics I have a full beginner uh tutorial I have more videos on Blazer hybrid on mvvm datab binding and Scaffolding and so much more it's all there now I mentioned that workshop and this is the workshop that you actually go through over here so as you scroll down we can see there's six different parts of that 4-Hour workshop and it takes you through not only setup but here it also takes you through single page list of data mvvm and data binding navigation platform features collection View and theming your application so there's tons of things built right in there now finally I'll leave with this one which is Gerald's amazing learn.net Mai rebone again I'll put links in the show notes below he has this great setup of learning resources so if you're interested in blogs books code social media videos and others so say hey I just want to watch a bunch of videos where should I go he walks through the bit the main uh official channels and YouTubers and twitch streamers that are doing a bunch of cool stuff and a bunch of LinkedIn learning material as well you're like hey I'm really interested in books whether written or ebooks you can scroll through and take a look at all the books that are available today in English or even non-english books as well which is really really cool so you have all that available right away if you're looking for people to follow well don't worry he's got a great list of people to follow official and non-official wherever they are at on GitHub or on Twitter wherever you're at so definitely take a look at that and he has great other links here to of all to learn live videos learning paths documentation and so much more so definitely if you're looking to get started with d today there's amazing resources to give you everything that you need now the last thing I want to talk about is hownet enables you to really build and deploy for anything we've talked a lot about net Maui how it enables you to build for mobile and desktop for iOS Android Mac and windows leveraging those native platforms underneath that it gives you access to in net but with net of course you can build for anything whether it's games whether it's AI whether it's web services Cloud native Services iot devices and so much more and for me using net ma which I adore I often build out sometimes just mobile apps for IOS and Android sometimes just desktop apps for Windows and Mac and sometimes all four and sometimes I have hybrid applications where I'm sharing stuff with the web it is giving me the flexibility for my applications but I recognize probably you recognize the community recognizes that every application every customer every company every scenario is different which means that you need something that will fit your needs and the great part here is that net is really flexible and there are amazing things from Microsoft and from other companies and from the community that enable you to build for even more platforms based on what you need so I think D Mai is perfect for me if there are other requirements that you have for example maybe you do need to deploy onto Linux or maybe you have a requirement that I need to deploy on every single thing from one codebase and that's the only thing my boss is going to let me do and I want flexibility to go everywhere I want the web I want this and that there is something out there for you amazing Frameworks like avalonia UI which enables you to build out those crossplatform applications with net leveraging those core underlying platforms just like d Maui is built on top of and part of gives you access to that uh Avalon has been around for a long time and it is sort of proven on the WPF app model and they have a really cool service like the xpf app that enables you to take a WPF app and move it forward over there so definitely check out avalonia UI and they have great integration to all your favorite IDE if you are coming from the windows world the Uno team enables you to build again crossplatform apps that run on a bunch of different uh uh platforms and Hardware and different Integrations into different editors as well Uno though is built with winui first in mind so that is what it gives you so if you're coming from a wiui approach they take that and they translate it over into the different platform so it gives you that unification as well now note though that every single platform is a little bit different you know D Maui took the approach of using and leveraging Native controls when it's a default rendering system now of course you can build your own controls like we've seen as well that do all sorts of things including custom drawing whereas avalonia and Uno do more of a custom drawing system for more of a pixel identical system per um operating system that it's running on So based on what you need different accessibility options different styling options different background of what you're used to know that withn net you have that flexibility I love net Maui I love net and I think no matter what framework you're using and you're building with with there is amazing potential in 2024 and Beyond as new versions are released of all this amazing Frameworks that are out there for you that's my 2024 update and overview for donet Maui development hope you found this video insightful enjoyable just a little bit and if so make sure you give it a thumbs up Jam that subscribe Button as well I really appreciate it I look forward to putting out more videos right here on my YouTube so until then Happy coding show me all of your awesome Don Maui applications that you're building Below in the comments if you have any questions write down there as well until next time thanks for [Music] watching
Info
Channel: James Montemagno
Views: 21,392
Rating: undefined out of 5
Keywords: .net maui, dotnet maui, maui tutorial, .net maui 2024, visual studio maui, vs code maui, visual studio code maui, xamarin, xamarin.forms migration
Id: 02pjHAXYK6s
Channel Id: undefined
Length: 35min 18sec (2118 seconds)
Published: Fri Jan 19 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.