Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate server side rendering #17

Open
JohnPaulHarold opened this issue Aug 2, 2023 · 2 comments
Open

Investigate server side rendering #17

JohnPaulHarold opened this issue Aug 2, 2023 · 2 comments
Labels

Comments

@JohnPaulHarold
Copy link
Owner

A common pain point with performance on TVs and STBs is creating and managing DOM with lots of JavaScript. Some of this DOM construction is unavoidable and makeElement() helps with that, but some could be avoided and skipped if the server just gave us the HTML already.

If this sounds familiar, then I guess it's how websites used to work, before single page apps became a thing and servers were reduced to being dumb data stores. The key difference is, we want to avoid reloading everything else, like a regular web app with different routes, and instead add and remove large-ish fragments of HTML and carry on scripting against those.

Yes, still sounds familiar.

@JohnPaulHarold
Copy link
Owner Author

@JohnPaulHarold
Copy link
Owner Author

Further investigations done, and this above branch now has a server that will render some DOM and the script required. The rendered page isn't much more than a hello world with the simplest of scripts, but it shows that you can pass in the template and add the behaviours from the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant