
103: Offline Data Sync: Cautionary Tales
04/19/24 • 66 min
The conversation revolves around the topic of offline battle tactics in mobile app development. Jon shares his experience with a pool app that required offline data storage and syncing. He initially used Realm, but faced issues with performance and scalability. He had to rewrite the login service and migrate data to a new backend. Allan discusses the challenges of offline data syncing, including handling deletes and updates, resolving conflicts, and ensuring data security. Jon explains his approach of using Cosmos DB and simple record types to handle offline data syncing. They emphasize the importance of considering the specific needs of the business and avoiding over-engineering solutions. The conversation explores the challenges and considerations of implementing offline functionality in mobile apps. The concept of 'end scars' is introduced, referring to the need to delete or reassign child data when the parent data is modified or deleted. The importance of handling offline scenarios gracefully and providing clear feedback to users is emphasized. The conversation also touches on the use of frameworks and abstractions for offline sync, with a discussion of Azure Mobile Apps and the limitations of such solutions. The benefits of using SQLite and the JSON support it offers are highlighted. In this final part of the conversation, Jon and Allan discuss their experiences with SQLite and offline functionality in mobile apps. They talk about the importance of optimizing app startup time and how SQLite can be a bottleneck in this process. They also share their preference for using SQL and the benefits of using SQLite-PCL-NET. The conversation then shifts to offline functionality and device-to-device communication, with Jon sharing his experience with Google's SDK for nearby communication. They briefly touch on the challenges of offline functionality in airplane environments and the limitations of Bluetooth connectivity. The episode concludes with a discussion on the importance of the SQLite raw library and its role in enabling advanced features like geolocation.
Takeaways
- Offline data syncing in mobile app development can be challenging and requires careful consideration of business needs.
- Choosing the right technology for offline data storage and syncing is crucial for performance and scalability.
- Handling deletes, updates, conflicts, and data security are important aspects of offline data syncing.
- Simplifying the data model and using simple record types can make offline data syncing easier to implement and maintain.
- Avoid over-engineering solutions and focus on meeting the specific needs of the business. Offline functionality in mobile apps requires careful consideration and handling of data synchronization.
- Handling 'end scars' is crucial, ensuring that child data is properly managed when parent data is modified or deleted.
- Providing clear feedback to users about offline status and data synchronization is essential for a good user experience.
- Using frameworks and abstractions for offline sync may have limitations and can lead to loss of control over data management.
- SQLite is a reliable and widely-used option for local offline storage, with the added benefit of JSON support for flexible data storage. Optimizing app startup time is crucial, and SQLite can be a bottleneck in this process.
- Using SQL and libraries like SQLite-PCL-NET can provide more control and flexibility in working with databases.
- Offline functionality and device-to-device communication are important considerations in mobile app development.
- The challenges of offline functionality in airplane environments include limited connectivity options and the need for peer-to-peer networks.
- The SQLite raw library, maintained by Eric Sink, is a foundational piece for many SQLite-based solutions and enables advanced features like geolocation.
People
- Hosts: Jon Dick, Allan Ritchie
- Audio Engineer: Jim Heath
Chapters
- 00:00 Introduction and Setting the Stage
- 01:43 Offline Battle Tactics and Scars
- 08:14 Challenges with Realm and Login Service
- 14:17 Avoiding Over-Engineering and Building Dependencies
- 25:15 Simplifying the Data Model for Easier Syncing
- 27:04 Conclusion and Key Takeaways
- 27:34 Managing 'End Scars' in Data Synchronization
- 29:23 Importance of Clear Feedback in Offline Scenarios
- 32:30 Benefits of Using SQLite for Local Offline Storage
- 37:28 Limitations of Frameworks for Offline Sync
- 48:57 Optimizing App Startup Time and the Role of SQLite
- 50:47 The Benefits of Using SQL and SQLite-PCL-NET
- 51:20 Offline Functionality and Device-to-Device Communication
- 52:21 Challenges of Offline Functionality in Airplane Environments
- 55:18 The ...
The conversation revolves around the topic of offline battle tactics in mobile app development. Jon shares his experience with a pool app that required offline data storage and syncing. He initially used Realm, but faced issues with performance and scalability. He had to rewrite the login service and migrate data to a new backend. Allan discusses the challenges of offline data syncing, including handling deletes and updates, resolving conflicts, and ensuring data security. Jon explains his approach of using Cosmos DB and simple record types to handle offline data syncing. They emphasize the importance of considering the specific needs of the business and avoiding over-engineering solutions. The conversation explores the challenges and considerations of implementing offline functionality in mobile apps. The concept of 'end scars' is introduced, referring to the need to delete or reassign child data when the parent data is modified or deleted. The importance of handling offline scenarios gracefully and providing clear feedback to users is emphasized. The conversation also touches on the use of frameworks and abstractions for offline sync, with a discussion of Azure Mobile Apps and the limitations of such solutions. The benefits of using SQLite and the JSON support it offers are highlighted. In this final part of the conversation, Jon and Allan discuss their experiences with SQLite and offline functionality in mobile apps. They talk about the importance of optimizing app startup time and how SQLite can be a bottleneck in this process. They also share their preference for using SQL and the benefits of using SQLite-PCL-NET. The conversation then shifts to offline functionality and device-to-device communication, with Jon sharing his experience with Google's SDK for nearby communication. They briefly touch on the challenges of offline functionality in airplane environments and the limitations of Bluetooth connectivity. The episode concludes with a discussion on the importance of the SQLite raw library and its role in enabling advanced features like geolocation.
Takeaways
- Offline data syncing in mobile app development can be challenging and requires careful consideration of business needs.
- Choosing the right technology for offline data storage and syncing is crucial for performance and scalability.
- Handling deletes, updates, conflicts, and data security are important aspects of offline data syncing.
- Simplifying the data model and using simple record types can make offline data syncing easier to implement and maintain.
- Avoid over-engineering solutions and focus on meeting the specific needs of the business. Offline functionality in mobile apps requires careful consideration and handling of data synchronization.
- Handling 'end scars' is crucial, ensuring that child data is properly managed when parent data is modified or deleted.
- Providing clear feedback to users about offline status and data synchronization is essential for a good user experience.
- Using frameworks and abstractions for offline sync may have limitations and can lead to loss of control over data management.
- SQLite is a reliable and widely-used option for local offline storage, with the added benefit of JSON support for flexible data storage. Optimizing app startup time is crucial, and SQLite can be a bottleneck in this process.
- Using SQL and libraries like SQLite-PCL-NET can provide more control and flexibility in working with databases.
- Offline functionality and device-to-device communication are important considerations in mobile app development.
- The challenges of offline functionality in airplane environments include limited connectivity options and the need for peer-to-peer networks.
- The SQLite raw library, maintained by Eric Sink, is a foundational piece for many SQLite-based solutions and enables advanced features like geolocation.
People
- Hosts: Jon Dick, Allan Ritchie
- Audio Engineer: Jim Heath
Chapters
- 00:00 Introduction and Setting the Stage
- 01:43 Offline Battle Tactics and Scars
- 08:14 Challenges with Realm and Login Service
- 14:17 Avoiding Over-Engineering and Building Dependencies
- 25:15 Simplifying the Data Model for Easier Syncing
- 27:04 Conclusion and Key Takeaways
- 27:34 Managing 'End Scars' in Data Synchronization
- 29:23 Importance of Clear Feedback in Offline Scenarios
- 32:30 Benefits of Using SQLite for Local Offline Storage
- 37:28 Limitations of Frameworks for Offline Sync
- 48:57 Optimizing App Startup Time and the Role of SQLite
- 50:47 The Benefits of Using SQL and SQLite-PCL-NET
- 51:20 Offline Functionality and Device-to-Device Communication
- 52:21 Challenges of Offline Functionality in Airplane Environments
- 55:18 The ...
Previous Episode

102: You should learn some MSBuild
The conversation covers various topics related to MSBuild and project files. It starts with an introduction and a discussion about the weather. The hosts then delve into the history and evolution of MSBuild, including the transition to SDK style projects. They explain the structure of new project files and highlight the benefits of using CS Proj for managing NuGet packages and CI. The conversation also covers customizing project files for platform-specific assets and the use of conditions in project files. The hosts discuss the importance of workloads and the rationale behind different SDKs. They also touch on the future of workloads and the challenges associated with them. This conversation explores various aspects of MSBuild, including workloads, importing MSBuild from NuGet packages, building custom entitlements, adding items to build from NuGet packages, customizing build props and targets, writing custom MSBuild tasks, using custom tasks and source generators, incremental source generation, and Michaela's MSBuild Editor Extension. The hosts emphasize the importance of understanding MSBuild and encourage listeners to explore and experiment with CSProj files to optimize their build processes.
Takeaways
- MSBuild is a powerful tool for managing project files and building applications.
- SDK style projects provide a more streamlined and approachable format for project files.
- CS Proj files can be customized to include platform-specific assets and configurations.
- Using CS Proj for managing NuGet packages and CI can simplify the development process.
- Workloads in MSBuild provide a way to manage and organize project dependencies and configurations. MSBuild is a powerful build system that allows for customization and automation of the build process.
- Importing MSBuild from NuGet packages provides an easier way to test nightly builds and service releases.
- Customizing build props and targets allows for fine-grained control over the build process and the inclusion of specific assets.
- Writing custom MSBuild tasks in C# can be a powerful way to extend the build system and perform complex build operations.
- Using custom tasks and source generators can enhance the build process and improve performance.
- Mikayla's MSBuild Editor Extension provides helpful features like IntelliSense and package version management for CSProj files.
People
- Hosts: Jon Dick, Allan Ritchie
- Audio Engineer: Jim Heath
Chapters
- 00:00 Introduction and Weather
- 00:20 Introduction to MSBuild
- 01:12 Acquiring Taste for MSBuild
- 03:17 Slim CS Proj
- 04:03 Structure of New Project Files
- 05:12 Default Maui Project Template
- 06:36 Using CS Proj for NuGet Packages
- 07:56 Benefits of Using CS Proj for CI
- 08:26 Customizing Project Files for Platform-Specific Assets
- 09:53 Leveraging MSBuild for Customization
- 10:57 Command Line vs. CS Proj
- 11:33 Importing Files and Directory Build Props
- 12:37 Multiple SDK Imports
- 13:15 Properties and Item Groups in Project Files
- 14:05 Conditions in Project Files
- 19:48 Rationale for Different SDKs
- 22:19 Directory Build Props for Performance
- 24:07 Workloads and SDK Imports
- 26:17 Future of Workloads
- 29:08 Challenges with Workloads
- 31:09 MSBuild and Workloads
- 32:03 Importing MSBuild from NuGet Packages
- 33:12 Custom Entitlements and Build Props
- 34:09 Building Custom Entitlements
- 36:29 Adding Items to Build from NuGet Packages
- 37:38 Automatically Making Apps Work with Libraries
- 38:36 Customizing Build Props and Targets
- 39:40 Doing Build-Related Tasks in MSBuild
- 42:10 Writing Custom MSBuild Tasks
- 44:23 Using Custom Tasks and Source Generators
- 46:19 Incremental Source Generation
- 49:46 Michaela's MSBuild Editor Extension
- 56:19 Getting Started with MSBuild
Links:
Next Episode

104: The one about XAML!
The conversation covers topics related to coffee-making methods and the use of XAML in app development. The hosts discuss their preferences for coffee machines and the process of making coffee. They also delve into the use of converters in XAML and the debate between putting logic in the view model or the view. The conversation explores the use of converters, extensions, and behaviors in XAML and their potential drawbacks. It also discusses the benefits of using compiled bindings and the importance of declaring data types in XAML for improved performance. The conversation touches on the use of XAML in Blazor and the potential future of XAML in web development. In this conversation, Jon and Allan discuss various optimization techniques for Xamarin.Forms and .NET MAUI apps. They cover topics such as compiled bindings, the performance impact of converters in collection views, optimizing XAML layouts, and the use of third-party libraries like Sharpnado CollectionView. They also touch on the challenges of building responsive layouts and the importance of considering platform-specific optimizations. Overall, the conversation provides valuable insights into improving the performance of Xamarin.Forms and .NET MAUI apps.
Takeaways
- There are different preferences for coffee-making methods, from simple machines like Keurig to more complex ones like Chemex.
- XAML can be verbose, and there is a debate about whether to put logic in the view model or the view.
- Converters in XAML can be useful for transforming data, but it's important to avoid excessive use and keep business logic separate.
- Localization in XAML can be done using dictionary strings and bindings, without the need for extensions.
- The use of AI for auto-localization and translation is an interesting possibility.
- In some cases, it may be beneficial to handle certain UI-related tasks in the view, even if it goes against the purist approach of separating concerns. Converters, extensions, and behaviors in XAML can be powerful but should be used judiciously and not overused.
- Compiled bindings and X-bind can be alternatives to converters and provide better performance.
- Declaring data types in XAML can improve performance and enable better IntelliSense.
- XAML can be used in Blazor, but the heavier the reliance on XAML, the more challenging it may be to migrate to Blazor.
- The future of XAML in web development is uncertain, with the web being the dominant platform. Compiled bindings can significantly improve the performance of Xamarin.Forms and .NET MAUI apps by eliminating the need for runtime reflection.
- Converters in collection views can introduce performance overhead, especially when used extensively. It's important to minimize their usage and consider alternative approaches.
- Optimizing XAML layouts involves avoiding unnecessary nesting of controls, using bindable grids instead of content views, and being mindful of the performance implications of stack layouts and scroll views.
- Third-party libraries like Sharpnado CollectionView can provide additional performance optimizations and features for collection views in Xamarin.Forms and .NET MAUI apps.
- Building responsive layouts can be challenging, and platform-specific optimizations may be necessary to achieve optimal performance.
- Consider leaving a review on Apple Podcasts and checking out the Gone Mobile YouTube channel for more content.
People
- Hosts: Jon Dick, Allan Ritchie
- Audio Engineer: Jim Heath
Chapters
- 00:00 The Art of Coffee-Making: From Keurig to Chemex
- 09:39 The Power and Pitfalls of Converters in XAML
- 35:28 The Power of Compiled Bindings and X-bind in XAML
- 45:21 Challenges of Migrating XAML-heavy Apps to Blazor
- 55:17 Challenges of Building Responsive Layouts
- 01:04:59 Leaving Reviews and Exploring the Gone Mobile YouTube Channel
Links:
If you like this episode you’ll love
Episode Comments
Generate a badge
Get a badge for your website that links back to this episode
<a href="https://goodpods.com/podcasts/gone-mobile-433688/103-offline-data-sync-cautionary-tales-59415350"> <img src="https://storage.googleapis.com/goodpods-images-bucket/badges/generic-badge-1.svg" alt="listen to 103: offline data sync: cautionary tales on goodpods" style="width: 225px" /> </a>
Copy