You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct me if I'm wrong. As far I understood your process (of serving to the browser is like that)
User calls site
python responds with a custom generated html file (per target view) that contains everything
browser gets this file and loads all other static files (and maybe even the data in another http call? that I don't know yet)
vue gets created / bootstrapped and the page is done
until the user clicks to a different page the process starts from 0
I think with that the recreation of the vue app on new click might be "ok" right now but its still alot of repeated overhead
What I suggest would be to go the actual "Single Page Application": Vue compiled once to many static files, which includes the templates that were previously done by python but instead in vue itself - and then python would just have to handle the static and data endpoints - no more also creating the templates with that - which means it saves some CPU work per request
the new user flow would be then like this:
User calls site
python serves the static vue app as is
browser gets this file and loads all other static files
vue gets created / bootstrapped and the page is done, the vue app itself then gets all the needed data
when now the user clicks to navigate to a different page
it would only load the lazy static files, and just attach it to the current vue instance (you save the bootstrapping here aswell)
If its already like that then I'm happy that this issue can be closed :D
The text was updated successfully, but these errors were encountered:
When its all statically build and put under (lets say /dist) then django would only need to serve all static files from /dist
But I think I get what you mean, I usually only work with these "routes" like https://mainurl-of-the-dist/#/subroute/subsubroute you probably want to have something like tha? https://mainurl-of-the-dist/subroute/subsubroute so that it just works
But eitherway yes it would need some changes in vue itself to not just switch the html "file" (current way) to just switch the browser path and let vue handle the loading of the needed static files to show things up
I've had a small try whilst streaming - as I have not really used Routing before with VueJS, I am going to create a small project to fully understand it before determining how I would implement something like this. :D
Correct me if I'm wrong. As far I understood your process (of serving to the browser is like that)
I think with that the recreation of the vue app on new click might be "ok" right now but its still alot of repeated overhead
What I suggest would be to go the actual "Single Page Application": Vue compiled once to many static files, which includes the templates that were previously done by python but instead in vue itself - and then python would just have to handle the static and data endpoints - no more also creating the templates with that - which means it saves some CPU work per request
the new user flow would be then like this:
If its already like that then I'm happy that this issue can be closed :D
The text was updated successfully, but these errors were encountered: