ElixirFreak

ElixirFreak

Phoenix - possible PWA/Embedded Systems framework?

Hello guys, I recently crashed into the Elixir train and hopped onto it.. I was excited to try the language since it was vaguely similar to Python(ok, closer to Ruby, but Ruby is Python with built in methods and “end” blocks) and it was really easy to implement a web app in Phoenix in comparison to Django/Flask, the dominating web dev frameworks. I’m curious about Phoenix’s direction in other areas besides web apps.

  • Can it be used for building PWAs? PWAs are just websites with sw.js file and manifest.json file, so indirectly I’m asking if Phoenix can be used for websites? If not, no worries! I will make a website-like web app with sw.js and manifest.json
  • Can it be used for embedded systems and IoT? I also enjoy embedded apps, and Elixir is good for concurrent/distributed apps, so can it be used to program a smart fridge with a chip running multi cores? I want to see how general-purpose Elixir and Phoenix is.

I also notice C++ is used in places where Elixir simply.. stinks. Lots of numerical computation, gamedev, OOP and Imperative programming. Is it possible to interop C++ and Elixir, with C++ for the game, and Elixir for the game running on multi cores?

Thanks for reading this far!

Most Liked

evnp

evnp

Old thread, but I’d urge anyone who ends up here interested in using Phoenix as a PWA / offline-able / local-first app to check out this very interesting approach:
https://liveview-svelte-pwa.fly.dev/ | GitHub - thisistonydang/liveview-svelte-pwa: Local-First LiveView Svelte ToDo App · GitHub

cmo

cmo

Hello friend.

  • Can Phoenix be used to make websites? Considering it is a web framework, I’m going to say yes :wink:
  • Embedded systems you’re talking Nerves
  • C++ interop: you have NIFs and Ports or you can write your NIFs in Rust using Rustler. There is also Zigler for Zig but Rustler gets more love. Not sure on the status of otter but that’s a new approach.
  • you can tell yourself you’re doing OOP if you define objects as data and orient your program around data.
Exadra37

Exadra37

You cannot assume that everyone will understand what a PWA, sw.js, manifest.json are. I knew about PWAs but no idea about sw.js, that turns out to be Service Workers to support offline mode:

No, Phoenix web Framework doesn’t have support for offline use, neither for PWA’s, but to make any website eligible to be added as a mobile app on a mobile device is to add a manifest.json file to the root, and for that online tools exist:

Yes, a true PWA app is not just about adding the manifest file to it, a lot more needs to be done, but that’s how easy is to get started in having a website added to the home screen of a mobile device.

Where Next?

Popular in Discussions Top

jswny
I would like to better understand what the advantages/disadvantages of umbrella applications are compared to structuring your app as as s...
New
MarioFlach
Hello, I want to share a project I’ve been working on for a while: https://github.com/almightycouch/gitgud Background Some time ago I ...
New
sashaafm
Piggy backing a bit on @dvcrn topic BEAM optimization for functions with static return type?, I’ve been trying to understand in a deeper ...
New
WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
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
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement