Build Your First Cross-Platform Mobile App - .NET MAUI Tutorial Step-by-Step

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so you want to build your first donut maui app well you've come to the right place settle in sit down and um let me tell you all about don and maui and how this crash course is going to work [Music] so what is dotnet maui.net multi-platform app ui or dot-net maui for short is a cross-platform framework for creating native mobile and desktop apps with c-sharp example build right into dot-net as i've done at 6 and up using dot at maui you can develop apps that can run on android ios mac os and windows from a single shared code base how amazing is that you might not even realize but you might already know about.net maui in the form of xamarin forms that maui is the evolution of xamarin forms extended from mobile to desktop scenarios with ui controls rebuilt from the ground up for performance and extensibility if you've previously used xamarin forms to build cross-platform user interfaces you'll notice many similarities with don and maui however there are a couple of key differences using don and maui you can create multi-platform apps using a single project but you can add platform-specific source code and resources if that's still what you need one of the key aims of don and maui is to enable you to implement as much of your app logic and ui layout as possible in that single code base so how does done and maui do its magic dynamic unifies android ios mac os and windows apis into a single abstracted api that allows a write one's run anywhere developer experience however when needed like i just mentioned you can still reach into those platform frameworks and leverage every aspect of each framework dot net provides a series of platform specific frameworks for creating apps dotnet for android.net for ios.net for mac os you might previously know them as xirman.ios xamarin.android and we now have windows ui also known as wind ui let's have a closer look at how this all ties together everything starts with your app code this is where you want to spend all of your time being productive this is your business logic this is your app your billion dollar idea but to get there we need to go through a couple of layers the first layer of the technology cake is the native platform sdk this is what google apple and microsoft ship for those platforms for you to work with so how do we get from our net app code to those platforms and running on devices first we need something that can run.net code the.net runtime for ios mac os and android this still uses mono and it uses core clr on windows but that's not really that important we'll get to that in a minute next we need a common.net api we can write our code against and that's the base class library or the bcl new in dotnet 6 is that all app runtimes so mono and core clr that i just mentioned use the same bcl to use.net against native platform sdks we need a net representation of them we do this via bindinga.net api and implementation to the native api when you call a native method from c-sharp it's just as if you had done it from objective-c swift java kotlin c-plus plus whatever the final layer of the cake that really makes it delicious is dotted maui done maui provides a rich library of controls layouts and services that work across all the platforms supported so you need to only master one api to get all the native apps with dot net maui all of that complexity is delivered in a single framework that gives you access to all of this so if you learn how to work with don and maui you can then focus on the only thing that is the most important your app code down at maui apps can be written on pc or mac and they compile into native app packages android apps built using.net maui compiled from c-sharp into intermediate language or il which is then just in time or jit compiled to a native assembly when the app launches ios apps built using gun and maui are fully ahead of time or aot compiled from c-sharp into native arm assembly code mac os apps built using don and maui use mac catalyst a solution from apple that brings your ios app built with ui kit to the desktop and augments it with additional app kit and platform apis as required windows apps builtwith.net maui use the windui library to create native apps that target the windows desktop so let's address the elephant in the room right for developing ios and mac os apps you will still need a mac at least somewhere in your development pipeline there are ways to go sort of around it with microsoft's product hot restart that allows you to debug your ios apps on a physical device straight from windows or you can rent a mac through a cloud service but the best experience will always be to have a mac you can still use that mac without ever having to use mac os you can build your apps through a mac that is somewhere on your network we'll see in the next video how to set that up for your development environment so you can just have it in your network connected to visual studio and you can kind of build from there and never have to work with mac os if that's what you want now another elephant in the room there seems to be a whole herd here might be can i use visual studio code to develop dot and maui apps and the answer is kind of yes and no because dot maui is part of net now and thus part of the cli tooling developing and running it through vs code somewhat works however microsoft also announced that for the time being at least only visual studio and visual studio for mac will be officially supported and will have the best experience for developing.net boundary apps so what does don and maui have to offer you well the short answer to this is everything you need to build your billion dollar app idea and because dot and maui is the successor of xamarin forms that has been around for almost a decade now a lot has already been implemented this includes more than 40 pages layouts and controls that you can use from both c-sharp and xaml as you might have been used to from other xaml based ui frameworks data binding is there to make sure that you can separate your code from your ui and implement the mpvm pattern successfully everything you need for navigation animation continuous integration and deployment support so you can release your app from your repository straight to the app stores use svgs for images icons splash screen the ability to reach into 100 of the platform apis in case down at maui didn't make an abstraction for the thing that you want to use yet and much much more now all of this goodness is offered through a single project approach that uses multi-targeting this might sound a little bit complicated but later on we will dive in deeper and see that it's actually not as complicated as it sounds you might have noticed that i mentioned mvvm but a big part of the re-architecting that has been going on for dotted maui is to make sure that we now also open the door for other design patterns for example there is already a project that is called comet that allows you to write mvu style applications just like swift ui and jetpack compose do now the last thing i want to mention here is essentials if you have been working with xamarin before you might may you probably know about xamarin essentials essentials offers all kinds of abstractions for platform apis like access to location services getting information about your app or device using flashlight all kinds of apis and sensors that are coming across platforms actually i should say the functionality formerly known as essentials because the name essentials has gone away and all these apis have just gone up in done at maui which makes this ui framework even more complete than ever later on we will learn where all these essential apis went and how to actually use them now let's talk a little bit about this course and how it is put together this course will follow a workshop that is kindly created and shared by our mutual best friend in the entire world james montemagno if you've been working with xamarin you probably know that name the workshop consists of seven parts and i will add a couple of videos in the beginning at the end for instance how to set up your development environment and a video right at the end to point you in the right direction to continue your don and maui journey yourself you can find all videos in a convenient playlist on my channel and make sure to look below to find a link to that playlist or the other videos this course works best if you follow all the videos from start to finish in the right order now will this course touch upon every little detail there is to know about don and maui absolutely not there is a lot a lot of ground to cover here and it's impossible to create one course that works great for everyone i think this workshop from james does a great job at explaining the fundamentals of.net maui apps and that's why i decided to turn this into a video crash course but with this app you will definitely learn about the foundations of building an app with don and maui or your first app with that and maui in this course you will learn how to set up your development environment for that maui display rich data including images that are retrieved from a remote location on the internet we will touch upon the basics of mvvm and how to use that in your app learn about navigation using platform-specific features working with the collection view how to implement styling and theming that supports supports both dark theme and light theme with dot-net maui app themes and much much more now together with this app there is a github repository with all the code that you're about to see and depending on how you learn best either code together with me and implement all these things or just review the code at your own pace totally up to you the repository contains the code for each step so if you get stuck no worries just have a peek at the next steps code or start from there if you get really stuck sounds complicated no worries you got this let's get started here let me actually help you navigate this course click here if you want to go to the next video directly or have a look here at the full playlist and see what you can expect and of course check out here if you have subscribed to my channel so you'll be the first to be notified of new content directly see you on the other side
Info
Channel: Gerald Versluis
Views: 31,981
Rating: undefined out of 5
Keywords: .net maui, dotnet maui, .net 6, .net 6 maui, dotnet maui tutorial, .net 6 xamarin, dotnet maui getting started, .NET MAUI crash course, .NET MAUI workshop, dotnet maui workshop, dotnet maui full course, .net maui full course, learn .net maui, learn dotnet maui, net maui, crash course, .net maui tutorial, c# maui, .net maui essentials, what is .net maui
Id: mgW6xviirQk
Channel Id: undefined
Length: 10min 25sec (625 seconds)
Published: Mon May 09 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.