# Multipage Stipple webapp

**URL:** <https://discourse.julialang.org/t/multipage-stipple-webapp/67852>\
**Category:** Web Stack\
**Tags:** webapps\
**Created:** [September 8, 2021, 7:55am UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852 "2021-09-08T07:55:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![julien\_goo](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@julien\_goo](https://discourse.julialang.org/u/julien_goo)\
**Post date:** [September 8, 2021, 7:55am UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/1 "2021-09-08T07:55:35Z")

</div>

Hi all,

Is it possible to have _multipage_ apps based on Stipple? Not necessarily with different url, but with a clickable menu just like a Shinydashboard does with the R Shiny framework.  
I bet there is a strong interest from enterprises and academics for more complex apps, in Julia.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [September 9, 2021, 10:55am UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/2 "2021-09-09T10:55:00Z")

</div>

Hi @julien_goo

Yes, totally possible! I’ve built a few this summer and the best approach is to treat each page as a standalone application (but of course, reusing layouts, views, models, etc).

Create an MVC app (resource oriented, like here [Working with Genie Apps · Genie - The Highly Productive Julia Web Framework](https://genieframework.github.io/Genie.jl/dev/guides/Working_With_Genie_Apps.html#Working-with-resources)) and make each Controller a Stipple app. This means that navigation between pages will be stateless (there will be a full page reload between individual pages and they will have distinct URLs) but each page will be reactive/interactive.

In my opinion it’s better to have truly separate pages as each MVC resource will encapsulate its logic, making reasoning about the code simpler. Also, you can easily add extra features like authentication, authorisation, etc. With caching (also included) load times are instant.

Keep in mind some “details” that in my experience made a huge difference, like avoidid global objects/state [made a huuuuge difference in overall performance] and using the recently added `StippleUI.Intersection` which only updates UI elements visible on the screen [very useful for dashboards with multiple reactive elements].

Unfortunately I can’t share actual code as it’s closed source and I have yet to document the best ways of building this kind of apps but I’ll do my best to release some docs ASAP. Feel free to reach out via DM here, Github or Gitter if you need help.

---

<div class="post-metadata">

**Author:** ![julien\_goo](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@julien\_goo](https://discourse.julialang.org/u/julien_goo)\
**Post date:** [September 9, 2021, 3:33pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/3 "2021-09-09T15:33:01Z")

</div>

Thanks for your answer.  
Good to learn that more complex dashboards can be build with multipages. I will be really interested to read some docs about it and see an app example. For my job, a complex dashboard is the only missing piece to have all my data science and AI solutions in Julia.

I understand that having global objects affects performance, but it is common to use inputs or results one page in an another one. How would you easily share info or structs between pages ? It is very convenient in RShiny dashboard, but complex in Dash with real multipage (different URLs and dash statelessness).

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [September 9, 2021, 4:20pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/4 "2021-09-09T16:20:32Z")

</div>

It’s definitely easier to show code than to explain 🙂 I’ll try to come up with some simple multi-page app example.

> [@julien\_goo](#):
>
> How would you easily share info or structs between pages ?

You can store the state of the app in some form of persistent storage and associate it with a user id stored on a cookie. The user info will be there already if you deploy authentication. If not, Stipple exposes a simple cookie API.

As for the actual struct storage, a quick and dirty method is Julia serialization (no need for DBs). Bonus: this state can be persisted indefinitely and the users can always get back to the dashboards as they left them.

---

<div class="post-metadata">

**Author:** ![Chinonso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chinonso/32/37856_2.png) [@Chinonso](https://discourse.julialang.org/u/Chinonso)\
**Post date:** [July 22, 2022, 9:31pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/5 "2022-07-22T21:31:22Z")

</div>

Please any update on this because I’m Trying build something like that with Julia, Genie and Stipple. After making a controller in Genie app, I don’t know how to include it in Genie route. I used one of the examples in Stipple demo then move the route part in the file to Genie general route file then I have no idea of what to do next

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/2/32c26d12339dd587ff9e776012ab71a44106e585.jpeg)  
The image is the general Genie route file  
And I got this error  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/d/fde8f7401d296ff8872411d6b1463f8361738b7b.jpeg)

Here is my Controller

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/3/23897b127bd3b68927dfe75d302a00e881bd5781.jpeg)

I’m really new to Julia and Genie

---

<div class="post-metadata">

**Author:** ![Chinonso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chinonso/32/37856_2.png) [@Chinonso](https://discourse.julialang.org/u/Chinonso)\
**Post date:** [July 23, 2022, 7:59pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/6 "2022-07-23T19:59:56Z")

</div>

I got this working following the way you said it should be done. I just changed the route inside the Stipple file to a function and call the function in general Genie route file. I don’t know if it’s security wise to do so.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [April 18, 2023, 11:17am UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/7 "2023-04-18T11:17:38Z")

</div>

Is there a public example on this topic?

I.e. Server-side templates from Genie (such as from the mvc tutorial) plus some reactive single page apps with Stipple.

Like this one for Django. [Build a modern web app using Django and Javascript with no build tools | blog](https://www.advantch.com/blog/build-a-modern-web-app-using-django-and-javascript/)

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [October 14, 2023, 5:05pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/8 "2023-10-14T17:05:47Z")

</div>

There finally is an example: [Adding reactive pages · Genie Framework Resource Center](https://learn.genieframework.com/guides/adding-reactive-pages#multiple-app-modules)

---

<div class="post-metadata">

**Author:** ![Wenzhe\_Ma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wenzhe_ma/32/13020_2.png) [@Wenzhe\_Ma](https://discourse.julialang.org/u/Wenzhe_Ma)\
**Post date:** [September 24, 2024, 3:52pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/9 "2024-09-24T15:52:09Z")

</div>

and the page is gone…

---

<div class="post-metadata">

**Author:** ![Pere](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pere/32/214250_2.png) [@Pere](https://discourse.julialang.org/u/Pere)\
**Post date:** [September 24, 2024, 3:58pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852/10 "2024-09-24T15:58:32Z")

</div>

sorry about that! I’ve moved some pages around. Here’s the link

> **[Multipage apps - Genie](https://learn.genieframework.com/framework/stipple.jl/guides/multipage-apps/)**
>
> How to add pages with reactive components that enable real-time interactivity with the UI.
