Publishing real-time interactive webpages

#1

Hi, I’m new to Julia and excited to finally replace MATLAB.

I’m eager to know what’s the cutting edge of publishing real-time interactive pages or notebooks with Julia.

With real-time interactive I mean a format where the user can e.g. move a slider and a plot next to it will update immediately while the user drags the slider.

I heard of D3 but I haven’t looked into it. There are some very polished D3 examples out there (some of them embedded into articles of big publications) that probably took quite some effort to create.

What I’m looking for is some middle ground where the documents / notebooks you’re working on are relatively easy to publish in a format that looks nice enough to not deter a reader who doesn’t know how to read code. And where it’s not too cumbersome to add interactivity.
I don’t mind a difficult one-time setup and setting up a server if that’s necessary.

And I’m aware that this is a difficult problem underneath (since the interactivity needs to happen client-side in the JavaScript runtime), I just want to throw this out here to make sure I’m not missing any package or option or custom glued-together pipeline for this.

0 Likes

#2

Hi @gubikmic :wave:

Welcome :blush:

It sounds like what you are looking for is Interact.jl.

There are a couple of organizations you’ll probably want to check out:

Some of us are also on Slack in the channel #web.

Hope this helps :blush:

0 Likes

#3

The way Interact works is probably slightly different: the interactivity is julia based and happens server side (meaning, Interact takes care of keeping in sync the javascript values with the julia values and you would generally code the logic in julia). The docs should be reasonably complete. I wrote a small example of a website in Interact called InteractDemos, you can clone it and deploy in localhost to get an idea.

I’m not sure what the best/easiest option for remote deployment is. If you follow the set-up instructions of InteractDemos on a server and launch it on a tmux session in ssh it should ideally just work. Other options are Binder notebooks and NextJournal but I haven’t tried using them with Interact recently.

1 Like

#4

Thank you both for the replies!

InteractDemos doesn’t work for me as it is, I opened an issue on GitHub (and http://interact-jl.org:8000 doesn’t respond)

I will look more closely into Interact.jl and try to understand how it works.
NextJournal looks very interesting, too.

0 Likes

#5

The site is no longer hosted anywhere actually (I no longer have access to the server I was borrowing for that), hope you manage to try it out locally. If somebody ends up putting it on a server I’d be happy to redirect the interact-jl domain there.

0 Likes