I am developing a C# based window store app which has GUI developed using WPF.
The application's database is already on the Cloud through Windows Azure, but, I also want to have local copy of it through SQLite
Now, my question is:
How can I synchronize the data between Windows Azure and SQLite?
You can use Windows Azure Offline Sync. This tutorial may help you which states:
Offline support will allow you to interact with a local database when
your app is in an offline scenario. Once your app is online with the
backend database, you sync your local changes using the offline
features.
this video may also help support the tutorial
Related
I am using Azure SDK for Sync local DB with a server in my mobile application. Local DB means it is MobileServiceSQLiteStore from Microsoft. Windows Azure. Mobile Services. SQLiteStore. Offline to Online sync is working as expected.I keep doing all the operations in local DB when the app is offline.Surprisingly all the offline crud operations (insertAsync, DeleteAsync, UpdateAsync, LookupAsync) are very slow in the local SQL lite db than online operations. It's supposed to be very speed on local comparing with Online. Anyone have any idea?
This is not duplicate of below question
Hideous performance using Azure mobile services MobileServiceSyncTable
I am talking about offline crud operations using the Azure Mobile SDK.I am not talking about offline "Sync" when app is online. I had to use the SDK since the app supports both Offline and Online mode. Theoretically if the app is offline all the offline operations should be equal to the operations we normally do with SQLite
I have the following architecture: local C# desktop app with SQL Server Express and a central web app with SQL Server Enterprise, with db per local app.
I need to sync those two databases semi-automatically, but with some controls (and info) from an local desktop and web apps.
For example, I want for user to see when sync start, when it ended, etc. Also, if synced ok or there was an error.
What is the best solution for this problem ?
I see that there are two technologies: merge replication (works only on SQL Server level with no app interference), and discontinued Sync framework, with lots of problems. Should I create my app module for this?
Update: just to note, a web app will be fine without this, however, the reason for this sync is that as I need to have offline functionality, i.e., when network is offline app must work regulary.
I will soon be deciding on a project for my university course and I had one in mind which is going to be a windows tablet application, using the UWP tools in Visual Studio, as I want to develop skills in C# and the Mobile area.
However I will need to have a database behind my application to submit and retrieve data from. Is this a relatively "simple" and common task to do? I'm not looking for easy, I just want something that I can accomplish though without worrying too much over the basics.
My original thought was to have a database on my PC and then host it for my tablet to connect too, but that would require constant internet connection and for my PC to be hosting. After having done a little bit of research I came across something called SQLite, which people seem to think is a good local database to put into the device.
Having no experience with mobile applications though, I was curious as to how I would develop an application on my PC, and then put it onto the Windows Tablet, both using the same database? Would I need to duplicate the database between systems? Or would I write the code up on my PC and then test it on my Tablet?
Again this is an area i'm still new to, database 'hosting' and mobile applications. Maybe i'm just over thinking things, but just by asking the question I can already tell I sound clueless. My experience has been with small WPF applications, Console Applications and Websites.
I will need to have a database behind my application to submit and retrieve data from. Is this a relatively "simple" and common task to do?
I think the answer is yes. As you mentioned, SQLite is a good local database for you to use. Since there are guidance, samples, teach videos for SQlite with UWP, it should be simple and common task for you to do.
I was curious as to how I would develop an application on my PC, and then put it onto the Windows Tablet,
For this you need to Get started with Windows apps. After you finished developing the app on the PC, you can publish to windows store or Sideload your app package, then you can install the app on your tablet from store or through side loaded package.
Would I need to duplicate the database between systems?
The SQlite database is actually a database file with .db or other suffix saved on the local device. Whether need duplicate depend on where you put the database file on. Since UWP app is sandbox and have limitations for access the folder on the device. By default, all apps can access the following two locations, Application install directory and Application data locations. If you put the database file on Application install directory, once you install the app on one device, the database will exist on the install directory and you don't need copy. But this directory is read only means that if your database don't need update and read only you can use. For another location,Application data location there are LocalFolder,RoamingFolder and TemporaryFolder. If you put the database on LocalFolder it cannot be roamed and you need to manually copy or user a cloud server helper you save it for roaming.If you put the database on RoamingFolder it can roam pay attention it has some restrictions. More details please reference File access permissions. In my option, SQLite is a local database, which is using only for local data will be better, I don't recommend you to use it for roaming. If you need a roaming data base, a database on cloud or server side will be much better.
Having no experience with mobile applications though, I was curious as to how I would develop an application on my PC, and then put it onto the Windows Tablet, both using the same database?
You should get start from this document Intro to the Universal Windows Platform. I believe you'r familiar with C# language, you can use C# to develop UWP apps.
As you mentioned, you could use sqlite as local database in your app. You could use LiveSDk's APIs to synchronous database when you switch from PC to tablet.
Here's a sqlite sample in uwp for your reference.
The OneDrive Photo Browser sample shows you how to get data from cloud, it would be helpful to you.
Im am trying to connect a local mysql database which runs on xampp with a Universal Windows Platform (UWP) Application. I couldn't find any examples or tutorials on how to archieve this. In one article i have read that this isn't even possible and only sqlite is supported. Is this true?
I have to do a work for school and one criteria is, that it must have a relational database and another is to support multi-user functionality.
I dont know if it is not possible or am I just to blind to find Informations? Sometimes it seems really hard to get to informations to windows app development.
Did someone make experiences with connecting relational databases to UWP-Apps?
UWP app can connect to any server based database behind a web service. Per my experience, Windows Store app can directly connect to MySQL. Check this. I didn't have a chance to try it on win 10 UWP.
Sqlite is the database if you want to deploy a database to the device along with your UWP app.
I am working on a Windows Desktop Application using C# where files/folders are transferred from web server to a particular user's folder in the computer and vice versa. (Something like SkyDrive where the files/folders from the application is copied to the user's skyDrive folder)
So right now I am able to copy the files to and from the web server if the system is connected to internet. If I create a file/folder offline and the next time I connect to internet I need to copy the newly created ones to the web server. Basically a 2 way sync while offline. Is there any possible way to implement this.? Can I implement this with Sync Framework ? Please help me
Thanks in advance!
Microsoft Sync Framework can fit for your need
A comprehensive synchronization platform that enables collaboration and offline access for applications, services, and devices with support for any data type, any data store, any transfer protocol, and any network topology.
Add sync support to new and existing applications, services, and devices
Enable collaboration and offline capabilities for any application
Roam and share information from any data store, over any protocol, and over any network configuration
Leverage sync capabilities exposed in Microsoft technologies to create sync ecosystems
Extend the architecture to support custom data types including files
Microsoft Sync Framework
SynkToy