Multi-Screen app with shared state


#1

Hi,

the plan is to have an application running on 2 or more displays. There will be a “main” screen and “sub”-screens. Sub-screens should access the main-screens store and share their meta-data (scroll-positions, paging-info, filters, etc.).

The current version performs good in chrome/firefox, but internet explorer has some problems with windows that share objects (null-pointer exceptions, denied permissions etc.).

Has anyone here tried the same, having a multi-screen Ember-App that shares state between screens/displays - running in internet explorer?


#2

Ember Pouch work correct in IE. We use it to share state. I don’t know if it is fast enough for your case. Example, Source


#3

So long that the two apps are of the same domain, you can share state via local storage. I believe there’s even events that fire on value change.

http://tutorials.jenkov.com/html5/local-storage.html#attaching-a-storage-event-listener


#4

I use localStorage for that often enough that I created an addon for it https://www.npmjs.com/package/ember-storage

In particular I use it to store device specific preferences (sidebar hidden/displayed, etc). Inject it onto a component (for example) and then you can do this.set('storage.showMenu', true); and {{ storage.showMenu }}. I can’t guarantee IE support as my main targets are modern browsers


#5

Good point - and nice addon! I just checked your demo and it seems to work really good in IE11 (checked it only in IE11).


#6

Looking into this (apparently years later) and found this online ( https://teamtreehouse.com/library/building-multiscreen-web-apps-with-emberjs ) but I don’t have a treehouse account. Can anyone point me to resources for using Modern Ember (3.1.x) with multi-screen environments?

Thanks in advance. J