My experience upgrading my app, from Xamarin.Forms to .NET MAUI (I should have listened to David)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to another video with me Don Hindus today I will talk about net Maui and my experience when I upgrading one of my apps you may have seen my app called catch logger it is a fishing diary for people like me that likes sport fishing I built it with Samar forms and it's still Sam forms it's a little bit embarrassing to say that but that's true because this is just one of my hobby projects I work with it when I have time and um the latest year I've been really busy with other things I have not prioritized it but I'm working with a net Maui version and in this video I will show you some of my learnings my mistakes what plan I had I have listened to a lot of sessions on conferences about this I've listened to videos and one of the persons I've listened to is David Tino the principal product manager fromn ma in this session on teorama in Belgium last year I listened to his session how to upgrade from Samar into Net 7 so that was one of my guides to do this process so I had a plan I should create a new project because I want to use the single project stuff that are inet Ma you don't have to do that When developing Maui you can continue as you do in summer forms with had the project and one project for shared but I wanted to have the new single product because I think that is pretty nice so when I have created a new product my plan was to move the code step by step take the view models move them to the new project take the views move them to project and take the platform specific code that are necessary move them to the shared project and fix all the breaking code because I guess that there would be some breaking changes and of course it became but um it was not that much so I think I can fix them pretty fast and then my plan was to release the app and then continue with improvements because that was one thing David told me during those sessions the best thing is to get it up running on that met Maui and then continue to make improvements optimize it and so on because otherwise you will never finished so what I did I rewrote my MVM Library tiny MVM you may know about tiny mm is a helper library for MVM that I created for Su forms but I realized I can do this much better for ma some of the stuff is not necessary anymore because ma have improved compared to Su forms I wanted to use um The Source generators and stuff like that that that CES with Community toolkit so Community toolkit now is an um dependency there so with t mm I will just tell you short what I I as I said I added dependen on community toolkit. MVM because I can use the base classes I can use some of the methods there I can use the relay commands I don't need to have my tiny command and so on that reduce the code that I write but I can still have the nice thing that that I have added to Tiny MVM still there so and if you are interested more about tiny mm I also created videos about that so I changed initial St to net Mai netway with a service collection extension so you can just add that to the ioc like that and I used the net di container with t for some informs that with a lot of different provider and you can use it with out but I had one for AAC one for tiny ioc and so on but for net M I wanted to integrate more in the net ecosystem because if you remember s fors did not have any good support for dependence injection they have the I think it was called the dependence Serv but I never like to use that and then I changed the view of model creation to make it more like a pure di way so instead of specifying in the view in the sample with view model you will have with type arguments I changed to that you inject them in the uh Constructor of The View with dependence injection because I that think that it's more cleaner and a way that net developers are used to work so I did that did more things then rewrote my MVM Library I changed to Source generators for properties instead of fod because I never liked to create sets and gets uh and the back field and all that you need to get um property change working so I used fodi proper f. property changed and that is a really good library for Su forms but Source generators are even better I think so I changed that and I used Community toolkit of mm Source generators there really great and I changed in app Messaging library before I Ed Tiny Pop sub that a colleague to me wrote and I also been contributing to that but here I wanted to substitute that with a community toolkit MVM stuff because I already have that dependency and I wanted to reduce the dependencies so and I replaced the map provider and the reason for that is that I have a lot of custom renderers that did stuff with the the map but uh instead of recreating that from myi uh I decided to go with a Maps UI uh library and that means that I have learned that Library I have rewrite all the code uh instead of just creating handlers or use um the compability renderers so the result here was that app is not yet released I have focused more on improving it and make the app better than converting it to Maui that's a good thing because I have a better code now and a better app but it's not yet released so what should I have done of course I should have listened to David I should have con converted it toet Maui first and focus on the conversion then I should focused on improving optimizing when I have done the whole app not doing some migration there fix that code and then optimize that part I can do it step by step step so my learning the plan was good I had a good plan and I recommend other people also to follow that plan but I did not do it myself so upgrade before improving and that means you don't have to release but you should complete that step so you have a new base point to work from if you want to release it if it's as good as it was with Su forms you maybe can release it but you don't have have to but it's good to make that step before you're going and optimize and I should have used compability renders for my custom renderers so that I could have everything working as it did before before I start to change because I don't really improved the user experience by changing the map provider some parts was easier with map UI but the users will not know about what map provider I use in the background of course they see difference if I have different tile provider but I use open street maps both before and now the difference was that I now don't have to write a custom render or Handler for using open street map as I did with the summer forms version so that was short video about my learnings of upgrading from Samar forms to net Maui if you like this video please press the like button subscribe to my channel and if you want early access to video and all the source code that I create for this channel you should be a member of my channel and of course you also support the channel a bit extra if you became a member so see you next time bye-bye
Info
Channel: Daniel Hindrikes
Views: 1,185
Rating: undefined out of 5
Keywords:
Id: gMOFNE_O64U
Channel Id: undefined
Length: 8min 45sec (525 seconds)
Published: Tue Jan 30 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.