In my quest to understand and use
panel, I’m looking for the best strategy to develop a complex app. The ultimate goal being to reduce the friction while developing the app and trying to avoid making early mistakes that’d require a lot of refactoring.
By complex, I mean that the app would have:
- Lots of internal dependencies, i.e. parameters depending upon each others, plots depending on parameters, etc.
- A complex layout with lots of widgets, plots and panes, tabs, etc.
It’d probably be necessary to define more clearly what complex means in that context but these two conditions seem sufficient to start a discussion.
As for 1., the API doc page describes the 4 APIs available in
panel. While it’s obvious that the interact functions are better suited for simple cases, the other APIs, namely reactive functions, parameterized classes and callbacks, could be used for more elaborated cases. As they can offer better code structure and more fine-grained control, parameterized classes and callbacks seem to be best suited APIs.
Yet, I wonder if there a more appropriate combination? If it is fine to add callbacks (
.watch) on top of reactive param methods (
The comparison with .watch is easy because reactive patterns are almost always preferable to callback hell.
As for 2., a lot of the examples in the gallery make use of
panel.Row. With those two only, it’s possible to build complex layouts with tons of widgets, plots and other kind of panes. But is that a good thing to do? What kind of problem one can encounter when doing so ? I’m thinking about debugging the UI, how responsive it’s gonna be, performance, etc.
Having 4 different APIs and many Layout objects, there is for sure not only one way to build a complex app with
panel. On the hand, this flexibility is great and a sort of superpower, on the other hand, it just makes it a little more difficult to reason about the structure of your app.
That would be awesome if some of you could share the code of your complex apps .