-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PWA features to the template #37
Comments
I don't think adding PWA features to this template is a good idea. It's my opinion that the typical user of your template is just building a plain old web app and they won't be doing anything PWA so this imposes a default that most won't use. The second reason is more subtle but I think more important, I think Elm users should not be given the idea that creating a PWA could be as simple as generating an app manifest and serviceworker.js and attached your project to them. An app manifest will allow a user of an app to add the app to their mobile home screen and then launch the app as if it were native. App manifests can be generated and I think the most useful generator can be found at www.pwabuilder.com because the generator builds an app manifest based on values and app icons uploaded by the user. Any app manifest you provide in a starter kit might be placeholder but it's not very helpful. The real problem however is with service workers. Service workers allow for the really interesting features for which a person might want to do a PWA. For instance, caching and offline functionality. In order to take advantage of serviceworkers an app must make it's requests with the fetch api. Elm makes it's requests with xmlhttprequest and thus is INCOMPATIBLE with building a service worker out of the box. In short
I don't mean to be a debbie downer and I hope somebody contradicts me by saying PWA in Elm is easy, but I found that not to be the case and I'm trying to help others learn what I did the hard way. source: https://www.reddit.com/r/elm/comments/7yjiao/elm_progressive_web_apps_service_workers_and/ |
Hi @timcase Thanks a lot for the explanation and the reasons why not add PWA features. As you can see I've been hesitant on how to make it because I didn't know how. Everything is still on research/PR and that's why it hasn't been approved/merged. I may do a separate branch on how to achieve or get to the most of a PWA in Elm. This issue can also be a place to gather information about Elm PWA as you are already doing. Again, thanks for the information and I hope you find this template useful. Is always on development 😃 |
Info
Related
The text was updated successfully, but these errors were encountered: