givanse
givanse

Reputation: 14953

What libraries can I use to build a GUI with Erlang?

What libraries can I use to build a GUI for an Erlang application? Please one option per answer.

Upvotes: 46

Views: 26067

Answers (8)

edgerunner
edgerunner

Reputation: 14983

There’s the up and coming Scenic library for building frontends. It looks promising with the erlang-specific approach it has.

Upvotes: 4

Adam Lindberg
Adam Lindberg

Reputation: 16587

For writing native GUIs for Erlang, wxErlang seems to be the most mature library today (also on SourceForge).

Upvotes: 4

uwiger
uwiger

Reputation: 666

I'll violate the 'one option per post' request - sorry, but which tool to use really depends on what your priorities are.

One fairly stable library is gtkNode. It uses a simple but powerful way to map all GTK widgets to Erlang, and should continue to be stable across releases. It also works well with the Glade GUI builder. It's actively maintained by Erlang guru Mats Cronqvist, but it's of course best-effort.

WxWidgets is very promising and will hopefully become the main GUI library for Erlang, but it's still in beta, and the interface is not yet stable and no promises of backward compatibility are made yet.

So if you want to be a bit on the bleeding edge, WxWidgets may be your thing. Otherwise, gtkNode should give you a good-looking GUI with relative ease and safety.

The only officially supported GUI library for Erlang is GS, part of the OTP release and guaranteed to work with upcoming releases. So if this is more important than native look and feel and a modern looking facade, it may be an option.

Upvotes: 16

Doug Edmunds
Doug Edmunds

Reputation: 531

I've posted a wxErlang tutorial at http://wxerlang.dougedmunds.com

Upvotes: 3

psyeugenic
psyeugenic

Reputation: 775

For GUI application in Erlang you should use wxErlang which is included in the r13b release. The beta has been around on source for some time but is now, since r13a, included in the main OTP release.

Upvotes: 29

JesperE
JesperE

Reputation: 64444

I find it a little puzzling that anyone would want to write a GUI for a Erlang program in something other than Erlang? Erlang's concurrency model makes it an excellent language to write GUIs in. UI elements and events map perfectly onto Erlang processes and messages.

Upvotes: 5

bmdhacks
bmdhacks

Reputation: 16441

Most people don't code the actual GUI in Erlang. A more common approach would be to write the GUI layer in Java or C# and then talk to your Erlang app via a socket or pipe.

With that in mind, you probably want to look into various libraries for doing RPC between java or .Net applications and Erlang:

http://weblogs.asp.net/nleghari/archive/2008/01/08/integrating-net-and-erlang-using-otp-net.aspx

http://www.theserverside.com/tt/articles/article.tss?l=IntegratingJavaandErlang

EDIT If you're truly set on coding an interface in erlang, you might consider doing a web-based GUI served via Yaws, the erlang web server: http://yaws.hyber.org/appmods.yaws

Upvotes: 18

gbjbaanb
gbjbaanb

Reputation: 52689

I'm not sure there are any... but I found Erlbol on the web, and a X11 GUI which sounds interesting, and GTK2 (pdf link)

Upvotes: 2

Related Questions