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

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
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
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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 Postg...
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
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement