There seem to be at at least two or three major ways of building apps that communicate with bokeh-server
in Bokeh. They correspond to the folders app
, embed
and plotting
/glyphs
under the examples directory in Bokeh.
On the differences between them, I read here the following:
On the
stock_app.py
(app
folder) example you are usingbokeh-server
to embed an applet and serve it from the url you specify. That's why you crate a newStockApp
class and create a function that creates a new instance of it and decorates it with @bokeh_app.route("/bokeh/stocks/")
and@object_page("stocks")
. You can follow theapp
examples (sliders, stock and crossfilter) and use bokeh@object_page
and@bokeh_app.route
decorators to create your custom url.On the
taylor_server.py
example (glyphs
folder) it is the session object that is taking care of creating everything onbokeh-server
for you. From this interface is not possible to customize urls or create alias.
But this confused me, what is meant by an "applet" & "embedding" in Bokeh terminology, and what is
exactly he difference between applets (presumably app
and embed
) and plotting
/glyphs
?
Also I thought that the notion of "embedding" only referred to the design pattern that we see in the embed
folder as in the example animated.py
, where we embed a tag
in the body of an HTML file. I don't see that in the stock_app.py
, so why is it an embedding example?