Building a UI for a SciML biological model: Genie.jl (Web App) vs. Makie.jl (Local GUI)?

Hi everyone,

My colleague and I are currently doing our Master’s internship, and we are working on a synaptic plasticity model built with the SciML ecosystem.

Our main goal right now is to build a user-friendly interface so that biologists can easily run simulations, tweak parameters (like temperature,ions concentration, etc.), and visualize the results without having to write a single line of Julia code.

We are currently at a crossroads regarding the architecture of this interface, and we would love to get your feedback and advice. We are hesitating between two approaches:
1. A Local GUI using Makie.jl (with Observables)

  • The idea: Building a standalone local app.
  • Pros: Extremely fast and responsive once loaded; great for heavy, complex interactive plotting; very useful for our own day-to-day research.
  • Cons: Requires the end-user (biologists) to install Julia locally and deal with the “Time To First Plot” / precompilation times (which can be a bit scary for non-coders).

2. A Web Application using Genie.jl (GenieBuilder )

  • The idea: Deploying the model on a server so users access it via their browser.
  • Pros: Zero installation required for the end-user; extremely accessible and easy to share.
  • Cons: Might be harder to maintain for a small team; potentially less interactive/responsive for heavy real-time plot updates compared to Makie.

Our questions for the community:

  1. As a potential user (or a scientist sharing tools with non-coders), what would you prefer? Installing a local Julia environment to get a highly responsive Makie GUI, or having a ready-to-use web app, even if it has some limitations?
  2. For those of you who have built interfaces for differential equation models, which path did you choose and why ? Which one did you find more maintainable in the long run ?
  3. Is there a way to achieve both without rewriting everything? For example, is there a recommended workflow or framework that allows sharing the core UI logic to deploy both a local app and a web dashboard ?

Any insights, feedback, or shared experiences would be incredibly helpful for us to make the right decision.

Thanks in advance for your help!

FWIW you can deploy a Makie dashboard to the web as long as it is backed by a Julia server, using WGLMakie and Bonito. So that is one way to do both.

1 Like

I think the most flexible approach would be to deploy a Genie.jl application, then inside that application, you can use Bonito.jl to generate an interactive dashboard and write it to HTML as suggested by @asinghvi17.

For install convenience, you can consider creating a Pkg app: 6. Apps · Pkg.jl. Users can simply install the Pkg app you created from github, and then run it directly from any commandline.

2 Likes

From my experience the lowest entrance barrier is to provide it as a web service.
Eventually, that will run into limitations in terms of number of concurrent users or amount of data people can process, etc.
So I’d treat it as a way to give people a way to try it out and then you could distribute a standalone version to people who have high usage demands. You could still let them run it in the browser, just locally.

Is there an example of this ?

I’m not really sure why one would use Genie with Bonito, since Bonito should offer most Genie features. So I’d use either Genie or Bonito, but I’m obviously biased there :wink:
Bonito has the best Makie integration, if that’s important, since WGLMakie is implemented using Bonito.
Lots of people also prototype in GLMakie, and then you can just switch out the backend and have the same dashboard work on the web, which gives the best of both worlds. We’ve been fixing most incompatibilities, so I dont know of any functionality at this point which is missing in WGLMakie compared to GLMakie.
But WGLMakie has quite some latency compared to GLMakie and the WGLMakie widgets are also slower compared to HTML native widgets via Bonito.
Also there’s much more room for styling in Bonito, so people then usually start using more Bonito around the WGLMakie dashboard.
Although, if looks dont matter as much, we just recently implemented WGLMakie.activate!(use_html_widgets=true) which replaces the Makie native widgets with much faster HTML widgets, so that problem at least can be worked around.

3 Likes

This is precisely the hurdle that AppBundler.jl addresses — it makes it straightforward to create application installers for Windows, Linux, and macOS. I’m currently drafting new documentation for the 1.0 release, which I hope to publish this weekend. The revised API using LocalPreferences.toml also makes the workflow considerably easier than before. I’d recommend checking it out.

2 Likes

I wasn’t aware that Bonito could do so many things :wink:

If someone could explain the differences, that would help.

If you’re up for a slightly different UI paradigm, I can recommend CImGui.jl and ImPlot.jl for this kind of thing. The TTFX is very low and in my experience it’s much easier to build interactive UIs with an immediate mode library.

(disclaimer: I’m a maintainer of both those libraries)

4 Likes

Depends on what the needs/audience will be, but I’ll also shamelessly put in a plug for Tachikoma.jl, the new kid on the block, if your needs would be well served by a responsive terminal based UI which can also handle pixel graphics, plots from Makie.jl, etc. I think the other frameworks suggested are also great choices as well, so I’d suggest thinking about which one is the best fit for your specific use case.

4 Likes

I’ll throw in another vote for Bonito + Makie. It’s not quite 100% mature, but we had good experience with it, and the authors are responsive on this forum if you have any issue.

  1. For those of you who have built interfaces for differential equation models, which path did you choose and why ? Which one did you find more maintainable in the long run ?

We did exactly that. I evaluated Genie first. The Genie devs were very nice and helpful, but its design didn’t quite work for me. Genie is basically “in control” of the app. You start with a wizard that creates your package, then you fill in the blanks with what you want it to do.

In contrast, Bonito is a smallish, plain Julia library, that composes well and is relatively to understand.

  1. Is there a way to achieve both without rewriting everything? For example, is there a recommended workflow or framework that allows sharing the core UI logic to deploy both a local app and a web dashboard ?

Bonito :white_check_mark:. Not sure about Genie, but I assume you can also run the web app locally.

FWIW, we recently developed a package to fit some models to experimental data, also aiming users that are not programmers. The interface and installation codes were quite vibe-coded, but at the end we managed using only HTTP.jl and providing Windows installer (that manages installing Julia, installing the Julia app, and adding desktop and menu icons). It has worked, for now: Installation · SFEModeling.jl

The interface looks like this:


3 Likes

Furthermore, since Tachikoma.jl works entirely on Julia without relying on external servers or other things, it is so much easier to integrate the UI with the back end. It was very straightforward to build this app.

4 Likes

Hi everyone,

Thank you so much for all the great answers and insights so far!

I realize I forgot to mention a very important detail regarding our model: our simulations can take quite some time to run. Because of this, we really want the user to be able to see the calculations and the plots updating in real-time as the simulation progresses (rather than waiting 5 minutes looking at a blank screen before getting the final result).

To give you a better idea of what we are currently building, here is a screenshot of our current local GUI:

Given this requirement for real-time visualization during long computations, does this change your recommendations ?

Thanks again for your help!

Given that you already have a GLMakie GUI that I suppose already works well, I’d just try out to serve it as a webpage with WGLMakie and Bonito, try out use_html_widgets and go from there.
I think at this point, its more important to have something working that you can polish, then changing the complete stack. And there’s definitely still lots of room for polishing the existing GUI :wink:
Bonito + WGLMakie are as far as I know one of the best frameworks for streaming plotting updates, since we optimized the protocol quite heavily and fast updates have been a major goal.

but then you said:

serve it as a webpage with WGLMakie and Bonito

It seems contradictory: do we need both?

How is that contradictory? WGLMakie uses Bonito to implement the “Makie plot html widget” which can be rendered in a browser.
Its hooked up to open in the browser when you call display(makie_figure), so you dont need an explicit using Bonito.
But if you want to create a webpage, you’ll need:

using Bonito, WGLMakie
app = Bonito.App() do 
    f, ax, pl = scatter(1:4)
    return DOM.div(f)
end
server = Bonito.Server(app, "0.0.0.0", 8080)
2 Likes

Next step: self contained plots so we can run on static websites without a julia backend :smiley: I can dream…

1 Like