OK so you have been creating Windows apps for ages including UWP. You have developed apps that run on the Windows desktop and the phone. You understand the rudiments of developing a modern UI app MVM etc. You understand PEM, properties events and methods for classes and GUI elements. You understand database CRUD can attach a database to an app using formal database invocation methods. You might even have mastered the Entity Framework and/or have a deep understanding of ORM. Overall, in coding terms, when confronted with a new programming context you know what you want to do and how you do with UWP or Windows Forms; you just need to do it in the new context. Xamarin Forms, bring it on!
I have previously developed an in house Windows Mobile app for data collection. We used Lumia 640s and later on Lumia 950s purely as mobile computing platforms, initially without SIM cards. We used these as we could get them for about $150 at the time and UWP was my field of expertise. The app we developed was an in house app built from the ground up to collect data. The data collected was a library of location base entities. Each entity is a complex set of class instances with most fields being scalar and some fields being a list. So the data was saved locally and on a server when uploaded, as a relational database was a main table list of entities with their scalar properties and keys to secondary tables for the lists. Data such as photos was also collected for each entity and saved as a bag. The app could collect data in the field which when online via WiFi, could upload the collected data or download existing data for further editing. We also implemented GPS code to formally record the location of entities as metadata data and to also optionally encode that information into the photos.
So we have been “informally” informed that Windows 10 Mobile is dead! I have been one of the last exponents of it to jump ship; like I was with Lance Armstrong! We have decided to rebuild the app in Xamarin Forms so that it can run on IOS and Android phones, as well as Windows Mobile. We will use Xamarin Forms as it’s close to UWP in architecture and methodologies. You can write most of the code in shared code used by each of the target specific subprojects in the solution when building for a specific target. You can also include target specific code, usually to do with hardware or to do with target specific coding gotchas. These can be included as conditional compiles within the shared code or within the target specific subprojects.
The current structure of the app is:
The intention is to recreate the app using Xamarin Forms and Entity Framework. Xamarin Forms because of the cross platform capabilities across IOS. Android and UWP with the main functionality in shared .NetStandard classes. EF because entity classes can be implemented in an abstract manner.PS: Just read a query on a site wrt EF, where is the SQLite code!
I have been working through the Xamarin University activities, done a few Xamarin Hands On labs, Dev Days etc. But I want to cut to the chase a bit quicker. In this series of articles, I will outline some of the issues I have encountered, as a UWP app developer, in reengineering the app in the Xamarin Forms context.Remember, I know how to do it in XAML-UWP-.NET. How do I do it in Xamarin Forms?
Articles 1 2 3 4 5 6 Next (Coming)