hnlprog

hnlprog

Advice: Easiest way to create a basic desktop UI for an Elixir app?

A beginner (of programming in general) is looking for an easy way (i.e. least new plates to handle) to implement a basic macOS UI for a local, offline Elixir app (script?).

The app takes a file path (HTML file), reads it, modifies it, and returns the string (or writes to a new file in the same directory - whichever is simpler to implement). It is not a Phoenix app. It doesn’t use Ecto at the moment - all the data is in a CSV file and a JSON file. It has two dependencies, NimbleCSV and Jason. The app is working and I use it regularly through the command line, but I would much prefer to have some GUI.

The UI needs to be able to select a local file and give that information to the Elixir app. It also needs a text boxes for user input, which will be sent also. It would be awesome if it could ‘remember’ which file is selected while the app is open or until I choose a new file.

The options I have considered are, (1) use Swift (minimal experience) to create a UI and somehow run the Elixir app, (2) use Scenic (no experience) to create a window with some buttons and text boxes, (3) use Phoenix and LiveView (minimal, but the most experience) and (3.1) wrap it in something like Electron (no experience) or (3.2) just run it through a browser, or (4) rewrite the small app in Swift.

I currently don’t have a mental representation of how (1), (2), or (3.1) would work. It’s like I’m looking at a microwave and all I see is a black box with some white because I don’t have the necessary abstractions.

Everything I come across seems to be about the web or Swift communicating to an Elixir server running somewhere else. (Maybe this is 99% applicable to my situation with small tweaks and I don’t have the insight to know that :confused: ) As for Scenic, I don’t see resources accessible at my level. Some of the code reminds me of LiveView so I may be able to wrap my head around it, but again, I don’t know what I don’t know…So,

  1. What do you think (a) is the easiest to learn and (b) has the most beginner friendly resources?

  2. Could you perhaps point me to relevant resources that would help me get started without too many hiccups?

More specifically,

For (1) - light Swift UI - how complicated is it to call an Elixir app from another language / application?

For (2) - Scenic - is interaction with local files something that is ‘simple’ to do?

First Post! Switch mode

Exadra37

Exadra37

You can read this topic for more info on available options:

The last contender option seems to be the best one of all:

You just need to wait for OTP 24 that is just around the corner :slight_smile:

— All posts loaded —

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
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
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
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
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement