Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ASP.NET Web Forms without WiFi
Message
From
25/11/2015 12:56:35
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01627849
Message ID:
01627876
Views:
44
>>>>>>>Hi,
>>>>>>>
>>>>>>>My ASP.NET web forms application is not a SPA application. So it has many pages. How would you suggest to use it when the browser does not have a good (or not at all) WiFi connection to the server? That is, the user may need to open page Page1.aspx, then Page2.aspx, and so on, jumping from one to another. (I have an idea/scope of what to do with the data from another thread). But what about the pages? Do they have to be stored in the local storage too?
>>>>>>>
>>>>>>>TIA
>>>>>>
>>>>>>I was going to suggest using offline manifests (which basically cache a supplied list of pages for use offline) but I suddenly see this is being deprecated which seems rather odd..
>>>>>>
>>>>>>The suggested alternative is apparently 'Service Workers' which I know nothing about - not even sure whether any browsers support it yet. My guess is that, in practice application cache will be around for quite a while (it's on all current HTML5 browsers.
>>>>>>
>>>>>>See: https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache
>>>>>>
>>>>>>I'm going to read what I can on Service Workers and will let you know if I'm any the wiser :-}
>>>>>
>>>>>Thank you very much.
>>>>
>>>>So far I've seen that it's assumed that application cache will be around for a while (i.e. years) and, OTOH, Service workers are currently only on Chrome, Firefox and Opera
>>>>
>>>>https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Browser_compatibility
>>>
>>>My target browser is Safari (iOs) so application cache is the only (known) option. Thank you.
>>
>>Opera Mini seems to be the only (major-ish) browser that doesn't support it with current versions. The 'Application Cache is a Douche Bag' article linked from the Mozilla page highlights a few of the short-comings but none of them are show stoppers.
>>
>>The app I worked on only had about six pages and, of those only three were required to be available off-line (although they included several dialog boxes for data entry). I organised things so that when the device was offline it automatically switched to show the main 'offline' page and disabled options to activate pages that were not then available. A footer always included an indication of the online/offline status. I also implemented a 'setting' which allowed the user to deliberately choose to operate in offline mode even if a connection was available. You may be able to do something similar.
>>
>>FWIW, the simplest explanation of Service Worker that I found : http://www.html5rocks.com/en/tutorials/service-worker/introduction/
>
>Thank you for the link about Service Worker.
>
>You must have a much broader audience for your application that I do. Actually I don't have any audience/customers yet, this is only development stage. But it looks, from talking to my customers, that majority will use either iPad Mini, iPhone, or Android devices. iOs use Safari and I think that Android uses Chrome browser. So my target is Safari and Chrome.
>
>You have an interesting approach of 'switching' pages not available online off. I will have to learn how to do it. Although, ideally, I would like all pages to be available when the device is off line (will try caching the pages). But, again, coming back to your approach of determining when the device is off-line and changing how some pages are available or not is a very good approach. My understanding is that your pages are all HTML5 but my pages are Asp.net forms which often have to post back to the server. And this is the problem I see with working off-line (for me).

Yes - I knew we'd have to allow offline working from the word go so use very little ASP.NET functionality. The pages are all static HTML. The server only has to deliver those pages and send/receive data via WebApi. All of the UI state is handled in angularjs. If you are relying on round trips to the server to update the UI then you will have a real problem. If you can then focus on just those page which *must* work offline and convert them to static pages with local storage.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform