Last post Apr 30, 2012 02:32 PM by XIII
Apr 29, 2012 06:30 AM|shehabman|LINK
I have to create a web application that connected to two databases, one local to connect if there is no internet access and one on the server if it's accessable and then synchronize between the two databases so i need somthing like "local databse cache"
in windows forms but works on web pages so no need to creat two UI for the same page .
i'm appreciated for your responses in advance.
Apr 29, 2012 07:35 AM|XIII|LINK
why don't you go for offline storage in HTML5 together with offline caching of your page(s)? In MVC4 there will be something called Singe Page Applications created by Microsoft that'll support such scenarios. To have a good preview of what'll be capable
take a look at this great presentation by Steve Sanderson:
Apr 29, 2012 08:29 AM|shehabman|LINK
Thank you for your reply. but the targeted application is completed on web forms and the task is to make it works offline database in case there is no internet access(Database server not accessable) so i can not start a new application or make a duplication
of the UI .
Apr 29, 2012 08:40 AM|XIII|LINK
you don't have to. If your application is sure to be run in offline storage browsers then you can already make use of it. You could make use of a tool like
amplify.js for it for example to hide all the difficulties and browser specific stuff.
Apr 29, 2012 11:59 PM|atconway|LINK
Apr 30, 2012 06:09 AM|XIII|LINK
You could use a local SQL CE (4.0 version only for ASP.NET support) database for disconnected scenarios
That would imply that the ASP.NET application itself also runs on the client pc, not on the server. I don't know if that's the intent of the OP. If so it could be a possible solution but one I haven't seen in real life besides a couple demo scenarios for
clients by a product manager. The future leans more towards local HTML5 offline storage and detecting if the connection has been restored. If so then websockets can come into play for the synhing of the data.
Apr 30, 2012 06:55 AM|shehabman|LINK
Thank you for your reply. May you please send any link for a sample code to do that for web applications because all samples i have got working with windows forms only.
Apr 30, 2012 07:01 AM|shehabman|LINK
Thank you for your interest, My Manager asked me for not changing the UI so i have to looking for a solution that synchronize the two databases (local one and the server one) by clicking on a synchronize button from my web application without changing in
the current code.
Apr 30, 2012 12:53 PM|atconway|LINK
The future leans more towards local HTML5 offline storage
Agree 100%. It was difficult to tell about all the details of the 'offline' scenario (some situations do have locally installed sites) and the OP seemed they did not want to use HTML5 right now, so I just thought I would throw out another option if they
wanted to investigate.
But yes to clarify, the option I provided would be for websites installed on the local IIS of the client.
Apr 30, 2012 02:32 PM|XIII|LINK
without changing in the current code.
Either you change your client side code for offline HTML 5 storage or you have to convince your manager to have the application to run on the client's pc. That can be done but it means you will waste time with deployments on the client pc's. If it's only
for sales people and it's a small amount you won't be loosing too much time. If it's an application for a big audience you'll likely don't want to waste time with deployments and very likely these people will also not allow to have it run on their pc's. Also
when going for the second scenario it would be rather pointless to have written it in ASP.NET as then winforms/WPF would have been the preferred choice.
I think we can conclude that you best sit together with the product manager and people involved and discuss the different implications. Once decided upon, change what needs to be changed and get going.