I’d like to make a very basic WebApp running locally where the user can see some basic text/graphics, select various options, toggles, items from a list, input text, select files, set parameters, etc. Underneath (the guts) would be a bunch of calculation based on user input input and then a display (text, tables, graphics).
I’ve never made a WebApp before. I’d like to use Julia for the calculation guts. Which packages do you recommend? What should my workflow be? Is there a tutorial that will take me from zero to useful?
Yes. If you use it from a Jupyter notebook it makes it in the notebook, but if you use it outside a Jupyter notebook then it makes a standard web interface. This makes it really easy to create and debug from standard Julia development tools!
You really want Interact.jl to make the interface and Blink.jl for a standalone browser window. I’m using this combo right now, doing quite a few of the things you mention and plotting the output live.
You can also serve the same Interact ui on the web using Mux.jl and an extra two or three lines of code.
It actually is quite simple. Let’s say you create an Interact app with either custom widgets or using the @manipulate macro (which is just a shortcut for a specific case of custom widget). For example:
ui = @manipulate for i = 1:10, j = "test"
If you are in the notebook, this appears inline already and you are good to go. If you are doing this from the REPL, you can serve it via Blink:
I’m writing Julia-based APIs with Joseki.jl and this project is an example of a front end written in Angular (my personal favorite, but Vue and React are also both options) and two different APIs written in Julia. DiffEqOnline is another older example of a traditional front end sitting on top of a Julia API.
Hi Raf! I’m also trying to develop some web app with julia. Do you have any examples or projects on GitHub I could checkout to see how you’re using Interact and Blink? I would really really appreciate it.
We have this soon to be published package for DynamicGrids.jl models.
It has a few bugs righ not but you can see how we build the interfaces for atom, electron and served to the web.
There are also a few manual model-fitting interfaces in GrowthMaps.jl:
Were you can manually fit models to maps or plotted curves.
The thing you may find confusing is that everything is general - there are no specific sliders being generated in these packages, instead the interfaces are for arbitrary composed models. We use Flatten.jl and FieldMetadata.jl to flatten composite objects down to tuples that you can make sliders from.