Much Ado about To-Do

When last we spoke marching orders were given to work the “Backup Collection” User Story. And there are several things to do just to complete this story. They are as follows:

  • Deploy a Realm database to phone
  • Create basic CRUD functionality for an entity
  • Create a backup function to make a copy of the database after update
  • Identify when backup is occurring and when it is complete and expose those events to the UI

I started out trying to deploy a Realm Db to my emulator in the project I set up for this app and it failed for some reason related to running out of memory. This from a database that has no records in it. Googling around I soon discovered that there is not a lot of information for using Realm in a Xamarin application. You can go to the Realm website and they have good reference documentation about it. But there is very little information on what is the best way to do this. The Realm tutorials I took were very focused on Android using Android studio and Java. In the Android world there are very clear threading models and it is common practice to push activities related to Realm to the background and then update the Main Thread where the UI is located when done. I have to believe (but don’t know) that Apple works differently when it comes to threading and so much so that Xamarin does not clearly have a model for doing it in the common code. Now if I had chosen SQLite as my database there are all kinds of example out their for it. However, I am stubbornly committed to a NoSQL approach and I have spent more time than I allocate for a week to try and get to a place I feel comfortable to deploy Realm for real. As a side note I discovered another free NoSQL database called LiteDB which had a major release this past week, it is a lightweight NoSQL database written in C# it looks compelling but it has quite a few issues and some of them are pretty bad. LiteDB has an active development team and while it is not ready for me right now I do hope the project continues and succeeds. For now, I remain committed to Realm even though it is a pain in the A_ _. Summing up this week, I had the regrettable task of informing “the Customer” that the schedule is slipping and since the customer is me I am taking it on the chin. The Software Architect (who is also me) has seen the customer’s pain and knows he is on the hot seat right now…

Published by Boyd Taylor

I have developed software for over thirty years. I am a husband, father, wine collector, and Microsoft technology bigot.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.