Reputation: 381
Our company recently built a (POS) web application for our clients, but the client needed the application to work both offline and online, depending on the availability of internet connection.cloud based database is using here. The project is used for retail business(supermarkets, shops etc..).
I have no idea, how to work like this.
Anyways, I'm looking for a way to allow my application to run offline and online. The following technologies are used: .NET(layered structure), MySQL, jQuery, javascript, Ajax, HTML, and CSS.
If anyone knows please suggest a way to do?
Upvotes: 0
Views: 1674
Reputation: 60
You can also create a docker file and create image of your technologies for offline mode. You can check this link for offline: How run docker images without connect to Internet?.
Upvotes: 0
Reputation: 473
I would suggest using Progressive Web Apps (PWAs) is the “progressive”. You don’t have to implement every feature of a PWA to consider your site as a PWA. Instead, the idea is that you implement a range of steps, each making your app better for your end-users.
or following this below: https://www.codeproject.com/Articles/1134703/Net-application-that-works-online-and-offline-Sma
https://medium.com/dev-channel/learn-how-to-build-a-pwa-in-under-5-minutes-c860ad406ed
Upvotes: 0
Reputation: 26430
If you need to access cloud data, then that complicates things. You will need to create some kind of synchronization mechanism for when you are back online.
Let's break down the requirement a bit.
What is offline? Can you just fallback to your local networks and access iis or any other web server? If yes, then it's even simpler.
Create your website and have a local internal database to connect to when offline.
Create a daemon of some sort that will consolidate the remote data with the local one. Add some limitations for offline mode, like no history (otherwise the local db will become as big as the cloud one).
Instead of two and if you have no limitations, try https://dev.mysql.com/doc/refman/8.0/en/replication.html
A similar solution depending on the limitations. First you need to identify how the people will access the code without having a web server. The .net part can't be served without one so,
Upvotes: 2