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?

Most Liked

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:

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
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
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
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
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
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
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

We're in Beta

About us Mission Statement