Git Product home page Git Product logo

Comments (8)

cloud-rocket avatar cloud-rocket commented on May 30, 2024 1

@MarcSkovMadsen - I truly think you should publish your vision as a part of the documentation and not here. Thanks for the amazing work!

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

Thanks for the nice feedback!

The basic answer is that I have

  • one document (a Template) with among other a main Column.that holds the active page (it self most often a Column).
  • a parameterized class page_service with an ObjectSelector parameter page that holds the active page and with the list of pages as objects.

When the user changes the active page via the select widget the function _update_main_container then replaces the content of the main container.

The functionality to change the page can be found here

    @param.depends("services.page_service.page", watch=True)
    def _update_main_container(self):
        with self.services.progress_service.mark_active(
            f"Loading {self.services.page_service.page.name}"
        ):
            if self.services.page_service.page.show_loading_page:
                self.main[:] = [self.loading_page_component.main]

            main_instance = self._application_page_instance.main
            main_instance.align = "center"
            main_instance.sizing_mode = "stretch_width"

            self.main[:] = [
                self._main_spacer,  # Trick to force main to stretch to full width of appContent
                main_instance,
            ]

There are more details though.

  • The page.component can be a Class or a Function which returns a Column or similar. The function or Class is not run or instantiated before the user selects the page. This is done to speed up the application.
    • When the user navigates to another page and back it is the same instance of the page that loads. I.e. he/ she will find the page in the same state (showing the same) as when he/ she left it.
  • Similarly to the page_service I also have a progress_service that the application and its pages can use to signal progress with. The little panel logo in the upper right watches this and starts breathing when there is progress. The logo is just a gif and it breaths by changing the url from a static logo gif to a breathing video gif.

Hope this guides you in the right direction. Feel free to ask more questions in order to get a good understanding.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

Below I will write a little bit of my thoughts behind the design of awesome-panel.org and the vision for it.


My understanding of Panel is that

  • it can be a really, really powerful platform for building your product using all the power of Python and bringing it to your users very, very quickly.
  • It is in fact possible to use for both beginning domain experts like analysts, engineers, traders, data engineers and data scientists and for experienced software developers. There is something for everyone. And they can collaborate on a common Platform.

But it is not really, yet demonstrated that you can build a consistent, modern, secure and performant application in Panel and how.

So I've set out to explore and build this. Both for my own fun and need. But also to help colleagues and fellow Pythonistas.


One place I look for inspiration is in BI Tools like Power BI and Tableau. They are not nearly as powerful or flexible as Panel but using them it is very easy to develop something consistent and deploy it fast and securely.

Another place is Streamlit. Streamlit is really, really easy to start using. But it yet very difficult to build larger, custom and more interactive applications. Maybe they will solve that. Maybe they cannot because of the run full script and one template philosophy. And maybe they should not solve that. The number of users needing a simple solution rather than a powerful one might be much higher.


Another thing I cant settle my mind on is really micro app versus (monolith) app platform. In some situations users would like to deploy apps as micro apps in one container for each app and maybe bind things together using reverse proxies etc.

In some situations users would like to avoid all the DevOps stuff and just have one application to deploy, monitor and maintain. But an application that is really a platform for building and deploying small apps.

I'm a little old fashion still so I tend to like the last solution. I fear ending up in container and devops hell.


I have been thinking a lot about whether to have one document and load pages lazily as currently done for awesome-panel.org or just use pn.serve to serve the pages at different urls that needs to be loaded.

The first is faster, more modern and can keep the state.
The second may give a simpler application and it's easier to have different layouts and styles.

I think eventually I will end up supporting both. Some pages will load dynamically and some pages will just link to another url.

For example I have a Material Designer application coming up where the user can select colors according to the Material color scheme and see how the existing Panel layouts, panes and widgets look in that theme (Dark theme yes :-)). I dont know yet if that will work out nicely working together with the rest of the pages. So maybe that will be served at a seperate url.

I also have an intention one day to show case other themes than Material on which awesome-panel.org is currently built. For example Golden or SAP UI 5 (yes SAP and Python - weird combination :-)). SAP has actually released the most comprehensive set of web components and they work really, really well with Panel.

I also have then intention one day to show case that you can build really, really nice looking dashboards and applications in Panel. Something that is just as nice as what people show case in Power BI, Panel or Dash. Those technologies focus on look and feel while Panel so far has focused on raw power and the underlying technology.

FYI. @philippjfr

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

@julioasotodv . My wish is actually that one day there is a general purpose application package for Panel. it could be the awesome-panel python package, it could be provided by Panel it self or maybe someone else.

Currently I am still learning and refactoring. But my intention is to polish, mature and document so that what I have built can be used by others.

But for that I would need someone who would like to use something like this and would be willing to guide how the api current feels and how it should feel.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

@julioasotodv

One thing that is not yet in awesome-panel.org is a better use of the url. I would like to set the url parameter to ?page=home etc when navigating to home etc.

I would also like to be able to save more of the state (like slider values etc.) in the url parameters.

All of this to enable my users to bookmark and share deep links.

Philipp has developed the Location component for this use case. I just have not had the time to try it out and start using it yet. See holoviz/panel#1150

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

Regarding data and dataframes I have to things I would like to integrate.

My applications often contain one or more dataframes of data. I would like some general application functionality that enables selecting from a list of dataframes and downloading.

That is really what the disabled download icon in the upper right indicates as an upcoming feature.


Similarly I would like some general application functionality for dataframes that enables the user to select, explore and pivot a dataframe. I believe I would use the PerspectiveViewer for this.

I believe the last functionality would be really, really powerful and something that BI tools do not provide today.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

And finally I think what makes Panel so powerful is really param and reactive programming.

When I look at Streamlit, Voila and Dash its either not possible or not really communicated.

So I would really, really like to understand and describe how to build larger applications using param and reactive programming. What is the Model-View-Controller (MVC) framework for Panel?

I'm experimenting with a Model-Service-Component-View model but have a feeling that might be too much for Panel and Panel users.

from awesome-panel.

MarcSkovMadsen avatar MarcSkovMadsen commented on May 30, 2024

Thanks all. Will close this one as the original request has been answered.

from awesome-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.