Stipple.jl icon indicating copy to clipboard operation
Stipple.jl copied to clipboard

use multi routes in single page

Open alerem18 opened this issue 2 years ago • 11 comments
trafficstars

i wonder is it possible to have a SPA(Single Page Application) with stipple so we can render different models in one page without refreshing the page and create multiple pages a feature like (Link to="some path" in REACT)

also i would appreciate anyone who can explain me what are channels briefly

alerem18 avatar Feb 05 '23 19:02 alerem18

@alerem18 for now you'll have to use something complicated and solve this problem with genie instead of declaring frontend routing with something like stippleui tabs. I am thinking of adding it

https://github.com/GenieFramework/MultiRoute

AbhimanyuAryan avatar Feb 07 '23 04:02 AbhimanyuAryan

I think it is not very difficult to support multiple models on a single page. We would need to have a window.CHANNEL = {modeltype1: channel1; modeltype2: channel2} dict indstead of the current window.CHANNEL = "my channel string". I could imagine that we could use that to implement SPAs with different models. Maybe we could even do loading on demand ...

hhaensel avatar Feb 07 '23 08:02 hhaensel

yes I interpreted it wrong. Go with helmut's answer

AbhimanyuAryan avatar Feb 07 '23 08:02 AbhimanyuAryan

@alerem18 for now you'll have to use something complicated and solve this problem with genie instead of declaring frontend routing with something like stippleui tabs. I am thinking of adding it

https://github.com/GenieFramework/MultiRoute

i've tried that already, it's not SPA, it's just multi-page multi-route problem, the goal is to use something like react or vue do, render different models on the same page

alerem18 avatar Feb 08 '23 10:02 alerem18

My 2 cents:

  • multiple (Vue) models on the same page would be useful. However, that was pretty complicated in Vue 2 and got much simpler in Vue 3. As we need to migrate to Vue 3 anyway, I would add multi-model support after Vue 3 support.
  • SPA routing should use a proper router (like vue-router) vs rolling out a custom solution. So we could also look into officially supporting routing.
  • traditional SPAs are a dying trend, with users moving to JS frameworks with SSR and dynamic islands (Next, Nuxt, Remix, etc). We might want to consider integrating and bundling a front-end framework instead of "just" routing.

essenciary avatar Feb 08 '23 10:02 essenciary