gnat

gnat

GUI programming in Elixir?

I’m completely new to Elixir and don’t know Ruby, either.

Is anyone writing GUI applications in Elixir? I don’t know the language and the easiest way for me to learn (not to mention the way I’d primarily be using any language right now) is for desktop applications with a GUI front end - ideally something that will work on both Mac and Linux. What are my choices and how well supported/ integrated are they? In case it matters, I’m specifically interested in writing a distributed business application connecting multiple machines over the internet. From that standpoint, Elixir seems like it might be a good fit. But I need to have a GUI interface and not just in a browser.

I tried to research this question first with a web search and then with a search on this site; I haven’t found any good answers so far.

Marked As Solved

AstonJ

AstonJ

Will the app be connected to a central server?

If so I would look at http://electron.atom.io for the GUI and then use Elixir on the back end/server. (@kofno has some experience with Electron. Hopefully he’ll spot this and add some thoughts.)

Also Liked

AstonJ

AstonJ

No they are not competitors at all - Elm is front end and Elixir is backend. Elm is a HTML/CSS/JS transpilier, I can’t see why they would want it on the server as well, and even if they did, it would be JS - nobody in their right mind would want JS on the server :043:

yawaramin

yawaramin

Here’s Joe Armstrong’s research on GUI options for Erlang: http://erlang.org/pipermail/erlang-questions/2017-July/092949.html

Gee5ive

Gee5ive

Kind of late to the party here, but for anyone still interested in this, I’m currently building a phoenix app that I plan to distribute on desktops using webview, seems to be the most simple and straightforward approach.

NobbZ

NobbZ

For GUIs in Elixir you can still use Erlangs wx-module. For this to work, of course, it is necessary that your Erlang release is compiled with wx included.

But for the client side I’d prefer a more lightweight solution that does not pull in a full gigabyte as runtime dependency…

This in mind, I do think, currently the best approach is a JavaScript-application which runs in the Browser and is written in a way that it can work without internet access. This could even update itself silently whenever necessary (and online). Also there are multiple tools available, that can convert HTML5/JS-Applications into native applications for iOS, Android or Win mobile. They might need additional tweaking of the source though.

But if you really want to use the same language in the complete applications stack, I heard about a language called haxe which promisses exactly that, but I never tried more than a hello-world, because I#ve no project which could make use of it.

mackenza

mackenza

if this is your goal, Elixir is not at all well suited to learn by creating GUIs. All the answers you got above are about actually creating the GUI itself in another language (Elm, JS/HTML/CSS with Electron, Java) not in Elixir. All the above answers are good, but if your stated goal is to learn Elixir by doing GUI programming (non-web), you won’t find much/anything to support that in Elixir itself.

Where Next?

Popular in Questions Top

New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
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
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
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
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
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
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
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
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
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
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
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

We're in Beta

About us Mission Statement