6 Julia Frameworks to Create Desktop GUI’s and Web Apps | by Logan Kilpatrick | Towards Data Science

Julia is used for a lot of deeply technical applications like Machine Learning and Data Science. But as a general-purpose programming language, Julia can also be used for things like building websites and interactive visualizations. In this article, we will go over 5 Julia packages that can be used to create desktop GUI’s or web applications.
Genie.jl is a pure Julia web framework based on Django. From the Genie website:
Genie Framework includes all you need to quickly build production ready web applications with Julia Lang. Develop Julia backends, create beautiful web UIs, integrate with databases and set up high-performance web services and APIs.
Like Django, Genie is not just a stand alone-package, it is an entire ecosystem! Let’s look at a basic hello world example with Genie:
# Genie Hello World!using Genieroute("/helloworld") do    "Hello and welcome to Genie!"end# Powerful high-performance HTML view templatesusing Genie.Renderer.Htmlroute("/html") do    h1("Welcome to Genie!") |> htmlend# JSON rendering built inusing Genie.Renderer.Jsonroute("/json") do    (:greeting => "Welcome to Genie!") |> jsonend# Start the app!up(8888)
As you can see, Genie follows a similar design pattern to Django and comes with features like a web server, templating engine, cookies, encryption, authentication, a routing engine, backend views written in Julia, and much more!
If you want to build modern web applications and are familiar with Django, Genie is the right place to start! You can find out more here: https://genieframework.com
For a comprehensive video tutorial on Genie, check out:
Gtk.jl is a Julia package built on top of the very popular GTK windowing toolkit. You can find the getting started manual here: https://juliagraphics.github.io/Gtk.jl/latest/manual/gettingStarted/
Let’s look at a simple example:
using Gtkwin = GtkWindow("My First Gtk.jl Program", 400, 200)b = GtkButton("Click Me")push!(win,b)showall(win)
First, we set the name of the window and the dimensions. Then, we create a button object with a specific text label and push it into the app. Last, we display the app by calling showall.
Gtk.jl has been used to build some very cool applications. I highly suggest checking out this video:
Makie is one of the most loved visualization packages in the Julia ecosystem. There is an incredible depth to what you can build.
Makie allows you to build interactive visualizations that run on the GPU and can also be run in your browser. The Makie docs also recently went through a large update so the content there is up to date and very helpful: https://makie.juliaplots.org/stable/
I would also suggest checking out https://lazarusa.github.io/BeautifulMakie/ which is a gallery of lots of really nice animations built using Makie.
Blink.jl is the Julia wrapper around Electron. It can serve HTML content in a local window, and allows for communication between Julia and the web page. In this way, therefore, Blink can be used as a GUI toolkit for building HTML-based applications for the desktop.
I could not think of a better way to re-state this, so the above is a quote from the Blink docs. What makes Blink different from other packages is that you can build HTML-based GUI’s using it.
julia> using Blinkjulia> w = Window() # Open a new windowBlink.AtomShell.Window(...)julia> body!(w, "Hello World") # Set the body contentjulia> loadurl(w, "http://julialang.org") # Load a web page
We start off by creating the Electron window, then appending in some text to the body tag of the window, and finally, loading a URL in the window. If you run this code locally, you will see that the window changes dynamically as we execute these commands.
While I don’t think Blink is widely used, I have had a lot of fun playing around with it on various projects.
Dash is a Julia interface to the Dash ecosystem for creating analytic web applications in Julia without requiring JavaScript. This means you can build impressive dashboards like https://covid-county-dash.herokuapp.com and deploy them with ease!
You might also want to check out the Dash site https://dash.plotly.com/julia for details on getting started. There is also comprehensive documentation available on Dash.jl: https://github.com/plotly/Dash.jl
Right now, the best way to create a desktop app that can be shared and run on computers without Julia installed is to use PackageCompiler. PackageCompiler allows you to take an entire Julia project and compile it to an exe file. This process bundles all of the dependencies together into a single file to make it distributable.
I will note that there are currently limitations concerning what you need to do to create an exe. There might be some code re-writing that is required to make it compatible. For a step by step walkthrough on using PackageCompiler, check out:
And you can read more about Package Compiler in the docs: https://julialang.github.io/PackageCompiler.jl/stable/apps.html
The 5 packages highlighted above are just a small sample of the packages available today in the Julia ecosystem. Below, I will add a semi-exhaustive list of all the visualization packages I can find in case the first 5 did not suit your use-case:
Plots.jl, powerful convenience for visualization in JuliaInteract.jl, Interactive widgets to play with your Julia codeStipple.jl, The reactive UI library for interactive data applications with pure Julia.QML.jl, Build Qt5 QML interfaces for Julia programs.ClmGui.jl, Julia wrapper for cimgui
Plots.jl, powerful convenience for visualization in Julia
Interact.jl, Interactive widgets to play with your Julia code
Stipple.jl, The reactive UI library for interactive data applications with pure Julia.
QML.jl, Build Qt5 QML interfaces for Julia programs.
ClmGui.jl, Julia wrapper for cimgui
Am I missing one? Feel free to comment on this article and I will append the package to this list!