ElixirFreak

ElixirFreak

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!

First 5 of 5 Posts Switch mode

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.

pedro_ldk

pedro_ldk

Yeah, the term PWA is too generic because it can go from a very simple website that has a shortcut, to a full fledge app with offline support.

kokolegorille

kokolegorille

As a side note, PWA is related to js frontend. It’s possible to do it with Rails, Phoenix, Django because it is not backend related. Phoenix has LiveView, and LiveView is not for PWA and cannot be used offline. but it’s fine to build API with it.

The rest has already been answered…

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

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement