It seems well documented, I can't speak of quality as I never used it before.. but given that they are going to use the produced components in ionic, they must have considered several factors before deciding on a library, first of all cross browser compatibility and performance
me too, this is a really important technology, with support from Chrome and Mozilla, Edge and Safari would go further into irrelevancy if they don't support it. I am just puzzled as to why it is so hard/flaky to add a proxy to a browser.
Apple just agreed to add full support for service workers in safari, they'll come in next version. Microsoft announced they'll support even as installed apps in a native window (much like an electron shell provided by the SO)
From the docs: Stencil uses a dynamic loader to load the custom elements polyfill only on browsers that need it. With this polyfill Stencil's browser support is Chrome (and all chrome based browsers), Safari, Firefox, Edge, and IE11.
but these polyfills include service worker support? It's not so clear
Well, can't find anything in the polyfills for service workers (and I don't know of a full SW polyfill out there), so I can't find a connection between the list of supported browsers, and the usage of service workers in a stencil component...
I can't investigate more now, I'll let you solve this "mystery" if you'd like.. ;)
probably if you (component dev) decide to use SW in your component, you'll simply lose broader compatibility
Even for native apps the concept of service worker (proxy) would be a nice addition. When you look at workbox, there are so many strategies that native apps simply don't support (not to mention the annoyence of having to update your apps periodically).
Yes, in our Elixr / Phoenix World a Library just comes up which allows to call JS functions in the browser from the server via channels (a websocket abstraction) which should allow to distribute the SAM pattern between client an server a like
I see, SAM is very flexible when it comes to managing the State Representation since one of it other key value is a State Representation distinct form the View. So you could generate the State Representation on the server and render it in the browser. You are not forced to do anything related to the DOM on the server.
I'm not sure but I also think with the SAM model it's also easier to construct SPA Apps which react on server changes. I.e. due Auth changes or pushing a Client UI to the right State, i.e. to force the user to given UI interaction like filling out additional Form. Currently managing this is SPA Apps. is hart for us as it is a interpretation of the Sate of some REST resources like "if you see this and this but missing that please render a UI state"
Absolutely, SAM does not make any assumption on the origin of a proposal. As long as you have a way to present a proposal to the model, it does not matter which action was responsbile or how it was triggered.
TLA+ is really worth knowing about, as I see, it is (at) the foundation of Computer Science. Sure we can describe computation in many different ways, but so far, this seems to be the most general known thus far.
You can achieve the same thing with SAM. I implement my projects with a "theme" that can be changed at any time. The theme is made up of pure functions (View components) that are driven by the State function's State Representation (props).
Because I DON'T want to deal with ngrx/store.. quoting from that article "We built a 50-line service that integrates with NgRx effects and gets rid of a lot of race conditions seen in a typical web application." Typical?? Yes, if you end up using redux style state management, maybe they're "typical" 😓
ah ah... when you cobble together action/model/state in a single so called "pure" function, you would magnify these problems, especially when you account for API calls.
because, that's what is a reducer, action/model/state code conveniently written together in any order you want, then for API calls, you just hope for the best, while keeping track of everything that is in flight. But what do I know?