Divooka Notebook

Type: Web application framework
Package: Divooka.Application.Notebook.Framework (Notebook toolbox), in the Web Development workload of Divooka Compute
Context: Procedural (an Events graph implementing Notebook Application), with Function graphs answering its cells
Design: RFC 284
Status: Version 0.2, the revamp. Ships in Divooka Compute; not in Divooka Explore.

Divooka Notebook turns a Divooka document into a web page that other people use. The document lays the page out - a slider, a text box, a few paragraphs, a table - and each input is answered by one of the document's own functions: change the input, and the function is called with the new value and its answer appears beneath it. It is the shape of Streamlit, with the computation written in Divooka instead of in Python.

It is not an IDE: Divooka Compute is the IDE. A notebook is what you hand to someone who should move a slider and see the result without seeing the graph - a colleague, a client, a class.

How it is used

Step Where What happens
Make it Divooka Compute An Events graph implements Notebook Application's Build: it names the site, opens pages and adds cells, each input naming the Function graph that answers it.
Try it Divooka Compute Run serves the notebook on this machine and opens it in your browser. Change the graph, run again, look again. Stop ends it.
Share it dvn dvn "My Notebook.dvk" 0.0.0.0:5080 serves it to your local network, compiled, until Ctrl+C.

Features

  • Every visitor has the document to themselves. Each page load gets an instance of the document of its own. The cells of one visit share its data members - one cell's function can store something another reads - and two colleagues on the same notebook never see each other's values.
  • Inputs. Sliders, numbers, text boxes and areas, choices, checkboxes and toggles, dates, buttons, file uploads, and input groups that hand several fields to one function at once.
  • Outputs chosen by what a function returns. Text, Markdown, HTML, code, pictures, downloads, tables and charts. A Divooka image is shown as the picture it is; a table or a run of numbers arrives as data that the viewer can look at as a table or as a line, scatter, bar or histogram chart; a figure from the Plotting toolbox is drawn interactively, with Divooka's own rendering of it a click away.
  • Pages. A sidebar of pages, one per function of the notebook.
  • Read-only and enabled. A page, a cell or a whole site can be read-only, showing results computed from the starting values. A function can enable or disable other inputs as it answers.
  • Shared once, for everyone. What every visitor should share - a large table, a model - is loaded once when the site starts and kept with Set Shared.
  • Light and dark, desktop and phone. The page follows the viewer's theme and works at phone width.

Pages

  • Getting Started: a first notebook in Divooka Compute, run and opened in a browser.
  • Concepts: sites, pages and cells, the functions that answer them, sessions as instances, shared values, outputs and how they are drawn.
  • Hosting: running in Compute, dvn, serving a local network, read-only sites and the check mode.
  • Reference: every node in the Notebook toolbox, and what each kind of returned value becomes.
  • Development: notebooks written in C#, embedding the server, the wire protocol and building from source.

References

  • RFC 284 - Framework - Divooka Notebook, the design (not published).
  • Example: Web Development / A Notebook, in Divooka Compute's examples.