AndyL
Is 2024 the year of PWA?
According to DHH: “The hallowed promise of web applications being viable and competitive alternatives to native efforts is finally here.”
The big breakthru IHHO is the addition of PWA push notifications to Safari.
“The primary mission for <DHH’s> contributions toward Rails 8 is now crystal clear: PWA.”
Elixir folk WDYT? Is it time to look at PWA?
Most Liked
slouchpie
This morning I turned my hobby app into a PWA. I also made a service worker to handle push notifications. All I needed was the MDN docs (e.g. js13kGames: Make PWAs re-engageable using Notifications and Push APIs - Progressive web apps | MDN) and this lib: GitHub - midarrlabs/web-push-elixir: Simple web push library for Elixir · GitHub
I am amazed at how easy it now is to do push notifications. No firebase, no pigeon, no apple certs. The only bit of complexity is persisting the “subscriptions” from the service worker on server so they can be associated with the user and used later. Seems like they are still using, e.g. FCM servers, to make this happen but the complexity is now all “under-the-hood”.
PWAs are super cool and rewarding to learn.
adw632
I am heading in that direction and adopting web components for a framework free client experience and a Phoenix backend to handle events and ship delta state updates without API ceremony and complexity using live_state and Phoenix channels so the backend is basically the same as LiveView responding to events over a websocket which interfaces with my phoenix contexts to fetch and update data but without html rendering, only state delta rendering.
The next step is to add some simple client side routing like vannila router, and then beyond that is both routing and local state caching strategies so the client doesn’t degrade to useless when disconnected using Google workbox..
AstonJ
Been hoping to see push notifications on Safari for a long time, but we’ve seen quite a few articles like this on DT recently:
Will Safari push notifications be independent of Apple or will they have to go through Apple’s servers?
Edit: Looks like they’ll go through APNs as well:
The delivery of remote notifications involves several key components:
- Your company’s server, known as the provider server
- Apple Push Notification service (APNs)
- The user’s device
- Your app running on the user’s device
Remote notifications begin with your company’s server. You decide which notifications you want to send to your users, and when to send them. When it’s time to send a notification, you generate a request that contains the notification data and a unique identifier for the user’s device. You then forward your request to APNs, which handles the delivery of the notification to the user’s device. Upon receipt of the notification, the operating system on the user’s device handles any user interactions and delivers the notification to your app.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









