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

web: Remove server-side template rendering #77

Open
mhthies opened this issue Nov 4, 2023 · 0 comments
Open

web: Remove server-side template rendering #77

mhthies opened this issue Nov 4, 2023 · 0 comments

Comments

@mhthies
Copy link
Owner

mhthies commented Nov 4, 2023

The web widgets use client-side JavaScript for dynamically changing the UI from received object state. Some of them already generate most of the HTML layout of the widget in JavaScript as well, e.g. by using a third-party JS library (like Iro or Chart.js). The other widgets use server-side template rendering with Jinja2 to generate the required HTML elements. However, these HTML templates are all quite simple, so we could reduce complexity by removing the template rendering and let all widgets' JavaScript code generate the HTML elements.

We can keep the base.htm template for rendering the overall web page with placeholders for each widget and an embedded JSON structure containing the specification of the individual widgets or move to a full single-page application, where the specification of the page layout and widget configurations is fetched as JSON from an API endpoint and all HTML rendering is done in client-side JavaScript.

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

No branches or pull requests

1 participant