Most Liked

slouchpie

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.

15
Post #6
adw632

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

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.

Where Next?

Popular in Discussions Top

Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
arpan
Hello everyone :wave: Today I am very excited to announce a project that I have been working on for almost 3 months now. The project is...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14049 124
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18272 126
New
shishini
I think this twitter post and youtube video didn’t get as much attention as I hoped I am still new to Elixir, so can’t really judge ...
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
joeerl
I’m playing with Elixir - It’s fun. I think @rvirding does give Elixir courses these days. Re: files and database - when I given Erlang ...
New
Owens
Hello all, I am developing a new mobile app with Flutter frontend and Phoenix backend. The mobile app has real-time task management and c...
New
fireproofsocks
This is more of a general question, but I’m wondering how other people in the community think about the pattern matching in function sign...
New
AstonJ
It’s been a while since we’ve had a thread like this, so what better way to kick off the year with :003: What does being an Elixir user ...
New

Other popular topics Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43806 214
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54250 245
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement